diff --git a/.editorconfig b/.editorconfig index 68beb43f..9b90f5f3 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,4 +1,4 @@ -# Rules in this file were initially inferred by Visual Studio IntelliCode from the J:\引迈-NET 6\src codebase based on best match to current usage at 2022/3/31 +# Rules in this file were initially inferred by Visual Studio IntelliCode from the J:\卡奥斯-NET 6\src codebase based on best match to current usage at 2022/3/31 # You can modify the rules from these initially generated values to suit your own policies # You can learn more about editorconfig here: https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference [*.cs] diff --git a/BasicData/Tnb.BasicData.Entities/Dto/BasMaterial/ErpBasMaterialInput.cs b/BasicData/Tnb.BasicData.Entities/Dto/BasMaterial/ErpBasMaterialInput.cs deleted file mode 100644 index 0ccd30c4..00000000 --- a/BasicData/Tnb.BasicData.Entities/Dto/BasMaterial/ErpBasMaterialInput.cs +++ /dev/null @@ -1,370 +0,0 @@ -namespace Tnb.BasicData.Entities.Dto -{ - public class ErpBasMaterialInput - { - public ErpBasMaterial bas_material { get; set; } - public List bas_material_units { get; set; } = new List(); - - // public List bas_material_into_factory_specificationses { get; set; } = new List(); - // - // public List bas_substitution_materials { get; set; } = new List(); - // - // public List bas_material_send_warehouses { get; set; } = new List(); - // - // public List bas_material_inbound_whs { get; set; } = new List(); - } - - public class ErpBasMaterial - { - /// - /// 物料代码 - /// - public string code { get; set; } = string.Empty; - - /// - /// 物料名称 - /// - public string name { get; set; } = string.Empty; - - /// - /// 物料分类ID - /// - public string category_id { get; set; } = string.Empty; - - /// - /// 单位ID - /// - public string unit_id { get; set; } = string.Empty; - - // /// - // /// 单价 - // /// - // public decimal? cost { get; set; } - // - // /// - // /// 毛重 - // /// - // public decimal? grossweight { get; set; } - // - // /// - // /// 净重 - // /// - // public decimal? netweight { get; set; } - // - // /// - // /// 长 - // /// - // public decimal? length { get; set; } - // - // /// - // /// 宽 - // /// - // public decimal? width { get; set; } - // - // /// - // /// 高 - // /// - // public decimal? high { get; set; } - // - // /// - // /// 体积 - // /// - // public decimal? volumn { get; set; } - // - // /// - // /// 是否免检 - // /// - // public int? isexemption { get; set; } - - /// - /// 安全库存 - /// - public decimal? safeqty { get; set; } - - /// - /// 保质期 - /// - public int? qualityperiod { get; set; } - - // /// - // /// 是否过期允许出库 - // /// - // public string? expireout { get; set; } - - /// - /// 最小包装 - /// - public decimal? minpacking { get; set; } - - /// - /// 是否先进先出管控 - /// - public string? fifo { get; set; } - - // /// - // /// 先进先出间隔天数,批次间隔天数 - // /// - // public int? fifo_interval_days { get; set; } - - /// - /// 物料规格型号 - /// - public string? material_standard { get; set; } - - // /// - // /// 海关编码 - // /// - // public string? fhscode { get; set; } - - // /// - // /// 附属性 - // /// - // public string? attribute { get; set; } - - // /// - // /// 管控类型: 批管控:Lot 单管控:KeyParts 非管控:NoControl - // /// - // public string? controltype { get; set; } - - /// - /// 备注 - /// - public string? remark { get; set; } - - // /// - // /// 创建用户 - // /// - // public string? create_id { get; set; } - - /// - /// 创建用户 - /// - public string? create_count { get; set; } - - /// - /// 创建时间 - /// - public DateTime? create_time { get; set; } - - // /// - // /// 修改用户 - // /// - // public string? modify_id { get; set; } - - /// - /// 修改用户 - /// - public string? modify_count { get; set; } - - /// - /// 修改时间 - /// - public DateTime? modify_time { get; set; } - - // /// - // /// 扩展字段 - // /// - // public string? extras { get; set; } - - /// - /// 状态 - /// - public string? state { get; set; } - - /// - /// 物料属性 - /// - public string? material_property { get; set; } - - /// - /// 标签 - /// - public string? label { get; set; } - - /// - /// 描述 - /// - public string? descrip { get; set; } - - /// - /// 批次管理 - /// - public int? is_batch_enabled { get; set; } - - /// - /// 标签管理 - /// - public int? is_label_enabled { get; set; } - - // /// - // /// 附件 - // /// - // public string? attachment { get; set; } - - /// - /// 先进先出 0否 1是 - /// - public int? first_in_out { get; set; } - - /// - /// 存储有效期(天) - /// - public int? storage_valid_day { get; set; } - - /// - /// 预警提前期(天) - /// - public int? early_warn_day { get; set; } - - /// - /// 安全库存 - /// - public int? safe_stock { get; set; } - - /// - /// 安全库存包含状态 - /// - public string? safe_stock_stauts { get; set; } - - /// - /// 发料仓库id - /// - public string? send_warehouse_id { get; set; } - - /// - /// 入厂单位id - /// - public string? into_factory_unit_id { get; set; } - - /// - /// 投料单位 - /// - public string? material_in_unit_id { get; set; } - - /// - /// 产出单位 - /// - public string? material_out_unit_id { get; set; } - - /// - /// 请料方式 1按计划排程请料 2自行管控 - /// - public string? material_request_method { get; set; } - - /// - /// 是否包含入库数 - /// - public int? is_contain_into_num { get; set; } - - /// - /// 是否创建子工单 - /// - public string? is_create_sub_work_order { get; set; } - - /// - /// 保质期 - /// - public int? quality_guarantee_period { get; set; } - - /// - /// DI编码 - /// - public string? di { get; set; } - - } - - public class ErpBasMaterialUnit - { - /// - /// 主单位数量 - /// - public string? number_of_primary_unit { get; set; } - - /// - /// 辅助单位数量 - /// - public string? number_of_auxiliary_unit { get; set; } - - /// - /// 辅助单位 - /// - public string auxiliary_unit_id { get; set; } = string.Empty; - - } - - public class ErpBasMaterialIntoFactorySpecifications - { - /// - /// 单位id - /// - public string unit_id { get; set; } = string.Empty; - - /// - /// 数量 - /// - public decimal num { get; set; } - } - - public class ErpBasSubstitutionMaterial - { - - /// - /// 替代料编号 - /// - public string sub_material_code { get; set; } = string.Empty; - - /// - /// 替代比例,如1(一个物料可以用一个替代料代替) - /// - public decimal proportion { get; set; } - - } - - public class ErpBasMaterialSendWarehouse - { - - /// - /// 仓库编号 - /// - public string? wh_code { get; set; } - - /// - /// 最大库存 - /// - public int? max_stock { get; set; } - - /// - /// 最小库存 - /// - public int? min_stock { get; set; } - - /// - /// 安全库存 - /// - public int? safe_stock { get; set; } - } - - public class ErpBasMaterialInboundWh - { - - /// - /// 仓库编号 - /// - public string? wh_code { get; set; } - - /// - /// 最大库存 - /// - public int? max_stock { get; set; } - - /// - /// 最小库存 - /// - public int? min_stock { get; set; } - - /// - /// 安全库存 - /// - public int? safe_stock { get; set; } - } -} \ No newline at end of file diff --git a/BasicData/Tnb.BasicData.Entities/Entity/BasLocation.cs b/BasicData/Tnb.BasicData.Entities/Entity/BasLocation.cs index 03c249a9..375db58b 100644 --- a/BasicData/Tnb.BasicData.Entities/Entity/BasLocation.cs +++ b/BasicData/Tnb.BasicData.Entities/Entity/BasLocation.cs @@ -125,5 +125,5 @@ public partial class BasLocation : BaseEntity /// /// 是否超配(1:不超配 2:超配) /// - public string is_overmatch { get; set; } = "1"; + public string is_overmatch { get; set; } } diff --git a/BasicData/Tnb.BasicData.Entities/Entity/BasMaterial.cs b/BasicData/Tnb.BasicData.Entities/Entity/BasMaterial.cs index ceb22bc4..77335163 100644 --- a/BasicData/Tnb.BasicData.Entities/Entity/BasMaterial.cs +++ b/BasicData/Tnb.BasicData.Entities/Entity/BasMaterial.cs @@ -263,10 +263,5 @@ public partial class BasMaterial : BaseEntity /// DI编码 /// public string? di { get; set; } - - /// - /// 删除标志 - /// - public int? deleted { get; set; } } diff --git a/BasicData/Tnb.BasicData.Entities/Entity/BasMaterialIntoFactorySpecifications.cs b/BasicData/Tnb.BasicData.Entities/Entity/BasMaterialIntoFactorySpecifications.cs index cf53bac8..952e4a49 100644 --- a/BasicData/Tnb.BasicData.Entities/Entity/BasMaterialIntoFactorySpecifications.cs +++ b/BasicData/Tnb.BasicData.Entities/Entity/BasMaterialIntoFactorySpecifications.cs @@ -5,7 +5,7 @@ using SqlSugar; namespace Tnb.BasicData.Entities; /// -/// 物料入厂规格 +/// 物料入场规格 /// [SugarTable("bas_material_into_factory_specifications")] public partial class BasMaterialIntoFactorySpecifications : BaseEntity diff --git a/BasicData/Tnb.BasicData/BasMaterialService.cs b/BasicData/Tnb.BasicData/BasMaterialService.cs index 386096b8..6cb32234 100644 --- a/BasicData/Tnb.BasicData/BasMaterialService.cs +++ b/BasicData/Tnb.BasicData/BasMaterialService.cs @@ -6,13 +6,10 @@ using JNPF.Common.Security; using JNPF.DependencyInjection; using JNPF.DynamicApiController; using JNPF.FriendlyException; -using JNPF.Systems.Entitys.Permission; using JNPF.Systems.Entitys.System; using JNPF.Systems.Interfaces.System; -using Mapster; using Microsoft.AspNetCore.Mvc; using Newtonsoft.Json; -using SQLitePCL; using SqlSugar; using Tnb.BasicData.Entities; using Tnb.BasicData.Entities.Dto; @@ -278,185 +275,5 @@ namespace Tnb.BasicData return ids; } - - - /// - /// 物料新增修改接口 - /// - /// - /// - [HttpPost] - public async Task CreateCreateOrUpdateMaterial(ErpBasMaterialInput input) - { - var db = _repository.AsSugarClient(); - if (input == null) - { - throw Oops.Bah("参数为空"); - } - if (input.bas_material == null) - { - throw Oops.Bah("物料信息为空"); - } - if (!string.IsNullOrEmpty(input.bas_material.code)) - { - throw Oops.Bah("物料编号为空"); - } - if (!string.IsNullOrEmpty(input.bas_material.name)) - { - throw Oops.Bah("物料名称为空"); - } - DbResult result = await db.Ado.UseTranAsync(async () => - { - BasMaterial basMaterial = input.bas_material.Adapt(); - if (!await db.Queryable().AnyAsync(x => x.code == input.bas_material.code)) - { - basMaterial.id = SnowflakeIdHelper.NextId(); - } - - if (!string.IsNullOrEmpty(input.bas_material.create_count)) - { - UserEntity userEntity = await db.Queryable().FirstAsync(x=>x.Account==input.bas_material.create_count); - if (userEntity == null) - { - throw Oops.Bah($"未找到用户{input.bas_material.create_count}"); - } - basMaterial.create_id = userEntity?.Id; - } - - if (!string.IsNullOrEmpty(input.bas_material.modify_count)) - { - UserEntity userEntity = await db.Queryable().FirstAsync(x=>x.Account==input.bas_material.modify_count); - if (userEntity == null) - { - throw Oops.Bah($"未找到用户{input.bas_material.modify_count}"); - } - basMaterial.modify_id = userEntity?.Id; - } - - List basMaterialUnits = new List(); - // List basMaterialIntoFactorySpecificationsList = new List(); - // List basSubstitutionMaterials = new List(); - // List basMaterialSendWarehouses = new List(); - // List basMaterialInboundWhs = new List(); - - if (input.bas_material_units != null && input.bas_material_units.Count > 0) - { - foreach(var item in input.bas_material_units) - { - BasMaterialUnit basMaterialUnit = item.Adapt(); - basMaterialUnit.id = SnowflakeIdHelper.NextId(); - basMaterialUnit.material_id = basMaterial.id; - basMaterialUnits.Add(basMaterialUnit); - } - } - - // if (input.bas_material_into_factory_specificationses != null && input.bas_material_into_factory_specificationses.Count > 0) - // { - // foreach(var item in input.bas_material_into_factory_specificationses) - // { - // BasMaterialIntoFactorySpecifications basMaterialIntoFactorySpecifications = item.Adapt(); - // basMaterialIntoFactorySpecifications.id = SnowflakeIdHelper.NextId(); - // basMaterialIntoFactorySpecifications.material_id = basMaterial.id; - // basMaterialIntoFactorySpecificationsList.Add(basMaterialIntoFactorySpecifications); - // } - // } - // - // if (input.bas_substitution_materials != null && input.bas_substitution_materials.Count > 0) - // { - // foreach(var item in input.bas_substitution_materials) - // { - // BasSubstitutionMaterial basSubstitutionMaterial = item.Adapt(); - // basSubstitutionMaterial.id = SnowflakeIdHelper.NextId(); - // basSubstitutionMaterial.material_id = basMaterial.id; - // BasMaterial subBasMaterial = await db.Queryable().FirstAsync(x=>x.code==item.sub_material_code); - // if (subBasMaterial == null) - // { - // throw Oops.Bah($"未找到替代物料{item.sub_material_code}"); - // } - // basSubstitutionMaterial.sub_material_id = subBasMaterial?.id ?? item.sub_material_code; - // basSubstitutionMaterials.Add(basSubstitutionMaterial); - // } - // } - // - // if (input.bas_material_send_warehouses != null && input.bas_material_send_warehouses.Count > 0) - // { - // foreach(var item in input.bas_material_send_warehouses) - // { - // BasMaterialSendWarehouse basMaterialSendWarehouse = item.Adapt(); - // basMaterialSendWarehouse.id = SnowflakeIdHelper.NextId(); - // basMaterialSendWarehouse.material_id = basMaterial.id; - // BasWarehouse basWarehouse = await db.Queryable().FirstAsync(x=>x.whcode==item.wh_code); - // if (basWarehouse == null) - // { - // throw Oops.Bah($"发料仓库未找到仓库{item.wh_code}"); - // } - // basMaterialSendWarehouse.wh_id = basWarehouse?.id ?? item.wh_code; - // basMaterialSendWarehouses.Add(basMaterialSendWarehouse); - // } - // } - // - // if (input.bas_material_inbound_whs != null && input.bas_material_inbound_whs.Count > 0) - // { - // foreach(var item in input.bas_material_inbound_whs) - // { - // BasMaterialInboundWh basMaterialInboundWh = item.Adapt(); - // basMaterialInboundWh.id = SnowflakeIdHelper.NextId(); - // basMaterialInboundWh.material_id = basMaterial.id; - // BasWarehouse basWarehouse = await db.Queryable().FirstAsync(x=>x.whcode==item.wh_code); - // if (basWarehouse == null) - // { - // throw Oops.Bah($"入库仓库未找到仓库{item.wh_code}"); - // } - // basMaterialInboundWh.wh_id = basWarehouse?.id ?? item.wh_code; - // basMaterialInboundWhs.Add(basMaterialInboundWh); - // } - // } - - if (!await db.Queryable().AnyAsync(x => x.code == input.bas_material.code)) - { - await db.Insertable(basMaterial).ExecuteCommandAsync(); - } - else - { - await db.Updateable(basMaterial).ExecuteCommandAsync(); - } - - // var x= await db.Storageable(basMaterial).ToStorageAsync(); - // await x.AsInsertable.ExecuteCommandAsync();//不存在插入 - // await x.AsUpdateable.ExecuteCommandAsync();//存在更新 - - if (basMaterialUnits.Count > 0) - { - await db.Deleteable().Where(x=>x.material_id==basMaterial.id).ExecuteCommandAsync(); - await db.Insertable(basMaterialUnits).ExecuteCommandAsync(); - } - - // if (basMaterialIntoFactorySpecificationsList.Count > 0) - // { - // await db.Deleteable().Where(x=>x.material_id==basMaterial.id).ExecuteCommandAsync(); - // await db.Insertable(basMaterialIntoFactorySpecificationsList).ExecuteCommandAsync(); - // } - // - // if (basSubstitutionMaterials.Count > 0) - // { - // await db.Deleteable().Where(x=>x.material_id==basMaterial.id).ExecuteCommandAsync(); - // await db.Insertable(basSubstitutionMaterials).ExecuteCommandAsync(); - // } - // - // if (basMaterialSendWarehouses.Count > 0) - // { - // await db.Deleteable().Where(x=>x.material_id==basMaterial.id).ExecuteCommandAsync(); - // await db.Insertable(basMaterialSendWarehouses).ExecuteCommandAsync(); - // } - // - // if (basMaterialInboundWhs.Count > 0) - // { - // await db.Deleteable().Where(x=>x.material_id==basMaterial.id).ExecuteCommandAsync(); - // await db.Insertable(basMaterialInboundWhs).ExecuteCommandAsync(); - // } - - }); - return !result.IsSuccess ? throw Oops.Oh(result.ErrorMessage) : "保存成功"; - } } } \ No newline at end of file diff --git a/BasicData/Tnb.BasicData/Tnb.BasicData.csproj b/BasicData/Tnb.BasicData/Tnb.BasicData.csproj index 349cdb7c..319b7872 100644 --- a/BasicData/Tnb.BasicData/Tnb.BasicData.csproj +++ b/BasicData/Tnb.BasicData/Tnb.BasicData.csproj @@ -15,4 +15,12 @@ + + + + + + + + diff --git a/BasicData/Tnb.BasicData/ValuesController.cs b/BasicData/Tnb.BasicData/ValuesController.cs new file mode 100644 index 00000000..ce9cb5dd --- /dev/null +++ b/BasicData/Tnb.BasicData/ValuesController.cs @@ -0,0 +1,54 @@ +using JNPF.DependencyInjection; +using JNPF.DynamicApiController; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; + +namespace Tnb.BasicData; + +[Route("api/[controller]")] +[ApiController] +// public class ValuesController : ControllerBase +public class ValuesController : IDynamicApiController, ITransient +{ + private readonly Nacos.V2.INacosNamingService _nacosNamingService; + + public ValuesController(Nacos.V2.INacosNamingService nacosNamingService) + { + _nacosNamingService = nacosNamingService; + } + + [HttpGet] + [AllowAnonymous] + public string Get() + { + return "Ok~" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss:ffff"); + } + + + [HttpGet("test")] + [AllowAnonymous] + public async Task Test() + { + // 被调用方的服务名称 + var instance = await _nacosNamingService.SelectOneHealthyInstance("tnb-core", "DEFAULT_GROUP"); + var host = $"{instance.Ip}:{instance.Port}"; + + var baseUrl = instance.Metadata.TryGetValue("secure", out _) + ? $"https://{host}" + : $"http://{host}"; + + if(string.IsNullOrWhiteSpace(baseUrl)) + { + return "empty"; + } + + var url = $"{baseUrl}/api/values"; + + using (HttpClient client = new HttpClient()) + { + var result = await client.GetAsync(url); + return await result.Content.ReadAsStringAsync(); + } + } + +} \ No newline at end of file diff --git a/ProductionMgr/Tnb.ProductionMgr.Entities/Entity/PrdMoTaskDefectRecord.cs b/ProductionMgr/Tnb.ProductionMgr.Entities/Entity/PrdMoTaskDefectRecord.cs index b463b200..b1625663 100644 --- a/ProductionMgr/Tnb.ProductionMgr.Entities/Entity/PrdMoTaskDefectRecord.cs +++ b/ProductionMgr/Tnb.ProductionMgr.Entities/Entity/PrdMoTaskDefectRecord.cs @@ -5,7 +5,7 @@ using SqlSugar; namespace Tnb.ProductionMgr.Entities; /// -/// +/// 自检报废记录表 /// [SugarTable("prd_mo_task_defect_record")] public partial class PrdMoTaskDefectRecord : BaseEntity diff --git a/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs b/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs index 6251fdc3..9bea8e27 100644 --- a/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs @@ -21,15 +21,14 @@ using Tnb.BasicData; using Tnb.BasicData.Entities; using Tnb.BasicData.Entities.Dto; using Tnb.EquipMgr.Entities; -using Tnb.PerMgr.Entities; using Tnb.ProductionMgr.Entities; using Tnb.ProductionMgr.Entities.Dto; using Tnb.ProductionMgr.Entities.Dto.PrdManage; using Tnb.ProductionMgr.Entities.Enums; using Tnb.ProductionMgr.Interfaces; -using Tnb.QcMgr.Entities; -using Tnb.QcMgr.Entities.Enums; -using Tnb.QcMgr.Interfaces; +// using Tnb.QcMgr.Entities; +// using Tnb.QcMgr.Entities.Enums; +// using Tnb.QcMgr.Interfaces; // using Tnb.PerMgr.Entities; @@ -54,7 +53,7 @@ namespace Tnb.ProductionMgr private readonly ISqlSugarClient _db; private readonly IBillRullService _billRuleService; private readonly IPrdInstockService _prdInstockService; - private readonly IQcCheckPlanService _qcCheckPlanService; + // private readonly IQcCheckPlanService _qcCheckPlanService; public OverideVisualDevFunc OverideFuncs { get; } = new OverideVisualDevFunc(); public PrdMoTaskService( @@ -64,8 +63,8 @@ namespace Tnb.ProductionMgr IRunService runService, IBillRullService billRullService, IPrdInstockService prdInstockService, - IVisualDevService visualDevService, - IQcCheckPlanService qcCheckPlanService + // IQcCheckPlanService qcCheckPlanService, + IVisualDevService visualDevService ) { _repository = repository; @@ -78,7 +77,7 @@ namespace Tnb.ProductionMgr OverideFuncs.GetListAsync = GetList; _billRuleService = billRullService; _prdInstockService = prdInstockService; - _qcCheckPlanService = qcCheckPlanService; + // _qcCheckPlanService = qcCheckPlanService; } #region Get @@ -384,7 +383,7 @@ namespace Tnb.ProductionMgr estimated_end_date = a.estimated_end_date == null ? null : a.estimated_end_date.Value.ToString(DbTimeFormat.SS), bom_id = d.id, bom_version = d.version, - create_time = a.create_time==null ? "" : a.create_time.Value.ToString(DbTimeFormat.SS) + create_time = a.create_time == null ? "" : a.create_time.Value.ToString(DbTimeFormat.SS) }) .Mapper(it => it.mo_task_status = dic.ContainsKey(it.mo_task_status) ? dic[it.mo_task_status].ToString()! : "") .ToListAsync(); @@ -702,14 +701,14 @@ namespace Tnb.ProductionMgr row = await db.Insertable(moTask).ExecuteCommandAsync(); #region 质检模块 //质检 - TriggerPlanEntity entity = new() - { - materialid = moTask.material_id, - processid = moTask.process_id, - workid = moTask.workstation_id, - triggerevent = EnumTriggerEvent.首件检新的生产任务 - }; - await _qcCheckPlanService.CreateTask(entity); + // TriggerPlanEntity entity = new() + // { + // materialid = moTask.material_id, + // processid = moTask.process_id, + // workid = moTask.workstation_id, + // triggerevent = EnumTriggerEvent.首件检新的生产任务 + // }; + // await _qcCheckPlanService.CreateTask(entity); #endregion //根据工单号获取当前工单包含的已排产数 int? schedQty = db.Queryable().Where(it => it.mo_id == input.mo_id)?.Sum(d => d.scheduled_qty); @@ -843,14 +842,14 @@ namespace Tnb.ProductionMgr row = await _db.Insertable(moTask).ExecuteCommandAsync(); #region 质检模块 //质检 - TriggerPlanEntity entity = new() - { - materialid = moTask.material_id, - processid = moTask.process_id, - workid = moTask.workstation_id, - triggerevent = EnumTriggerEvent.首件检新的生产任务 - }; - await _qcCheckPlanService.CreateTask(entity); + // TriggerPlanEntity entity = new() + // { + // materialid = moTask.material_id, + // processid = moTask.process_id, + // workid = moTask.workstation_id, + // triggerevent = EnumTriggerEvent.首件检新的生产任务 + // }; + // await _qcCheckPlanService.CreateTask(entity); #endregion @@ -1087,20 +1086,20 @@ namespace Tnb.ProductionMgr { #region 质检模块 //质检 - if (prdTaskList.Where(p => p.mo_task_status == "Pause").Count() > 0 && status == "InProgress") - { - foreach (PrdMoTask? task in prdTaskList.Where(p => p.mo_task_status == "Pause").ToList()) - { - TriggerPlanEntity entity = new() - { - materialid = task.material_id, - processid = task.process_id, - workid = task.workstation_id, - triggerevent = EnumTriggerEvent.首件检生产任务暂停 - }; - await _qcCheckPlanService.CreateTask(entity); - } - } + // if (prdTaskList.Where(p => p.mo_task_status == "Pause").Count() > 0 && status == "InProgress") + // { + // foreach (PrdMoTask? task in prdTaskList.Where(p => p.mo_task_status == "Pause").ToList()) + // { + // TriggerPlanEntity entity = new() + // { + // materialid = task.material_id, + // processid = task.process_id, + // workid = task.workstation_id, + // triggerevent = EnumTriggerEvent.首件检生产任务暂停 + // }; + // await _qcCheckPlanService.CreateTask(entity); + // } + // } #endregion foreach (PrdMoTask item in prdTaskList) @@ -1503,13 +1502,13 @@ namespace Tnb.ProductionMgr { throw Oops.Bah("载具不能为空"); } - + if (string.IsNullOrEmpty((input.location_code))) { throw Oops.Bah("入库库位不能为空"); } - - if (input.reported_qty<=0) + + if (input.reported_qty <= 0) { throw Oops.Bah("提报数量为正数"); } @@ -1536,18 +1535,18 @@ namespace Tnb.ProductionMgr #region 质检模块 //质检模块 - TriggerPlanEntity entity = new() - { - materialid = prdMoTask.material_id, - processid = prdMoTask.process_id, - workid = prdMoTask.workstation_id - }; - int? reported = prdMoTask.reported_work_qty == null ? 0 : prdMoTask.reported_work_qty; - int? scrap = prdMoTask.scrap_qty == null ? 0 : prdMoTask.scrap_qty; - entity.oldpronum = reported + scrap; - entity.newpronum = input.reported_qty; - entity.triggerevent = EnumTriggerEvent.生产检定量; - await _qcCheckPlanService.CreateTask(entity); + // TriggerPlanEntity entity = new() + // { + // materialid = prdMoTask.material_id, + // processid = prdMoTask.process_id, + // workid = prdMoTask.workstation_id + // }; + // int? reported = prdMoTask.reported_work_qty == null ? 0 : prdMoTask.reported_work_qty; + // int? scrap = prdMoTask.scrap_qty == null ? 0 : prdMoTask.scrap_qty; + // entity.oldpronum = reported + scrap; + // entity.newpronum = input.reported_qty; + // entity.triggerevent = EnumTriggerEvent.生产检定量; + // await _qcCheckPlanService.CreateTask(entity); #endregion _ = prdMoTask.reported_work_qty == null ? await db.Updateable() @@ -1579,24 +1578,24 @@ namespace Tnb.ProductionMgr .SetColumns(x => x.complete_qty == x.complete_qty + input.reported_qty) .Where(x => x.id == prdMo.id).ExecuteCommandAsync(); - PerProcessStandardsH processStandardsH = await db.Queryable() - .Where(x => x.equip_id == prdMoTask.eqp_id && x.molds_id == prdMoTask.mold_id && - x.output_material_id == prdMoTask.material_id && x.enabled == 1) - .OrderByDescending(x => x.create_time).FirstAsync(); + // PerProcessStandardsH processStandardsH = await db.Queryable() + // .Where(x => x.equip_id == prdMoTask.eqp_id && x.molds_id == prdMoTask.mold_id && + // x.output_material_id == prdMoTask.material_id && x.enabled == 1) + // .OrderByDescending(x => x.create_time).FirstAsync(); - ToolMolds toolMolds = await db.Queryable().SingleAsync(x => x.id == prdMoTask.mold_id); - if (toolMolds != null && toolMolds?.mold_cavity > 0 && processStandardsH != null && - processStandardsH?.moulding_cycle > 0) - { - decimal? addTime = ((((prdMoTask.scheduled_qty - input.reported_qty - (prdMoTask.scrap_qty ?? 0)) * processStandardsH?.moulding_cycle) - 1) / toolMolds.mold_cavity) + 1; - if (prdMoTask.act_start_date != null && addTime != null && addTime > 0) - { - DateTime cal_plan_end_date = prdMoTask.act_start_date.Value.AddSeconds((double)addTime); - _ = await db.Updateable() - .SetColumns(x => x.plan_end_date == cal_plan_end_date) - .Where(x => x.id == input.mo_task_id).ExecuteCommandAsync(); - } - } + // ToolMolds toolMolds = await db.Queryable().SingleAsync(x => x.id == prdMoTask.mold_id); + // if (toolMolds != null && toolMolds?.mold_cavity > 0 && processStandardsH != null && + // processStandardsH?.moulding_cycle > 0) + // { + // decimal? addTime = ((((prdMoTask.scheduled_qty - input.reported_qty - (prdMoTask.scrap_qty ?? 0)) * processStandardsH?.moulding_cycle) - 1) / toolMolds.mold_cavity) + 1; + // if (prdMoTask.act_start_date != null && addTime != null && addTime > 0) + // { + // DateTime cal_plan_end_date = prdMoTask.act_start_date.Value.AddSeconds((double)addTime); + // _ = await db.Updateable() + // .SetColumns(x => x.plan_end_date == cal_plan_end_date) + // .Where(x => x.id == input.mo_task_id).ExecuteCommandAsync(); + // } + // } } if (prdMoTask.schedule_type == 2 && !string.IsNullOrEmpty(prdMoTask.mbom_process_id)) @@ -1752,7 +1751,7 @@ namespace Tnb.ProductionMgr // return resultMsg == "true" ? (dynamic)true : throw Oops.Bah(resultMsg); return true; } - + if (arr.Length > 0 && arr.Contains("CGJCJ"))//短管挤出件入库申请 { string resultMsg = await _prdInstockService.InstockTubeThree(report); @@ -1831,18 +1830,18 @@ namespace Tnb.ProductionMgr #region 质检模块 //质检模块 - TriggerPlanEntity entity = new() - { - materialid = prdMoTask.material_id, - processid = prdMoTask.process_id, - workid = prdMoTask.workstation_id - }; - int? reported = prdMoTask.reported_work_qty == null ? 0 : prdMoTask.reported_work_qty; - int? scrap = prdMoTask.scrap_qty == null ? 0 : prdMoTask.scrap_qty; - entity.oldpronum = reported + scrap; - entity.newpronum = input.scrap_qty; - entity.triggerevent = EnumTriggerEvent.生产检定量; - await _qcCheckPlanService.CreateTask(entity); + // TriggerPlanEntity entity = new() + // { + // materialid = prdMoTask.material_id, + // processid = prdMoTask.process_id, + // workid = prdMoTask.workstation_id + // }; + // int? reported = prdMoTask.reported_work_qty == null ? 0 : prdMoTask.reported_work_qty; + // int? scrap = prdMoTask.scrap_qty == null ? 0 : prdMoTask.scrap_qty; + // entity.oldpronum = reported + scrap; + // entity.newpronum = input.scrap_qty; + // entity.triggerevent = EnumTriggerEvent.生产检定量; + // await _qcCheckPlanService.CreateTask(entity); #endregion _ = await db.Updateable().SetColumns(it => new PrdMoTask { scrap_qty = scrapQty.Value }).Where(it => it.id == input.mo_task_id).ExecuteCommandAsync(); } @@ -1879,24 +1878,24 @@ namespace Tnb.ProductionMgr if (prdMoTask.schedule_type == 1) { - PerProcessStandardsH processStandardsH = await db.Queryable() - .Where(x => x.equip_id == prdMoTask.eqp_id && x.molds_id == prdMoTask.mold_id && - x.output_material_id == prdMoTask.material_id && x.enabled == 1) - .OrderByDescending(x => x.create_time).FirstAsync(); - - ToolMolds toolMolds = await db.Queryable().SingleAsync(x => x.id == prdMoTask.mold_id); - if (toolMolds != null && toolMolds?.mold_cavity > 0 && processStandardsH != null && - processStandardsH?.moulding_cycle > 0) - { - decimal? addTime = ((((prdMoTask.scheduled_qty - prdMoTask.reported_work_qty - input.scrap_qty) * processStandardsH?.moulding_cycle) - 1) / toolMolds.mold_cavity) + 1; - if (prdMoTask.act_start_date != null && addTime != null && addTime > 0) - { - DateTime cal_plan_end_date = prdMoTask.act_start_date.Value.AddSeconds((double)addTime); - _ = await db.Updateable() - .SetColumns(x => x.plan_end_date == cal_plan_end_date) - .Where(x => x.id == input.mo_task_id).ExecuteCommandAsync(); - } - } + // PerProcessStandardsH processStandardsH = await db.Queryable() + // .Where(x => x.equip_id == prdMoTask.eqp_id && x.molds_id == prdMoTask.mold_id && + // x.output_material_id == prdMoTask.material_id && x.enabled == 1) + // .OrderByDescending(x => x.create_time).FirstAsync(); + // + // ToolMolds toolMolds = await db.Queryable().SingleAsync(x => x.id == prdMoTask.mold_id); + // if (toolMolds != null && toolMolds?.mold_cavity > 0 && processStandardsH != null && + // processStandardsH?.moulding_cycle > 0) + // { + // decimal? addTime = ((((prdMoTask.scheduled_qty - prdMoTask.reported_work_qty - input.scrap_qty) * processStandardsH?.moulding_cycle) - 1) / toolMolds.mold_cavity) + 1; + // if (prdMoTask.act_start_date != null && addTime != null && addTime > 0) + // { + // DateTime cal_plan_end_date = prdMoTask.act_start_date.Value.AddSeconds((double)addTime); + // _ = await db.Updateable() + // .SetColumns(x => x.plan_end_date == cal_plan_end_date) + // .Where(x => x.id == input.mo_task_id).ExecuteCommandAsync(); + // } + // } } else { @@ -2179,53 +2178,53 @@ namespace Tnb.ProductionMgr /// /// /// - [HttpPost] - public async Task GetEstimatedEndTime(CountEstimatedEndTimeInput input) - { - ISqlSugarClient db = _repository.AsSugarClient(); - if (input.type == 1) - { - PerProcessStandardsH processStandardsH = await db.Queryable() - .Where(x => x.equip_id == input.equip_id && x.molds_id == input.molds_id && - x.output_material_id == input.material_id && x.enabled == 1) - .OrderByDescending(x => x.create_time).FirstAsync(); - - ToolMolds toolMolds = await db.Queryable().SingleAsync(x => x.id == input.molds_id); - if (toolMolds == null) - { - throw Oops.Bah("没找到模具"); - } - - if (toolMolds?.mold_cavity <= 0) - { - throw Oops.Bah("模穴数错误"); - } - - if (processStandardsH == null) - { - throw Oops.Bah("工艺标准成型周期错误"); - } - - if (processStandardsH?.moulding_cycle <= 0) - { - throw Oops.Bah("工艺标准成型周期错误"); - } - - decimal? addTime = (((input.scheduled_qty * processStandardsH?.moulding_cycle) - 1) / toolMolds.mold_cavity) + 1; - return input.estimated_start_date.AddSeconds((double)addTime.Value).ToString("yyyy-MM-dd HH:mm:ss"); - } - else - { - List list = await db.Queryable() - .LeftJoin((a, b) => a.process_id == b.process_id && b.enabled == 1) - .Where((a, b) => a.mbom_id == input.mbom_id).Select((a, b) => b).ToListAsync(); - - decimal max = list.Select(x => Convert.ToDecimal(x.standard_time)).Max(x => x); - decimal? addTime = input.scheduled_qty * max; - return input.estimated_start_date.AddSeconds((double)addTime.Value).ToString("yyyy-MM-dd HH:mm:ss"); - } - - } + // [HttpPost] + // public async Task GetEstimatedEndTime(CountEstimatedEndTimeInput input) + // { + // ISqlSugarClient db = _repository.AsSugarClient(); + // if (input.type == 1) + // { + // PerProcessStandardsH processStandardsH = await db.Queryable() + // .Where(x => x.equip_id == input.equip_id && x.molds_id == input.molds_id && + // x.output_material_id == input.material_id && x.enabled == 1) + // .OrderByDescending(x => x.create_time).FirstAsync(); + // + // ToolMolds toolMolds = await db.Queryable().SingleAsync(x => x.id == input.molds_id); + // if (toolMolds == null) + // { + // throw Oops.Bah("没找到模具"); + // } + // + // if (toolMolds?.mold_cavity <= 0) + // { + // throw Oops.Bah("模穴数错误"); + // } + // + // if (processStandardsH == null) + // { + // throw Oops.Bah("工艺标准成型周期错误"); + // } + // + // if (processStandardsH?.moulding_cycle <= 0) + // { + // throw Oops.Bah("工艺标准成型周期错误"); + // } + // + // decimal? addTime = (((input.scheduled_qty * processStandardsH?.moulding_cycle) - 1) / toolMolds.mold_cavity) + 1; + // return input.estimated_start_date.AddSeconds((double)addTime.Value).ToString("yyyy-MM-dd HH:mm:ss"); + // } + // else + // { + // List list = await db.Queryable() + // .LeftJoin((a, b) => a.process_id == b.process_id && b.enabled == 1) + // .Where((a, b) => a.mbom_id == input.mbom_id).Select((a, b) => b).ToListAsync(); + // + // decimal max = list.Select(x => Convert.ToDecimal(x.standard_time)).Max(x => x); + // decimal? addTime = input.scheduled_qty * max; + // return input.estimated_start_date.AddSeconds((double)addTime.Value).ToString("yyyy-MM-dd HH:mm:ss"); + // } + // + // } /// @@ -2766,7 +2765,7 @@ namespace Tnb.ProductionMgr return prdMoTask; } - + /// /// 根据工位获取进行中待开工暂停的任务单信息 /// @@ -2781,8 +2780,8 @@ namespace Tnb.ProductionMgr throw Oops.Bah("工位错误"); } - List list = await _db.Queryable().Where(x => x.workstation_id == station_id && x.parent_id != null && (x.mo_task_status == DictConst.InProgressEnCode || x.mo_task_status == DictConst.ToBeStartedEnCode || x.mo_task_status == DictConst.MoStatusPauseCode )).ToListAsync(); - if (list != null && list.Count>0) + List list = await _db.Queryable().Where(x => x.workstation_id == station_id && x.parent_id != null && (x.mo_task_status == DictConst.InProgressEnCode || x.mo_task_status == DictConst.ToBeStartedEnCode || x.mo_task_status == DictConst.MoStatusPauseCode)).ToListAsync(); + if (list != null && list.Count > 0) { foreach (var prdMoTask in list) { @@ -2793,7 +2792,7 @@ namespace Tnb.ProductionMgr return list; } - + /// /// 外包装根据工位id获取喷码数据 /// @@ -2809,7 +2808,7 @@ namespace Tnb.ProductionMgr if (prdMoTask == null) throw Oops.Bah("没找到对应任务单"); if (await _db.Queryable().Where(x => - x.mo_task_code == prdMoTask.mo_task_code && x.status == "0" && x.is_label == 0 && x.is_mark==null).AnyAsync()) + x.mo_task_code == prdMoTask.mo_task_code && x.status == "0" && x.is_label == 0 && x.is_mark == null).AnyAsync()) { await _db.Updateable() .SetColumns(x => x.is_mark == 0) @@ -2832,10 +2831,10 @@ namespace Tnb.ProductionMgr } PrdMoTask parent = await _db.Queryable().SingleAsync(x => x.id == prdMoTask.parent_id); - BasMaterial basMaterial = await _db.Queryable().SingleAsync(x=>x.id==parent.material_id); + BasMaterial basMaterial = await _db.Queryable().SingleAsync(x => x.id == parent.material_id); + + string code = $"(01){basMaterial.di ?? ""}\\n(11){DateTime.Now.ToString("yyMMdd")}\\n(17){DateTime.Now.AddMonths(basMaterial.quality_guarantee_period ?? 0).ToString("yyMMdd")}\\n(10){parent.batch ?? ""}"; - string code = $"(01){basMaterial.di ?? ""}\\n(11){DateTime.Now.ToString("yyMMdd")}\\n(17){DateTime.Now.AddMonths(basMaterial.quality_guarantee_period ?? 0).ToString("yyMMdd")}\\n(10){parent.batch??""}"; - return code; } @@ -2852,9 +2851,9 @@ namespace Tnb.ProductionMgr { "station_id", input.station_id } }); if (prdMoTask == null) throw Oops.Bah("没找到对应任务单"); - + if (await _db.Queryable().Where(x => - x.mo_task_code == prdMoTask.mo_task_code && x.status == "0" && x.is_label == null && x.is_mark==0).AnyAsync()) + x.mo_task_code == prdMoTask.mo_task_code && x.status == "0" && x.is_label == null && x.is_mark == 0).AnyAsync()) { await _db.Updateable() .SetColumns(x => x.is_label == 0) @@ -2875,12 +2874,12 @@ namespace Tnb.ProductionMgr await _db.Insertable(prdOutPackMarkLabel).ExecuteCommandAsync(); } - - PrdMoTask parent = await _db.Queryable().SingleAsync(x => x.id == prdMoTask.parent_id); - BasMaterial basMaterial = await _db.Queryable().SingleAsync(x=>x.id==parent.material_id); - string code = $"(01){basMaterial.di ?? ""}\\n(11){DateTime.Now.ToString("yyMMdd")}\\n(17){DateTime.Now.AddMonths(basMaterial.quality_guarantee_period ?? 0).ToString("yyMMdd")}\\n(10){parent.batch??""}"; - + PrdMoTask parent = await _db.Queryable().SingleAsync(x => x.id == prdMoTask.parent_id); + BasMaterial basMaterial = await _db.Queryable().SingleAsync(x => x.id == parent.material_id); + + string code = $"(01){basMaterial.di ?? ""}\\n(11){DateTime.Now.ToString("yyMMdd")}\\n(17){DateTime.Now.AddMonths(basMaterial.quality_guarantee_period ?? 0).ToString("yyMMdd")}\\n(10){parent.batch ?? ""}"; + return code; } } diff --git a/ProductionMgr/Tnb.ProductionMgr/PrdOutstockService.cs b/ProductionMgr/Tnb.ProductionMgr/PrdOutstockService.cs index a616d988..41c2048d 100644 --- a/ProductionMgr/Tnb.ProductionMgr/PrdOutstockService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/PrdOutstockService.cs @@ -45,7 +45,7 @@ namespace Tnb.ProductionMgr private readonly IBillRullService _billRullService; public OverideVisualDevFunc OverideFuncs { get; } = new OverideVisualDevFunc(); - public PrdOutstockService(ISqlSugarRepository repository, IOrganizeService organizeService, IBillRullService billRullService, IRunService runService, IUserManager userManager, IVisualDevService visualDevService, IDictionaryDataService dictionaryDataService) + public PrdOutstockService(ISqlSugarRepository repository, IOrganizeService organizeService, IBillRullService billRullService,IRunService runService, IUserManager userManager, IVisualDevService visualDevService, IDictionaryDataService dictionaryDataService) { _db = repository.AsSugarClient(); _runService = runService; @@ -98,7 +98,7 @@ namespace Tnb.ProductionMgr string domain = _userManager.Domain; Dictionary header = new() { - ["Authorization"] = App.HttpContext != null ? App.HttpContext.Request.Headers["Authorization"] : "" + ["Authorization"] = App.HttpContext!=null ? App.HttpContext.Request.Headers["Authorization"] : "" }; string sendResult = HttpUtils.RequestPost(domain + WebApiConst.MES_CREATE_OUTSTOCK, JsonConvert.SerializeObject(input), header); Log.Information(sendResult); @@ -190,7 +190,7 @@ namespace Tnb.ProductionMgr string domain = _userManager.Domain; Dictionary header = new() { - ["Authorization"] = App.HttpContext != null ? App.HttpContext.Request.Headers["Authorization"] : "" + ["Authorization"] = App.HttpContext!=null ? App.HttpContext.Request.Headers["Authorization"] : "" }; string sendResult = HttpUtils.RequestPost(domain + WebApiConst.MES_CREATE_OUTSTOCK, JsonConvert.SerializeObject(input), header); Log.Information(sendResult); @@ -266,12 +266,12 @@ namespace Tnb.ProductionMgr MESCreateOutstockInput input = new MESCreateOutstockInput(); input.outstock = new MESWmsOutstockHInput(); input.outstockDs = new List(); - - PrdMoTask prdMoTask = await db.Queryable().SingleAsync(x => x.id == materialOutstockInput.mo_task_id); - BasLocation location = await db.Queryable().Where(x => x.location_code == materialOutstockInput.location_code).FirstAsync(); + + PrdMoTask prdMoTask = await db.Queryable().SingleAsync(x=>x.id==materialOutstockInput.mo_task_id); + BasLocation location = await db.Queryable().Where(x=>x.location_code==materialOutstockInput.location_code).FirstAsync(); if (location == null) throw Oops.Bah("未找到库位"); string locationId = location.id; - + PrdOutstockH prdOutstockH = new() { bill_code = await _billRullService.GetBillNumber(CodeTemplateConst.PRDOUTSTOCK_CODE), @@ -287,17 +287,17 @@ namespace Tnb.ProductionMgr input.outstock.source_code = prdOutstockH.bill_code; input.outstock.source_id = prdOutstockH.id; OrganizeEntity workline = await _organizeService.GetAnyParentByWorkstationId(materialOutstockInput.workstation_id, DictConst.RegionCategoryWorklineCode); - + List materialIds = materialOutstockInput.details.Select(x => x.material_id).ToList(); - List basMaterials = await db.Queryable().Where(x => materialIds.Contains(x.id)).ToListAsync(); - Dictionary unitIdDic = await db.Queryable() + List basMaterials = await db.Queryable().Where(x=>materialIds.Contains(x.id)).ToListAsync(); + Dictionary unitIdDic = await db.Queryable() .LeftJoin((a, b) => b.EnCode == DictConst.MeasurementUnit) .LeftJoin((a, b, c) => b.Id == c.DictionaryTypeId && a.unit_id == c.EnCode) - .Where((a, b, c) => materialIds.Contains(a.id)) - .Select((a, b, c) => new + .Where((a,b,c)=>materialIds.Contains(a.id)) + .Select((a, b, c) => new { key = a.id, - value = c.Id + value = c.Id }) .ToDictionaryAsync(x => x.key, x => x.value); @@ -306,18 +306,18 @@ namespace Tnb.ProductionMgr input.outstockDs.Add(new MESWmsOutstockDInput() { material_id = item.material_id, - material_code = basMaterials.First(x => x.id == item.material_id).code, + material_code = basMaterials.First(x=>x.id==item.material_id).code, pr_qty = item.num, unit_id = unitIdDic[item.material_id].ToString() }); } - + string domain = _userManager.Domain; Dictionary header = new Dictionary() { - ["Authorization"] = App.HttpContext != null ? App.HttpContext.Request.Headers["Authorization"] : "" + ["Authorization"] = App.HttpContext!=null ? App.HttpContext.Request.Headers["Authorization"] : "" }; - var sendResult = HttpUtils.RequestPost(domain + WebApiConst.MES_CREATE_OUTSTOCK, JsonConvert.SerializeObject(input), header); + var sendResult = HttpUtils.RequestPost(domain + WebApiConst.MES_CREATE_OUTSTOCK,JsonConvert.SerializeObject(input),header); Log.Information(sendResult); AuthResponse authResponse = JsonConvert.DeserializeObject(sendResult); @@ -346,16 +346,16 @@ namespace Tnb.ProductionMgr prdOutstockDs.Add(new PrdOutstockD() { material_id = item.material_id, - material_code = basMaterials.First(x => x.id == item.material_id).code, - material_name = basMaterials.First(x => x.id == item.material_id).name, + material_code = basMaterials.First(x=>x.id==item.material_id).code, + material_name = basMaterials.First(x=>x.id==item.material_id).name, pr_qty = item.num, unit_id = unitIdDic[item.material_id].ToString(), outstock_id = prdOutstockH.id, source_id = prdMoTask.mo_task_code }); } - - DbResult result = await _repository.AsSugarClient().Ado.UseTranAsync(async () => + + DbResult result = await _repository.AsSugarClient().Ado.UseTranAsync(async () => { await _repository.InsertAsync(prdOutstockH); if (prdOutstockDs.Count > 0) @@ -379,132 +379,5 @@ namespace Tnb.ProductionMgr throw Oops.Bah(e.Message); } } - - - [HttpPost] - public async Task MaterialOutstockTest(MaterialOutstockInput materialOutstockInput) - { - try - { - var db = _repository.AsSugarClient(); - string warehouse_id = "1";//一楼原材料仓 - - MESCreateOutstockInput input = new MESCreateOutstockInput(); - input.outstock = new MESWmsOutstockHInput(); - input.outstockDs = new List(); - - BasLocation location = await db.Queryable().Where(x => x.location_code == materialOutstockInput.location_code).FirstAsync(); - if (location == null) throw new AppFriendlyException("未找到库位", 500); - string locationId = location.id; - - PrdOutstockH prdOutstockH = new() - { - bill_code = await _billRullService.GetBillNumber(CodeTemplateConst.PRDOUTSTOCK_CODE), - }; - - input.outstock.bill_type = DictConst.SHENGCHANLINGLIAO; - // input.outstock.bill_date = visualDevModelDataCrInput.data.ContainsKey("bill_date") ? Convert.ToDateTime(visualDevModelDataCrInput.data["bill_date"].ToString()) : DateTime.Now; - input.outstock.bill_date = DateTime.Now; - input.outstock.org_id = _userManager.GetUserInfo().Result.organizeId; - input.outstock.warehouse_id = warehouse_id; - input.outstock.create_id = _userManager.UserId; - input.outstock.location_code = location?.location_code ?? ""; - input.outstock.source_code = prdOutstockH.bill_code; - input.outstock.source_id = prdOutstockH.id; - OrganizeEntity workline = await _organizeService.GetAnyParentByWorkstationId(materialOutstockInput.workstation_id, DictConst.RegionCategoryWorklineCode); - - List materialIds = materialOutstockInput.details.Select(x => x.material_id).ToList(); - List basMaterials = await db.Queryable().Where(x => materialIds.Contains(x.id)).ToListAsync(); - Dictionary unitIdDic = await db.Queryable() - .LeftJoin((a, b) => b.EnCode == DictConst.MeasurementUnit) - .LeftJoin((a, b, c) => b.Id == c.DictionaryTypeId && a.unit_id == c.EnCode) - .Where((a, b, c) => materialIds.Contains(a.id)) - .Select((a, b, c) => new - { - key = a.id, - value = c.Id - }) - .ToDictionaryAsync(x => x.key, x => x.value); - - foreach (var item in materialOutstockInput.details) - { - input.outstockDs.Add(new MESWmsOutstockDInput() - { - material_id = item.material_id, - material_code = basMaterials.First(x => x.id == item.material_id).code, - pr_qty = item.num, - unit_id = unitIdDic[item.material_id].ToString() - }); - } - - string domain = _userManager.Domain; - Dictionary header = new Dictionary() - { - ["Authorization"] = App.HttpContext != null ? App.HttpContext.Request.Headers["Authorization"] : "" - }; - var sendResult = HttpUtils.RequestPost(domain + WebApiConst.MES_CREATE_OUTSTOCK, JsonConvert.SerializeObject(input), header); - Log.Information(sendResult); - - AuthResponse authResponse = JsonConvert.DeserializeObject(sendResult); - if (authResponse.code != 200) - { - throw new AppFriendlyException(authResponse.msg, 500); - - } - else - { - prdOutstockH.bill_type = DictConst.SHENGCHANLINGLIAO; - prdOutstockH.type = "2"; - prdOutstockH.warehouse_id = warehouse_id; - prdOutstockH.location_code = materialOutstockInput.location_code; - prdOutstockH.create_id = _userManager.UserId; - prdOutstockH.org_id = _userManager.GetUserInfo().Result.organizeId; - prdOutstockH.bill_date = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); - prdOutstockH.create_time = DateTime.Now; - prdOutstockH.workstation_id = materialOutstockInput.workstation_id; - prdOutstockH.workline = workline?.Id ?? ""; - prdOutstockH.status = DictConst.OUTSTOCKSTATUSADD; - prdOutstockH.mo_task_id = ""; - - List prdOutstockDs = new List(); - foreach (var item in materialOutstockInput.details) - { - prdOutstockDs.Add(new PrdOutstockD() - { - material_id = item.material_id, - material_code = basMaterials.First(x => x.id == item.material_id).code, - material_name = basMaterials.First(x => x.id == item.material_id).name, - pr_qty = item.num, - unit_id = unitIdDic[item.material_id].ToString(), - outstock_id = prdOutstockH.id, - source_id = "" - }); - } - - DbResult result = await _repository.AsSugarClient().Ado.UseTranAsync(async () => - { - await _repository.InsertAsync(prdOutstockH); - if (prdOutstockDs.Count > 0) - { - await db.Insertable(prdOutstockDs).ExecuteCommandAsync(); - } - }); - - if (!result.IsSuccess) - { - throw new AppFriendlyException(result.ErrorMessage, 500); - - } - - } - return await Task.FromResult(true); - } - catch (Exception e) - { - Log.Error(e.Message); - throw new AppFriendlyException(e.Message, 500); - } - } } -} - \ No newline at end of file +} \ No newline at end of file diff --git a/ProductionMgr/Tnb.ProductionMgr/PrdPackReportService.cs b/ProductionMgr/Tnb.ProductionMgr/PrdPackReportService.cs index 8f442b57..578971a1 100644 --- a/ProductionMgr/Tnb.ProductionMgr/PrdPackReportService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/PrdPackReportService.cs @@ -14,7 +14,6 @@ using SqlSugar; using Tnb.BasicData; using Tnb.BasicData.Entities; using Tnb.EquipMgr.Entities; -using Tnb.PerMgr.Entities; using Tnb.ProductionMgr.Entities; using Tnb.ProductionMgr.Entities.Dto.PrdManage; using Tnb.ProductionMgr.Entities.Entity; @@ -362,122 +361,122 @@ namespace Tnb.ProductionMgr return PageResult.SqlSugarPageResult(result); } - /// - /// pda端根据工位获取任务单列表 - /// - /// - [HttpPost] - public async Task GetPadPrdMoTaskList(PrdMoTaskListOutput input) - { - if (string.IsNullOrEmpty(input.stationId)) - { - return new - { - pagination = new PageResult(), - list = Array.Empty() - }; - } - - Dictionary queryJson = string.IsNullOrEmpty(input.queryJson) ? new Dictionary() : input.queryJson.ToObject>(); - string? mo_task_code = queryJson.ContainsKey("mo_task_code") ? queryJson["mo_task_code"].ToString() : ""; - string? status = queryJson.ContainsKey("status") ? queryJson["status"].ToString() : ""; - DateTime? start_time = queryJson.ContainsKey("start_time") ? queryJson["start_time"].ToString() == "" ? null : Convert.ToDateTime(queryJson["start_time"]) : null; - DateTime? end_time = queryJson.ContainsKey("end_time") ? queryJson["end_time"].ToString() == "" ? null : Convert.ToDateTime(queryJson["end_time"]) : null; - List statusList = new(); - if (!string.IsNullOrEmpty(status)) - { - switch (status) - { - case "1": - statusList.Add(DictConst.InProgressEnCode); - statusList.Add(DictConst.MoStatusPauseCode); - break; - case "2": - statusList.Add(DictConst.ToBeScheduledEncode); - statusList.Add(DictConst.ToBeStartedEnCode); - break; - case "3": - statusList.Add(DictConst.ComplatedEnCode); - statusList.Add(DictConst.ClosedEnCode); - break; - } - } - // string mo_task_status = queryJson.ContainsKey("mo_task_status") ? queryJson["mo_task_status"].ToString() : ""; - if (string.IsNullOrEmpty(input.sidx)) - { - input.sidx = "create_time"; - input.sort = "desc"; - } - - SqlSugarPagedList result = await _db.Queryable() - .LeftJoin((a, b) => a.material_id == b.id) - .LeftJoin((a, b, c) => a.process_id == c.id) - .LeftJoin((a, b, c, d) => a.workline_id == d.Id) - .LeftJoin((a, b, c, d, e) => e.DictionaryTypeId == DictConst.PrdTaskStatusTypeId && a.mo_task_status == e.EnCode) - .LeftJoin((a, b, c, d, e, f) => a.eqp_id == f.id) - .LeftJoin((a, b, c, d, e, f, g) => a.mold_id == g.id) - .LeftJoin((a, b, c, d, e, f, g, h) => a.material_id == h.output_material_id && a.eqp_id == h.equip_id && a.mold_id == h.molds_id && h.enabled == 1) - .LeftJoin((a, b, c, d, e, f, g, h, i) => a.process_id == i.process_id && i.enabled == 1) - .LeftJoin((a, b, c, d, e, f, g, h, i, j) => a.mo_id == j.id) - .LeftJoin((a, b, c, d, e, f, g, h, i, j, k) => a.material_id == k.material_id && k.auxiliary_unit_id == "kg") - .LeftJoin((a, b, c, d, e, f, g, h, i, j, k, l) => a.eqp_id == l.equip_id && l.enabled == 1 && l.label_point == "注塑空满箱请求") - .Where((a, b) => a.workstation_id == input.stationId) - .WhereIF(!string.IsNullOrEmpty(mo_task_code), a => a.mo_task_code.Contains(mo_task_code)) - //.WhereIF(!string.IsNullOrEmpty(mo_task_status),a=>a.mo_task_status==mo_task_status) - .WhereIF(statusList.Count > 0, a => statusList.Contains(a.mo_task_status)) - .WhereIF(status == "3" && start_time != null, a => a.act_end_date >= start_time) - .WhereIF(status == "3" && end_time != null, a => a.act_end_date <= end_time) - .Select((a, b, c, d, e, f, g, h, i, j, k, l) => new PADPackageTaskPageOutput - { - id = a.id, - mo_task_code = a.mo_task_code, - mo_id = a.mo_id, - mo_code = j.mo_code, - material_id = a.material_id, - material_code = b.code, - material_name = b.name, - workline_id = a.workline_id, - workline_name = d.FullName, - bom_id = a.bom_id, - mo_task_status = e.FullName, - complete_qty = SqlFunc.IsNull(a.reported_work_qty, 0) + SqlFunc.IsNull(a.scrap_qty, 0), - scrap_qty = a.scrap_qty, - scheduled_qty = a.scheduled_qty, - reported_work_qty = a.reported_work_qty, - estimated_start_date = a.estimated_start_date == null ? "" : a.estimated_start_date.Value.ToString(DbTimeFormat.SS), - estimated_end_date = a.estimated_end_date == null ? "" : a.estimated_end_date.Value.ToString(DbTimeFormat.SS), - parent_id = a.parent_id, - process_id = a.process_id, - process_name = c.process_name, - mbom_process_id = a.mbom_process_id, - create_time = a.create_time, - equip_id = a.eqp_id, - equip_code = f.code, - equip_name = f.name, - mold_id = a.mold_id, - mold_code = g.mold_code, - mold_name = g.mold_name, - schedule_type = a.schedule_type, - mold_cavity = g.mold_cavity, - moulding_cycle = h.moulding_cycle, - standard_time = i.standard_time, - act_start_date = a.act_start_date == null ? "" : a.act_start_date.Value.ToString(DbTimeFormat.SS), - act_end_date = a.act_end_date == null ? "" : a.act_end_date.Value.ToString(DbTimeFormat.SS), - plan_end_date = a.plan_end_date == null ? "" : a.plan_end_date.Value.ToString(DbTimeFormat.SS), - minpacking = b.minpacking, - main_num = k.number_of_primary_unit, - deputy_num = k.number_of_auxiliary_unit, - third_equip_code = l.equip_code, - weight_name = l.label_name, - category_id = b.category_id - }) - .MergeTable() - .OrderBy($"{input.sidx} {input.sort}") - .ToPagedListAsync(input.currentPage, input.pageSize); - - return PageResult.SqlSugarPageResult(result); - - } + // /// + // /// pda端根据工位获取任务单列表 + // /// + // /// + // [HttpPost] + // public async Task GetPadPrdMoTaskList(PrdMoTaskListOutput input) + // { + // if (string.IsNullOrEmpty(input.stationId)) + // { + // return new + // { + // pagination = new PageResult(), + // list = Array.Empty() + // }; + // } + // + // Dictionary queryJson = string.IsNullOrEmpty(input.queryJson) ? new Dictionary() : input.queryJson.ToObject>(); + // string? mo_task_code = queryJson.ContainsKey("mo_task_code") ? queryJson["mo_task_code"].ToString() : ""; + // string? status = queryJson.ContainsKey("status") ? queryJson["status"].ToString() : ""; + // DateTime? start_time = queryJson.ContainsKey("start_time") ? queryJson["start_time"].ToString() == "" ? null : Convert.ToDateTime(queryJson["start_time"]) : null; + // DateTime? end_time = queryJson.ContainsKey("end_time") ? queryJson["end_time"].ToString() == "" ? null : Convert.ToDateTime(queryJson["end_time"]) : null; + // List statusList = new(); + // if (!string.IsNullOrEmpty(status)) + // { + // switch (status) + // { + // case "1": + // statusList.Add(DictConst.InProgressEnCode); + // statusList.Add(DictConst.MoStatusPauseCode); + // break; + // case "2": + // statusList.Add(DictConst.ToBeScheduledEncode); + // statusList.Add(DictConst.ToBeStartedEnCode); + // break; + // case "3": + // statusList.Add(DictConst.ComplatedEnCode); + // statusList.Add(DictConst.ClosedEnCode); + // break; + // } + // } + // // string mo_task_status = queryJson.ContainsKey("mo_task_status") ? queryJson["mo_task_status"].ToString() : ""; + // if (string.IsNullOrEmpty(input.sidx)) + // { + // input.sidx = "create_time"; + // input.sort = "desc"; + // } + // + // SqlSugarPagedList result = await _db.Queryable() + // .LeftJoin((a, b) => a.material_id == b.id) + // .LeftJoin((a, b, c) => a.process_id == c.id) + // .LeftJoin((a, b, c, d) => a.workline_id == d.Id) + // .LeftJoin((a, b, c, d, e) => e.DictionaryTypeId == DictConst.PrdTaskStatusTypeId && a.mo_task_status == e.EnCode) + // .LeftJoin((a, b, c, d, e, f) => a.eqp_id == f.id) + // .LeftJoin((a, b, c, d, e, f, g) => a.mold_id == g.id) + // .LeftJoin((a, b, c, d, e, f, g, h) => a.material_id == h.output_material_id && a.eqp_id == h.equip_id && a.mold_id == h.molds_id && h.enabled == 1) + // .LeftJoin((a, b, c, d, e, f, g, h, i) => a.process_id == i.process_id && i.enabled == 1) + // .LeftJoin((a, b, c, d, e, f, g, h, i, j) => a.mo_id == j.id) + // .LeftJoin((a, b, c, d, e, f, g, h, i, j, k) => a.material_id == k.material_id && k.auxiliary_unit_id == "kg") + // .LeftJoin((a, b, c, d, e, f, g, h, i, j, k, l) => a.eqp_id == l.equip_id && l.enabled == 1 && l.label_point == "注塑空满箱请求") + // .Where((a, b) => a.workstation_id == input.stationId) + // .WhereIF(!string.IsNullOrEmpty(mo_task_code), a => a.mo_task_code.Contains(mo_task_code)) + // //.WhereIF(!string.IsNullOrEmpty(mo_task_status),a=>a.mo_task_status==mo_task_status) + // .WhereIF(statusList.Count > 0, a => statusList.Contains(a.mo_task_status)) + // .WhereIF(status == "3" && start_time != null, a => a.act_end_date >= start_time) + // .WhereIF(status == "3" && end_time != null, a => a.act_end_date <= end_time) + // .Select((a, b, c, d, e, f, g, h, i, j, k, l) => new PADPackageTaskPageOutput + // { + // id = a.id, + // mo_task_code = a.mo_task_code, + // mo_id = a.mo_id, + // mo_code = j.mo_code, + // material_id = a.material_id, + // material_code = b.code, + // material_name = b.name, + // workline_id = a.workline_id, + // workline_name = d.FullName, + // bom_id = a.bom_id, + // mo_task_status = e.FullName, + // complete_qty = SqlFunc.IsNull(a.reported_work_qty, 0) + SqlFunc.IsNull(a.scrap_qty, 0), + // scrap_qty = a.scrap_qty, + // scheduled_qty = a.scheduled_qty, + // reported_work_qty = a.reported_work_qty, + // estimated_start_date = a.estimated_start_date == null ? "" : a.estimated_start_date.Value.ToString(DbTimeFormat.SS), + // estimated_end_date = a.estimated_end_date == null ? "" : a.estimated_end_date.Value.ToString(DbTimeFormat.SS), + // parent_id = a.parent_id, + // process_id = a.process_id, + // process_name = c.process_name, + // mbom_process_id = a.mbom_process_id, + // create_time = a.create_time, + // equip_id = a.eqp_id, + // equip_code = f.code, + // equip_name = f.name, + // mold_id = a.mold_id, + // mold_code = g.mold_code, + // mold_name = g.mold_name, + // schedule_type = a.schedule_type, + // mold_cavity = g.mold_cavity, + // moulding_cycle = h.moulding_cycle, + // standard_time = i.standard_time, + // act_start_date = a.act_start_date == null ? "" : a.act_start_date.Value.ToString(DbTimeFormat.SS), + // act_end_date = a.act_end_date == null ? "" : a.act_end_date.Value.ToString(DbTimeFormat.SS), + // plan_end_date = a.plan_end_date == null ? "" : a.plan_end_date.Value.ToString(DbTimeFormat.SS), + // minpacking = b.minpacking, + // main_num = k.number_of_primary_unit, + // deputy_num = k.number_of_auxiliary_unit, + // third_equip_code = l.equip_code, + // weight_name = l.label_name, + // category_id = b.category_id + // }) + // .MergeTable() + // .OrderBy($"{input.sidx} {input.sort}") + // .ToPagedListAsync(input.currentPage, input.pageSize); + // + // return PageResult.SqlSugarPageResult(result); + // + // } /// /// 上模校验 diff --git a/ProductionMgr/Tnb.ProductionMgr/RedisBackGround.cs b/ProductionMgr/Tnb.ProductionMgr/RedisBackGround.cs index e151de5a..43b82cbd 100644 --- a/ProductionMgr/Tnb.ProductionMgr/RedisBackGround.cs +++ b/ProductionMgr/Tnb.ProductionMgr/RedisBackGround.cs @@ -1,62 +1,39 @@ -using System; -using System.Data; -using System.Dynamic; -using System.Security.Policy; -using System.Text; -using Aop.Api.Domain; -using JNPF; +using Aop.Api.Domain; using JNPF.Common.Cache; -using JNPF.Common.Dtos.VisualDev; -using JNPF.FriendlyException; using Microsoft.Extensions.Hosting; -using Microsoft.Extensions.Logging; -using NetTaste; using Newtonsoft.Json; using Newtonsoft.Json.Linq; -using Qiniu.Util; using SqlSugar; -using Tnb.Common.Extension; using Tnb.Common.Redis; -using Tnb.Common.Utils; using Tnb.ProductionMgr.Entities; using Tnb.ProductionMgr.Entities.Dto; using Tnb.ProductionMgr.Entities.Enums; using Tnb.ProductionMgr.Interfaces; -using Tnb.WarehouseMgr.Entities; -using Tnb.WarehouseMgr.Entities.Configs; -using Tnb.WarehouseMgr.Entities.Consts; -using Tnb.WarehouseMgr.Interfaces; namespace Tnb.ProductionMgr { //redis定时获取数采数据 public class RedisBackGround : IHostedService, IDisposable { - private Timer? Readtimer; - private Timer? CheckGettimer; - private Timer? Scantimer; - private Timer? SSXcodetimer; + private Timer? Readtimer; private readonly RedisData _redisData; private readonly IPrdInstockService _prdInstockService; private readonly ISqlSugarRepository _repository; - private readonly IWmsPDAScanInStockService _wmsPDAScanInStock; - private readonly ElevatorControlConfiguration _eleCtlCfg = App.Configuration.Build(); - public RedisBackGround(RedisData redisData, IPrdInstockService prdInstockService, ISqlSugarRepository repository, IWmsPDAScanInStockService wmsPDAScanInStock) + public RedisBackGround(RedisData redisData, IPrdInstockService prdInstockService, ISqlSugarRepository repository) { _redisData = redisData; _prdInstockService = prdInstockService; - _repository = repository; - _wmsPDAScanInStock = wmsPDAScanInStock; + _repository = repository; } //获取redis数据 private void GetRedisData(object state) { - var _redisReadConfigs = _repository.AsQueryable().Where(p => p.enabled == 1).ToList(); + var _redisReadConfigs = _repository.AsQueryable().Where(p => p.enabled == 1).ToList(); foreach (var config in _redisReadConfigs) { try { - var json = _redisData.GetHash(config.dev_name!, config.tag_name!).Result; + var json= _redisData.GetHash(config.dev_name!, config.tag_name!).Result; JObject? res = JsonConvert.DeserializeObject(json); if (config.data_type == (int)DataType.INT) { @@ -74,7 +51,7 @@ namespace Tnb.ProductionMgr } else if (config.check_type == (int)CheckType.包含) { - int[] ints = Array.ConvertAll(config.data!.Replace("[", "").Replace("]", "").Split(",", StringSplitOptions.RemoveEmptyEntries), int.Parse); + int[] ints= Array.ConvertAll(config.data!.Replace("[","").Replace("]","").Split(",",StringSplitOptions.RemoveEmptyEntries),int.Parse); if (ints.Contains(res.Value("Value"))) { InstockInput instockInput = new() @@ -124,258 +101,126 @@ namespace Tnb.ProductionMgr break; } } - //ctu取货 - private void CheckGet(object state) + //获取注塑装箱状态 + private void GetZSPackStatus(object state) { - Dictionary getdic = new Dictionary(); - getdic.Add("SSX-021-005", new string[] { "YTCS", "AllowFullOut_CS05", "LiftCode" }); - getdic.Add("SSX-011-002", new string[] { "YTCS", "AllowAgvFullIn_CS02", "Code_CS02" }); - getdic.Add("SSX-011-004", new string[] { "YTCS", "AllowCtuFullOut_CS04", "Code_CS04" }); - - getdic.Add("SSX-011-008", new string[] { "东面提升机输送线", "入库输送线8允许出箱", "入库输送线7条码" }); - - getdic.Add("SSX-111-011", new string[] { "东面提升机输送线", "下升降机11允许出箱", "下升降机11条码" }); - getdic.Add("SSX-111-012", new string[] { "东面提升机输送线", "下升降机12允许出箱", "下升降机12条码" }); - getdic.Add("ZSSSXCTU02", new string[] { "YTCS", "AllowAgvEmptyOut_CS03", "" }); - getdic.Add("ZSSSXCTU01", new string[] { "YTCS", "AllowAgvEmptyOut_CS01", "" }); - - - foreach (var key in getdic.Keys) + try { - try + string[] strs = new string[1] { "TY4C-ZHUSU1" }; + string sign = "agvMode"; + foreach (string s in strs) { - var strs = getdic.Where(p => p.Key == key).First().Value; - bool flag = _redisData.HashExist(strs[0], strs[1]).Result; - string data = _redisData.GetHash(strs[0], strs[1]).Result; - JObject? res = JsonConvert.DeserializeObject(data); - bool result = res != null && res["Value"] != null ? res.Value("Value") : false; - if (result) + Dictionary dic = _redisData.HGetAll(s).Result; + foreach (KeyValuePair kv in dic) { - if (!string.IsNullOrEmpty(strs[2])) + if (!kv.Key.Contains(sign)) { - string codedata = _redisData.GetHash(strs[0], strs[2]).Result; - JObject? coderes = JsonConvert.DeserializeObject(codedata); - string coderesult = coderes != null && coderes["Value"] != null ? coderes.Value("Value")! : ""; - coderesult = coderesult.Replace("\r", ""); - var DistaskH = _repository.AsSugarClient().Queryable().Where(p => p.carry_code == coderesult && p.status == WmsWareHouseConst.TASK_BILL_STATUS_YXD_ID && string.IsNullOrEmpty(p.extras)).First(); - if (DistaskH != null) - { - dynamic reqBody = new ExpandoObject(); - reqBody.taskCode = DistaskH.bill_code; - reqBody.slotCode = key; - reqBody.containerCode = coderesult; - CancellationTokenSource Ctu = new(); - dynamic respBody = HttpClientHelper.PostStreamAsync("http://192.168.11.104:1880/wcs/notify/cargo", reqBody, Ctu.Token).Result; - DistaskH.extras = respBody; - _repository.AsSugarClient().Updateable(DistaskH).ExecuteCommand(); - Ctu.Dispose(); - } + continue; } - else { - var DistaskH = _repository.AsSugarClient().Queryable().Where(p => p.startlocation_code == key && p.status == WmsWareHouseConst.TASK_BILL_STATUS_YXD_ID && string.IsNullOrEmpty(p.extras)).First(); - if (DistaskH != null) + JObject? res = JsonConvert.DeserializeObject(kv.Value); + if (res != null && res["Value"] != null) + { + if (int.Parse(res["Value"]!.ToString()) is not ((int)Eagvmode.无请求) and not ((int)Eagvmode.收到请求)) { - dynamic reqBody = new ExpandoObject(); - reqBody.taskCode = DistaskH.bill_code; - reqBody.slotCode = key; - reqBody.containerCode = DistaskH.carry_code; - CancellationTokenSource Ctu = new(); - dynamic respBody = HttpClientHelper.PostStreamAsync("http://192.168.11.104:1880/wcs/notify/cargo", reqBody, Ctu.Token).Result; - DistaskH.extras = respBody; - _repository.AsSugarClient().Updateable(DistaskH).ExecuteCommand(); - Ctu.Dispose(); + InstockInput instockInput = new() + { + equip_code = res["DevName"]!.ToString(), + label_code = res["TagName"]!.ToString() + }; + _prdInstockService.InstockTypeOne(instockInput); } } } } - catch (Exception) - { - - } + } + catch (Exception) + { } } - - private static readonly Dictionary s_logLevelMap = new() + //获取挤出装箱状态 + private void GetJCPackStatus(object state) { - [LogLevel.Debug] = "DBG", - [LogLevel.Information] = "INF", - [LogLevel.Warning] = "WRN", - [LogLevel.Error] = "ERR", - }; - protected ILogger Logger => LoggerFactory.Create(builder => builder.AddFile($"{AppContext.BaseDirectory}/logs/custom{DateTime.Now:yyyyMMdd}.log", cfgOpts => - { - - //cfgOpts.DateFormat = "yyyy-MM-dd HH:mm:ss.fff"; - cfgOpts.MessageFormat = (logMsg) => + try { - var logLevel = s_logLevelMap[logMsg.LogLevel]; - var sb = new StringBuilder(); - _ = sb.Append($"[{logLevel}] "); - _ = sb.Append($"{logMsg.LogName} "); - _ = sb.Append($"{DateTime.Now:yyyy-MM-dd HH:mm:ss.fff} "); - _ = sb.Append($"#{logMsg.EventId.Id} "); - _ = sb.Append(logMsg.Message + " "); - _ = sb.Append(logMsg.Exception?.ToString()); - return sb.ToString(); - }; - - })).CreateLogger(this.GetType()); - - - //扫码入库 - private void ScanInStock(object state) - { - Dictionary getdic = new Dictionary(); - getdic.Add("BGWRKYCL02", new string[] { "CP8", "AllowGetFullBox1", "code1", "PutDoneEmptyBox", "false" }); - getdic.Add("BGWRKYCL01", new string[] { "CP8", "AllowGetFullBox2", "code2", "PutDoneEmptyBox", "false" }); - foreach (var key in getdic.Keys) - { - try + string[] strs = new string[1] { "TY4C-SHUSONG-JC" }; + string sign = "AGVFullCall"; + foreach (string s in strs) { - var strs = getdic.Where(p => p.Key == key).First().Value; - bool flag = _redisData.HashExist(strs[0], strs[1]).Result; - string data = _redisData.GetHash(strs[0], strs[1]).Result; - JObject? res = JsonConvert.DeserializeObject(data); - - - bool result = res != null && res["Value"] != null ? res.Value("Value") : false; - if (result) + Dictionary dic = _redisData.HGetAll(s).Result; + foreach (KeyValuePair kv in dic) { - Logger.LogInformation($"八工位扫到码发送入库请求:{res}"); - - - Dictionary dicCommand = new(StringComparer.OrdinalIgnoreCase) + if (!kv.Key.Contains(sign)) { - ["DevName"] = strs[0], - ["token"] = _eleCtlCfg.token, - ["TagName"] = strs[3], - ["Value"] = strs[4], - }; - HttpClientHelper.GetRequestAsync(_eleCtlCfg.WriteTagUrl, dicCommand).Wait(); - string codedata = _redisData.GetHash(strs[0], strs[2]).Result; - JObject? coderes = JsonConvert.DeserializeObject(codedata); - string coderesult = coderes != null && coderes["Value"] != null ? coderes.Value("Value")! : ""; - WmsCarryH? carry = _repository.AsSugarClient().Queryable().Single(it => it.carry_code == coderesult); - if (carry != null) + continue; + } + JObject? res = JsonConvert.DeserializeObject(kv.Value); + if (res != null && res["Value"] != null) { - if (_repository.AsSugarClient().Queryable().Where(p => p.carry_id == carry.id && p.status != WmsWareHouseConst.TASK_BILL_STATUS_COMPLE_ID ).Any()) - continue; - var WmsCarryCode = _repository.AsSugarClient().Queryable().Single(it => it.carry_id == carry.id); - if (WmsCarryCode != null) + if (res.Value("Value")) { - VisualDevModelDataCrInput input = new VisualDevModelDataCrInput(); - input.data = new Dictionary(); - input.data.Add("barcode", coderesult); - input.data.Add("codeqty", WmsCarryCode.codeqty);//条码数量 - input.data.Add("material_code", WmsCarryCode.material_code); - input.data.Add("extras", key);//location_code - input.data.Add("warehouse_id", "1");//TEST - input.data.Add("bill_code", "");//采购收货单号 - input.data.Add("code_batch", WmsCarryCode.code_batch!);//批次 - input.data.Add("material_specification", WmsCarryCode.material_specification!);//规格型号 - input.data.Add("container_no", WmsCarryCode.container_no!);//箱号 - input.data.Add("material_id", WmsCarryCode.material_id); - input.data.Add("id", null); - _wmsPDAScanInStock.ScanInStockByRedis(input).Wait(); + InstockInput instockInput = new() + { + equip_code = res["DevName"]!.ToString(), + label_code = res["TagName"]!.ToString() + }; + _prdInstockService.InstockTypeOne(instockInput); } } } } - catch (Exception) - { - - } + } + catch (Exception) + { } } - - private void SSXcode(object state) + //获取限位状态 + private void GetLimitStatus(object state) { - Dictionary dic = new Dictionary(); - //有问题 - dic.Add("东面提升机输送线", new string[] { "下升降机判断请求", "下升降机判断条码", "下升降机判断完毕", "下升降机判断结果" }); - Dictionary putdic = new Dictionary(); - putdic.Add("SSX-111-011", 11); - putdic.Add("SSX-111-012", 12); - foreach (var key in dic.Keys) + /* + Console.WriteLine($"{DateTime.Now:yyyy-MM-dd HH:mm:ss}"); + Console.WriteLine($"获取挤出装箱状态"); + string data = _redisData.GetHash("TY4C-SHUSONG-JC", "AGVFullCall").Result; + Console.WriteLine(data);*/ + try { - try + string[] strs = new string[1] { "TY4C-WAIBAO" }; + string sign = "AGVCall"; + foreach (string s in strs) { - var strs = dic.Where(p => p.Key == key).First().Value; - string dataflag = _redisData.GetHash(key, strs[0]).Result; - JObject? resflag = JsonConvert.DeserializeObject(dataflag); - bool re = resflag != null && resflag["Value"] != null ? resflag.Value("Value") : false; - if (!re) - continue; - string data = _redisData.GetHash(key, strs[1]).Result; - JObject? res = JsonConvert.DeserializeObject(data); - string? result = res != null && res["Value"] != null ? res.Value("Value") : ""; - if (!string.IsNullOrEmpty(result)) + Dictionary dic = _redisData.HGetAll(s).Result; + foreach (KeyValuePair kv in dic) { - if (result.Length < 5) + if (!kv.Key.Contains(sign)) { - result = "LX" + result.Replace("\r", ""); + continue; } - var DistaskH = _repository.AsSugarClient().Queryable().Where(p => p.carry_code == result && p.status != WmsWareHouseConst.TASK_BILL_STATUS_COMPLE_ID).OrderByDescending(p => p.create_time).First(); - if (DistaskH != null) + JObject? res = JsonConvert.DeserializeObject(kv.Value); + if (res != null && res["Value"] != null) { - Dictionary dicCommand2 = new(StringComparer.OrdinalIgnoreCase) + if (res.Value("Value")) { - ["DevName"] = key, - ["token"] = _eleCtlCfg.token, - ["TagName"] = strs[3], - ["Value"] = putdic.Keys.Contains(DistaskH.startlocation_code) ? putdic.Where(p => p.Key == DistaskH.startlocation_code).First().Value.ToString() : "13", - }; - HttpClientHelper.GetRequestAsync(_eleCtlCfg.WriteTagUrl, dicCommand2).Wait(); - Dictionary dicCommand = new(StringComparer.OrdinalIgnoreCase) - { - ["DevName"] = key, - ["token"] = _eleCtlCfg.token, - ["TagName"] = strs[2], - ["Value"] = "true", - }; - HttpClientHelper.GetRequestAsync(_eleCtlCfg.WriteTagUrl, dicCommand).Wait(); - } - else - { - Dictionary dicCommand2 = new(StringComparer.OrdinalIgnoreCase) - { - ["DevName"] = key, - ["token"] = _eleCtlCfg.token, - ["TagName"] = strs[3], - ["Value"] = "13", - }; - HttpClientHelper.GetRequestAsync(_eleCtlCfg.WriteTagUrl, dicCommand2).Wait(); - Dictionary dicCommand = new(StringComparer.OrdinalIgnoreCase) - { - ["DevName"] = key, - ["token"] = _eleCtlCfg.token, - ["TagName"] = strs[2], - ["Value"] = "true", - }; - HttpClientHelper.GetRequestAsync(_eleCtlCfg.WriteTagUrl, dicCommand).Wait(); + InstockInput instockInput = new() + { + equip_code = res["DevName"]!.ToString(), + label_code = res["TagName"]!.ToString() + }; + _prdInstockService.InstockOutPack(instockInput); + } } } } - catch (Exception) - { - - } + } + catch (Exception) + { } } - public void Dispose() { Readtimer?.Dispose(); - CheckGettimer?.Dispose(); - Scantimer?.Dispose(); - SSXcodetimer?.Dispose(); } public Task StartAsync(CancellationToken cancellationToken) { Readtimer = new Timer(GetRedisData, null, TimeSpan.Zero, TimeSpan.FromSeconds(300)); - CheckGettimer = new Timer(CheckGet, null, TimeSpan.Zero, TimeSpan.FromSeconds(10)); - Scantimer = new Timer(ScanInStock, null, TimeSpan.Zero, TimeSpan.FromSeconds(60)); - SSXcodetimer= new Timer(SSXcode, null, TimeSpan.Zero, TimeSpan.FromSeconds(10)); return Task.CompletedTask; } public Task StopAsync(CancellationToken cancellationToken) diff --git a/ProductionMgr/Tnb.ProductionMgr/Tnb.ProductionMgr.csproj b/ProductionMgr/Tnb.ProductionMgr/Tnb.ProductionMgr.csproj index fd26adc3..975e58c2 100644 --- a/ProductionMgr/Tnb.ProductionMgr/Tnb.ProductionMgr.csproj +++ b/ProductionMgr/Tnb.ProductionMgr/Tnb.ProductionMgr.csproj @@ -12,11 +12,9 @@ - - - + diff --git a/WarehouseMgr/Tnb.WarehouseMgr/DevServBase`1.cs b/WarehouseMgr/Tnb.WarehouseMgr/DevServBase`1.cs deleted file mode 100644 index 0367f680..00000000 --- a/WarehouseMgr/Tnb.WarehouseMgr/DevServBase`1.cs +++ /dev/null @@ -1,119 +0,0 @@ -using System.Text; -using JNPF; -using JNPF.Common.Extension; -using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Mvc; -using Microsoft.Extensions.Logging; -using SqlSugar; -using Tnb.WarehouseMgr.Entities; -using Tnb.WarehouseMgr.Entities.Dto.Queries; -using Tnb.WarehouseMgr.Entities.Entity; - -namespace Tnb.WarehouseMgr -{ - public class DevServBase : BaseWareHouseService - { - protected static Dictionary s_elevatorMap = new(); - - private static readonly Lazy initializationTask; - private static SqlSugarScope context; - private readonly ISqlSugarClient _db; - public static Dictionary s_eleUseStatusDic = new(); - public static Dictionary s_loadedStatusDic = new(); - - static DevServBase() - { - //initializationTask = new Lazy(InitializeAsync); - _ = Task.Run(() => InitializeAsync()); - } - - public DevServBase(ISqlSugarClient db) - { - _db = db; - } - - - private static async Task InitializeAsync() - { - - ConnectionStringsOptions connectionOpts = App.GetConfig("ConnectionStrings", true); - ConnectionConfig cfg = new() - { - ConfigId = connectionOpts.ConfigId, - ConnectionString = connectionOpts.ConnectString, - DbType = DbType.PostgreSQL, - IsAutoCloseConnection = true, - }; - context = new(cfg); - - s_elevatorMap = await context.Queryable().ToDictionaryAsync(x => x.elevator_id, x => x.elevator_code); - - } - //public static Task InitializationTask => initializationTask.Value; - - /// - /// 获取电梯根据任务单号 - /// - /// - /// taskCode:子任务编号 - /// endlocation_id:目标库位ID - /// - /// - - protected async Task FindElevatorFromPars(ElevagorInfoQuery input) - { - var whereExpable = Expressionable.Create() - .And((a, b, c) => a.enabled == 1); - if (!input.taskCode.IsNullOrEmpty()) - { - whereExpable.AndIF(!SqlFunc.IsNullOrEmpty(input.taskCode), (a, b, c) => c.bill_code == input.taskCode); - } - if (!input.endlocation_id.IsNullOrEmpty()) - { - whereExpable.AndIF(!SqlFunc.IsNullOrEmpty(input.endlocation_id), (a, b, c) => b.location_id == input.endlocation_id); - } - if (!input.startlocation_id.IsNullOrEmpty()) - { - whereExpable.AndIF(!SqlFunc.IsNullOrEmpty(input.startlocation_id), (a, b, c) => b.location_id == input.startlocation_id); - } - var ele = await _db.CopyNew().Queryable().InnerJoin((a, b) => a.id == b.bill_id) - .InnerJoin((a, b, c) => b.location_code == c.endlocation_code || b.location_code == c.startlocation_code) - .Where(whereExpable.ToExpression()) - .WhereIF(!SqlFunc.IsNullOrEmpty(input.sourceName) && SqlFunc.StartsWith("DT-R", input.sourceName), (a, b, c) => c.startpoint_code == input.sourceName) - .WhereIF(!SqlFunc.IsNullOrEmpty(input.sourceName) && SqlFunc.StartsWith("DT-C", input.sourceName), (a, b, c) => c.endpoint_code == input.sourceName) - .Select((a, b, c) => new WmsElevatorH - { - bill_code = c.bill_code, - device_id = a.elevator_id, - end_floor = c.end_floor - }, true) - .FirstAsync(); - - return ele; - - } - } - - public static class CustomLoggerExtenstions - { - public static void Debug(this ILogger logger, string message, params object[] parameters) - { - logger.Debug(message, parameters); - } - - public static void Information(this ILogger logger, string message, params object[] parameters) - { - logger.LogInformation(message, parameters); - } - - public static void Error(this ILogger logger, string message, Exception ex, params object[] parameters) - { - logger.LogError(ex, message, parameters); - } - - public static void Error(this ILogger logger, string message, params object[] parameters) - { - logger.LogError(message, parameters); - } - } -} diff --git a/WarehouseMgr/Tnb.WarehouseMgr/DeviceProviderService.cs b/WarehouseMgr/Tnb.WarehouseMgr/DeviceProviderService.cs index c412cf98..c6cbea81 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/DeviceProviderService.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr/DeviceProviderService.cs @@ -1,5 +1,4 @@ -using Aop.Api.Domain; -using JNPF; +using JNPF; using JNPF.Common.Core.Manager; using JNPF.Common.Enums; using JNPF.Common.Extension; @@ -35,7 +34,7 @@ namespace Tnb.WarehouseMgr /// Wms设备接口提供程序服务类 /// - public class DeviceProviderService : DevServBase + public class DeviceProviderService : ServiceLoggerBase { private readonly ISqlSugarClient _db; private readonly IWareHouseService _wareHouseService; @@ -46,6 +45,7 @@ namespace Tnb.WarehouseMgr private readonly ElevatorControlConfiguration _eleCtlCfg = App.Configuration.Build(); private readonly ILoggerFactory _loggerFactory; public static Dictionary s_eleUseStatusDic = new(); + public static Dictionary s_loadedStatusDic = new(); @@ -54,7 +54,7 @@ namespace Tnb.WarehouseMgr IEventPublisher eventPublisher, IUserManager userManger, IElevatorControlService elevatorControlService - ) : base(repository.AsSugarClient()) + ) //: base(repository.AsSugarClient()) { _db = repository.AsSugarClient(); _wareHouseService = wareHouseService; @@ -187,6 +187,49 @@ namespace Tnb.WarehouseMgr return await ToApiResult(HttpStatusCode.InternalServerError, "请重试!"); } + + /// + /// 获取电梯根据任务单号 + /// + /// + /// taskCode:子任务编号 + /// endlocation_id:目标库位ID + /// + /// + + protected async Task FindElevatorFromPars(ElevagorInfoQuery input) + { + var whereExpable = Expressionable.Create() + .And((a, b, c) => a.enabled == 1); + if (!input.taskCode.IsNullOrEmpty()) + { + whereExpable.AndIF(!SqlFunc.IsNullOrEmpty(input.taskCode), (a, b, c) => c.bill_code == input.taskCode); + } + if (!input.endlocation_id.IsNullOrEmpty()) + { + whereExpable.AndIF(!SqlFunc.IsNullOrEmpty(input.endlocation_id), (a, b, c) => b.location_id == input.endlocation_id); + } + if (!input.startlocation_id.IsNullOrEmpty()) + { + whereExpable.AndIF(!SqlFunc.IsNullOrEmpty(input.startlocation_id), (a, b, c) => b.location_id == input.startlocation_id); + } + var ele = await _db.CopyNew().Queryable().InnerJoin((a, b) => a.id == b.bill_id) + .InnerJoin((a, b, c) => b.location_code == c.endlocation_code || b.location_code == c.startlocation_code) + .Where(whereExpable.ToExpression()) + .WhereIF(!SqlFunc.IsNullOrEmpty(input.sourceName) && SqlFunc.StartsWith("DT-R", input.sourceName), (a, b, c) => c.startpoint_code == input.sourceName) + .WhereIF(!SqlFunc.IsNullOrEmpty(input.sourceName) && SqlFunc.StartsWith("DT-C", input.sourceName), (a, b, c) => c.endpoint_code == input.sourceName) + .Select((a, b, c) => new WmsElevatorH + { + bill_code = c.bill_code, + device_id = a.elevator_id, + end_floor = c.end_floor + }, true) + .FirstAsync(); + + return ele; + + } + /// /// 放货确认/申请放货 /// diff --git a/WarehouseMgr/Tnb.WarehouseMgr/ServiceLoggerBase`1.cs b/WarehouseMgr/Tnb.WarehouseMgr/ServiceLoggerBase`1.cs new file mode 100644 index 00000000..f4c9cb7c --- /dev/null +++ b/WarehouseMgr/Tnb.WarehouseMgr/ServiceLoggerBase`1.cs @@ -0,0 +1,84 @@ +using System.Text; +using JNPF; +using Microsoft.Extensions.Logging; +using SqlSugar; +using Tnb.WarehouseMgr.Entities; + +namespace Tnb.WarehouseMgr +{ + public class ServiceLoggerBase : BaseWareHouseService + { + protected static Dictionary s_elevatorMap = new(); + private static readonly Lazy initializationTask; + + + static ServiceLoggerBase() + { + initializationTask = new Lazy(InitializeAsync); + } + + + + private static async Task InitializeAsync() + { + + ConnectionStringsOptions connectionOpts = App.GetConfig("ConnectionStrings", true); + ConnectionConfig cfg = new() + { + ConfigId = connectionOpts.ConfigId, + ConnectionString = connectionOpts.ConnectString, + DbType = DbType.PostgreSQL, + IsAutoCloseConnection = true, + }; + SqlSugarScope context = new(cfg); + + s_elevatorMap = await context.Queryable().ToDictionaryAsync(x => x.elevator_id, x => x.elevator_code); + + } + public static Task InitializationTask => initializationTask.Value; + + + + //protected ILogger Logger => LoggerFactory.Create(builder => builder.AddFile($"{AppContext.BaseDirectory}/logs/{this.GetType().Name}{DateTime.Now:yyyyMMdd}.log", cfgOpts => + //{ + + // //cfgOpts.DateFormat = "yyyy-MM-dd HH:mm:ss.fff"; + // cfgOpts.MessageFormat = (logMsg) => + // { + // Span span = logMsg.LogLevel.ToString().ToCharArray(); + // StringBuilder sb = new(); + // _ = sb.Append($"{span[..4]} "); + // _ = sb.Append($"{logMsg.LogName} "); + // _ = sb.Append($"{DateTime.Now:yyyy-MM-dd HH:mm:ss.fff} "); + // _ = sb.Append($"#{logMsg.EventId.Id} "); + // _ = sb.Append(logMsg.Message + " "); + // _ = sb.Append(logMsg.Exception?.ToString()); + // return sb.ToString(); + // }; + + //})).CreateLogger(this.GetType()); + } + + public static class CustomLoggerExtenstions + { + public static void Debug(this ILogger logger, string message, params object[] parameters) + { + logger.Debug(message, parameters); + } + + public static void Information(this ILogger logger, string message, params object[] parameters) + { + logger.LogInformation(message, parameters); + } + + public static void Error(this ILogger logger, string message, Exception ex, params object[] parameters) + { + logger.LogError(ex, message, parameters); + } + + public static void Error(this ILogger logger, string message, params object[] parameters) + { + logger.LogError(message, parameters); + } + } +} diff --git a/WarehouseMgr/Tnb.WarehouseMgr/Tnb.WarehouseMgr.csproj b/WarehouseMgr/Tnb.WarehouseMgr/Tnb.WarehouseMgr.csproj index 60b81e8b..5df2f6b2 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/Tnb.WarehouseMgr.csproj +++ b/WarehouseMgr/Tnb.WarehouseMgr/Tnb.WarehouseMgr.csproj @@ -18,6 +18,7 @@ + diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs index d7e58eb2..cc8ef672 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs @@ -28,7 +28,6 @@ using Tnb.BasicData.Entities; using Tnb.Common.Extension; using Tnb.Common.Redis; using Tnb.Common.Utils; -using Tnb.ProductionMgr.Entities; using Tnb.WarehouseMgr.Entities; using Tnb.WarehouseMgr.Entities.Configs; using Tnb.WarehouseMgr.Entities.Consts; @@ -44,7 +43,7 @@ namespace Tnb.WarehouseMgr /// /// 库房业务类(出入库) /// - public class WareHouseService : DevServBase, IWareHouseService + public class WareHouseService : ServiceLoggerBase, IWareHouseService { private readonly ISqlSugarClient _db; private readonly IDictionaryDataService _dictionaryDataService; @@ -64,7 +63,7 @@ namespace Tnb.WarehouseMgr public WareHouseService(ISqlSugarRepository repository, IDictionaryDataService dictionaryDataService, RedisData redisData, IBillRullService billRullService, IUserManager userManager, ICacheManager cacheManager, IElevatorControlService elevatorControlService //IConfiguration configuration - ) : base(repository.AsSugarClient()) + )// : base(repository.AsSugarClient()) { _db = repository.AsSugarClient(); _dictionaryDataService = dictionaryDataService; @@ -663,6 +662,49 @@ namespace Tnb.WarehouseMgr agvCts.Dispose(); } } + + + /// + /// 获取电梯根据任务单号 + /// + /// + /// taskCode:子任务编号 + /// endlocation_id:目标库位ID + /// + /// + + protected async Task FindElevatorFromPars(ElevagorInfoQuery input) + { + var whereExpable = Expressionable.Create() + .And((a, b, c) => a.enabled == 1); + if (!input.taskCode.IsNullOrEmpty()) + { + whereExpable.AndIF(!SqlFunc.IsNullOrEmpty(input.taskCode), (a, b, c) => c.bill_code == input.taskCode); + } + if (!input.endlocation_id.IsNullOrEmpty()) + { + whereExpable.AndIF(!SqlFunc.IsNullOrEmpty(input.endlocation_id), (a, b, c) => b.location_id == input.endlocation_id); + } + if (!input.startlocation_id.IsNullOrEmpty()) + { + whereExpable.AndIF(!SqlFunc.IsNullOrEmpty(input.startlocation_id), (a, b, c) => b.location_id == input.startlocation_id); + } + var ele = await _db.CopyNew().Queryable().InnerJoin((a, b) => a.id == b.bill_id) + .InnerJoin((a, b, c) => b.location_code == c.endlocation_code || b.location_code == c.startlocation_code) + .Where(whereExpable.ToExpression()) + .WhereIF(!SqlFunc.IsNullOrEmpty(input.sourceName) && SqlFunc.StartsWith("DT-R", input.sourceName), (a, b, c) => c.startpoint_code == input.sourceName) + .WhereIF(!SqlFunc.IsNullOrEmpty(input.sourceName) && SqlFunc.StartsWith("DT-C", input.sourceName), (a, b, c) => c.endpoint_code == input.sourceName) + .Select((a, b, c) => new WmsElevatorH + { + bill_code = c.bill_code, + device_id = a.elevator_id, + end_floor = c.end_floor + }, true) + .FirstAsync(); + + return ele; + + } #region CTU /// /// 生成CTU任务执行 diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsCheckTaskService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsCheckTaskService.cs index 371801cb..5a870070 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/WmsCheckTaskService.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsCheckTaskService.cs @@ -34,7 +34,7 @@ namespace Tnb.WarehouseMgr /// 盘点任务 /// [OverideVisualDev(ModuleConsts.MODULE_WMSCHECKTASK_ID)] - public class WmsCheckTaskService : BaseWareHouseService + public class WmsCheckTaskService : ServiceLoggerBase { private readonly ISqlSugarClient _db; private readonly IWareHouseService _warehouseService; diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsDistaskService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsDistaskService.cs index 75f13e5a..a594fa26 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/WmsDistaskService.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsDistaskService.cs @@ -6,11 +6,11 @@ using Tnb.WarehouseMgr.Entities.Consts; namespace Tnb.WarehouseMgr { [OverideVisualDev(ModuleConsts.MODULE_WMSDISTASK_ID)] - public class WmsDistaskService : TaskManagerDelBase + public class WmsDistaskService : BaseWareHouseService { private readonly ISqlSugarClient _db; - public WmsDistaskService(ISqlSugarRepository repository):base(repository.AsSugarClient()) + public WmsDistaskService(ISqlSugarRepository repository) { _db = repository.AsSugarClient(); OverideFuncs.DeleteAsync = Delete; diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsOutStockService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsOutStockService.cs index e7f9d768..1224e725 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/WmsOutStockService.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsOutStockService.cs @@ -35,7 +35,7 @@ namespace Tnb.WarehouseMgr /// [OverideVisualDev(ModuleConsts.MODULE_WMSOUTSTOCK_ID)] [ServiceModule(BizTypeId)] - public class WmsOutStockService : DevServBase, IWmsOutStockService + public class WmsOutStockService : ServiceLoggerBase, IWmsOutStockService { private const string BizTypeId = "26191522660645"; private readonly ISqlSugarClient _db; @@ -59,7 +59,7 @@ namespace Tnb.WarehouseMgr IBillRullService billRullService, IWmsCarryMoveInStockService wmsCarryMoveInStockService, IWmsCarryService wareCarryService, - IEventPublisher eventPublisher) : base(repository.AsSugarClient()) + IEventPublisher eventPublisher) { _db = repository.AsSugarClient(); _dictionaryDataService = dictionaryDataService; @@ -72,6 +72,7 @@ namespace Tnb.WarehouseMgr _wareCarryService = wareCarryService; OverideFuncs.CreateAsync = OutStockApplyFor; + _ = InitializationTask; } public async Task OutStockApplyFor(VisualDevModelDataCrInput input) @@ -114,7 +115,7 @@ namespace Tnb.WarehouseMgr List freeLocIds = fLocIds.Except(minTaskNumLocs.Select(x => x.endlocation_id)).ToList(); if (freeLocIds?.Count > 0) { - int rIdx = Random.Shared.Next(0, freeLocIds.Count); + int rIdx = Random.Shared.Next(0, freeLocIds.Count); loc = await _db.Queryable().SingleAsync(it => it.id == freeLocIds[rIdx]); } else @@ -711,7 +712,6 @@ namespace Tnb.WarehouseMgr List points = new List(); if (sPoint.area_code != ePoint.area_code) { - points = await _wareHouseService.PathAlgorithms(sPoint.id, ePoint.id); if (points.Count <= 2) { throw new AppFriendlyException("该路径不存在", 500); @@ -739,11 +739,6 @@ namespace Tnb.WarehouseMgr startlocation_code = sPoint?.location_code ?? string.Empty, endlocation_id = ePoint?.location_id ?? string.Empty, endlocation_code = ePoint?.location_code ?? string.Empty, - startpoint_id = sPoint.id, - startpoint_code = sPoint.point_code, - endpoint_id = ePoint.id, - endpoint_code = ePoint.point_code, - start_floor = sPoint?.floor.ToString(), end_floor = ePoint?.floor.ToString(), bill_code = _billRullService.GetBillNumber(WmsWareHouseConst.WMS_PRETASK_H_ENCODE).GetAwaiter().GetResult(), diff --git a/apihost/Tnb.API.Entry/Configurations/App.json b/apihost/Tnb.API.Entry/Configurations/App.json index 136f83e5..24b8f446 100644 --- a/apihost/Tnb.API.Entry/Configurations/App.json +++ b/apihost/Tnb.API.Entry/Configurations/App.json @@ -2,7 +2,7 @@ "JNPF_App": { "CodeAreasName": [ "SubDev" ], //系统文件路径 - "SystemPath": "D:\\ToTong\\tnb\\Resources", + "SystemPath": "D:\\cosmoplat\\tnb\\Resources", //微信公众号允许上传文件类型 "MPUploadFileType": [ "bmp", @@ -102,7 +102,7 @@ // 软件的错误报告 "ErrorReport": false, //软件的错误报告发给谁 - "ErrorReportTo": "tuotong_tech@163.com" + "ErrorReportTo": "" }, // ================== 单点登录配置(和其他登录方式 只能二选一) ============================== --> "OAuth": { diff --git a/apihost/Tnb.API.Entry/Configurations/AppSetting.json b/apihost/Tnb.API.Entry/Configurations/AppSetting.json deleted file mode 100644 index 283832df..00000000 --- a/apihost/Tnb.API.Entry/Configurations/AppSetting.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "AppSettings": { - "InjectMiniProfiler": true, - "SupportPackageNamePrefixs": [ "Tnb" ] - }, - "Kestrel": { - "Endpoints": { - "Http": { - "Url": "http://0.0.0.0:9231" - } - } - }, - "YitId": { - "WorkerId": 1, //必须 全局唯一,必须 程序设定,理论最大值 2^WorkerIdBitLength-1 - "WorkerIdBitLength": 4, //机器码位长,决定 WorkerId 的最大值,默认值6,取值范围 [1, 16] - "SeqBitLength": 4 //序列数位长,默认值6,取值范围 [3, 21](建议不小于4),决定每毫秒基础生成的ID个数 - }, - "UnifyResultSettings": { - "ShowExceptionDetail": true - } -} \ No newline at end of file diff --git a/apihost/Tnb.API.Entry/Configurations/Cache.json b/apihost/Tnb.API.Entry/Configurations/Cache.json index dadb1be5..69116fb8 100644 --- a/apihost/Tnb.API.Entry/Configurations/Cache.json +++ b/apihost/Tnb.API.Entry/Configurations/Cache.json @@ -4,7 +4,7 @@ "ip": "localhost", "port": 6379, "password": "05jWEoJa8v", - "RedisConnectionString": "{0}:{1},password={2}, poolsize=500,ssl=false,defaultDatabase=0" + "RedisConnectionString": "{0}:{1},password={2}, poolsize=500,ssl=false,defaultDatabase=7" }, "Redis": { "ip": "localhost", diff --git a/apihost/Tnb.API.Entry/Configurations/ConnectionStrings.json b/apihost/Tnb.API.Entry/Configurations/ConnectionStrings.json index b9d5c954..0b2221b2 100644 --- a/apihost/Tnb.API.Entry/Configurations/ConnectionStrings.json +++ b/apihost/Tnb.API.Entry/Configurations/ConnectionStrings.json @@ -1,16 +1,24 @@ { "ConnectionStrings": { "ConfigId": "default", - "DBType": "PostgreSQL", //MySql;SqlServer;Oracle;PostgreSQL;Dm;Kdbndp;Sqlite; + "DBType": "MySql", //MySql;SqlServer;Oracle;PostgreSQL;Dm;Kdbndp;Sqlite; +<<<<<<< HEAD + "Host": "127.0.0.1",//"10.67.53.241", +======= "Host": "localhost", - //"Host": "127.0.0.1", - "Port": "5432", +>>>>>>> aec1d3b15533e5faafe3b2294830b095cff93f2d + "Port": "3306", //"DBName": "tianyi_db", //"UserName": "postgres", //"Password": "pass@word123", - "DBName": "tianyi", - "UserName": "postgres", - "Password": "pass@word123", + "DBName": "xinte_cloud", +<<<<<<< HEAD + "UserName": "root",//"totong", + "Password": "root",//"+vKyHUbtxQ", +======= + "UserName": "totong", + "Password": "+vKyHUbtxQ", +>>>>>>> aec1d3b15533e5faafe3b2294830b095cff93f2d //SqlServer //"DefaultConnection": "server={0},{1};database={2};uid={3};pwd={4};MultipleActiveResultSets=true" //Kdbndp diff --git a/apihost/Tnb.API.Entry/Configurations/ElevatorControlSettings.json b/apihost/Tnb.API.Entry/Configurations/ElevatorControlSettings.json index 2ffda1d4..80c31cd7 100644 --- a/apihost/Tnb.API.Entry/Configurations/ElevatorControlSettings.json +++ b/apihost/Tnb.API.Entry/Configurations/ElevatorControlSettings.json @@ -2,10 +2,9 @@ "DevName3": "Elevator3", "DevName4": "Elevator4", "HeartbeatDevNames": [ "Elevator3", "Elevator4" ], - "tags": [ "SysStatus", "RunStatus", "FloorNo", "DoorStatus", "AGVStatus" ], "token": "780BE4144636CF47DDF3920B0F1D069B", "GetTagListUrl": "http://192.168.11.110:9100/Dev/GetTagList", "GetTagUrl": "http://192.168.11.110:9100/Dev/GetTag", "WriteTagUrl": "http://192.168.11.110:9100/Dev/writeTag", - "Environment": "tianyi" + "Environment": "" } \ No newline at end of file diff --git a/apihost/Tnb.API.Entry/Configurations/JWT.json b/apihost/Tnb.API.Entry/Configurations/JWT.json index cf2e1415..f8022a93 100644 --- a/apihost/Tnb.API.Entry/Configurations/JWT.json +++ b/apihost/Tnb.API.Entry/Configurations/JWT.json @@ -3,9 +3,9 @@ "ValidateIssuerSigningKey": true, // 是否验证密钥,bool 类型,默认true "IssuerSigningKey": "RkayGi4ltkMWrSQKsQTWic1VnakqsQfaJOmJIBUWE1gxGaS0IrJHxa9anjVAwuew", // 密钥,string 类型,必须是复杂密钥,长度大于16 "ValidateIssuer": true, // 是否验证签发方,bool 类型,默认true - "ValidIssuer": "tuotong", // 签发方,string 类型 + "ValidIssuer": "cosmoplat", // 签发方,string 类型 "ValidateAudience": true, // 是否验证签收方,bool 类型,默认true - "ValidAudience": "tuotong", // 签收方,string 类型 + "ValidAudience": "cosmoplat", // 签收方,string 类型 "ValidateLifetime": true, // 是否验证过期时间,bool 类型,默认true,建议true "ExpiredTime": 1440, // 过期时间,long 类型,单位分钟,默认20分钟 "ClockSkew": 5 // 过期时间容错值,long 类型,单位秒,默认5秒 diff --git a/apihost/Tnb.API.Entry/Configurations/Location.json b/apihost/Tnb.API.Entry/Configurations/Location.json deleted file mode 100644 index 82fd2b30..00000000 --- a/apihost/Tnb.API.Entry/Configurations/Location.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "TestLocation": "CP-A08-47" -} \ No newline at end of file diff --git a/apihost/Tnb.API.Entry/Configurations/Nacos.json b/apihost/Tnb.API.Entry/Configurations/Nacos.json new file mode 100644 index 00000000..b10e5b9e --- /dev/null +++ b/apihost/Tnb.API.Entry/Configurations/Nacos.json @@ -0,0 +1,29 @@ +{ + "Nacos": { + "EndPoint": "", + "ServerAddresses": [ "http://localhost:8848/" ], // nacos服务端地址 + "DefaultTimeOut": 15000, + "Namespace": "dev", // 服务注册到的命名空间id + "ListenInterval": 1000, + "ServiceName": "tnb-core", //服务名称 + "GroupName": "DEFAULT_GROUP", //服务分组 + "ClusterName": "DEFAULT", + "Ip": "", + "PreferredNetworks": "", // select an IP that matches the prefix as the service registration IP + "Port": 9212, + "Weight": 100, // 权重 + "RegisterEnabled": true, + "InstanceEnabled": true, + "Ephemeral": true, + "Secure": false, + "AccessKey": "", + "SecretKey": "", + "UserName": "nacos", + "Password": "nacos", + "ConfigUseRpc": true, // 为true时,通过 gRPC 去和 nacos server 交互,nacos 2.x版本要设置为true": null, + "NamingUseRpc": true, // 为true时,通过 gRPC 去和 nacos server 交互, nacos 2.x版本要设置为true": null, + "NamingLoadCacheAtStart": "", + "LBStrategy": "WeightRandom", // WeightRandom WeightRoundRobin + "Metadata": {} + } +} \ No newline at end of file diff --git a/apihost/Tnb.API.Entry/Configurations/OSS.json b/apihost/Tnb.API.Entry/Configurations/OSS.json index 54fcbe99..d5da5089 100644 --- a/apihost/Tnb.API.Entry/Configurations/OSS.json +++ b/apihost/Tnb.API.Entry/Configurations/OSS.json @@ -1,6 +1,6 @@ { "OSS": { - "BucketName": "jnpfsoftoss", + "BucketName": "cosmoplatoss", //文件存储类型(Invalid(本地),MinIo,Aliyun,QCloud,Qiniu) "Provider": "Invalid", "Endpoint": "192.168.0.60:9000", diff --git a/apihost/Tnb.API.Entry/Configurations/Swagger.json b/apihost/Tnb.API.Entry/Configurations/Swagger.json index 9f45fc4e..0fcbfdb0 100644 --- a/apihost/Tnb.API.Entry/Configurations/Swagger.json +++ b/apihost/Tnb.API.Entry/Configurations/Swagger.json @@ -1,12 +1,12 @@ { "SpecificationDocumentSettings": { - "DocumentTitle": "ToTong Next Builder", + "DocumentTitle": "Cosmoplat Next Builder", "DocExpansionState": "None", "RoutePrefix": "swagger", "GroupOpenApiInfos": [ { "Group": "Default", - "Title": "ToTong Next Builder", + "Title": "Cosmoplat Next Builder", "Description": "", "Version": "3.4.6" } diff --git a/apihost/Tnb.API.Entry/Configurations/Tenant.json b/apihost/Tnb.API.Entry/Configurations/Tenant.json index f8ca747a..32e3029f 100644 --- a/apihost/Tnb.API.Entry/Configurations/Tenant.json +++ b/apihost/Tnb.API.Entry/Configurations/Tenant.json @@ -1,7 +1,7 @@ { "Tenant": { "MultiTenancy": false, - "MultiTenancyDBInterFace": "http://www.tuotong-tech.com/api/Saas/Tenant/DbContent/", + "MultiTenancyDBInterFace": "", "MultiTenancyType": "" } } \ No newline at end of file diff --git a/apihost/Tnb.API.Entry/Program.cs b/apihost/Tnb.API.Entry/Program.cs index 45b830c4..1f9701d7 100644 --- a/apihost/Tnb.API.Entry/Program.cs +++ b/apihost/Tnb.API.Entry/Program.cs @@ -6,8 +6,6 @@ public class WebComponent : IWebComponent public void Load(WebApplicationBuilder builder, ComponentContext componentContext) { builder.Host.UseWindowsService(); - builder.Configuration.AddJsonFile("Location.json", optional: true, reloadOnChange: true); - //// 日志过滤 //builder.Logging.AddFilter((provider, category, logLevel) => //{ diff --git a/apihost/Tnb.API.Entry/Properties/launchSettings.json b/apihost/Tnb.API.Entry/Properties/launchSettings.json index 336ef428..23bac19d 100644 --- a/apihost/Tnb.API.Entry/Properties/launchSettings.json +++ b/apihost/Tnb.API.Entry/Properties/launchSettings.json @@ -4,7 +4,7 @@ "commandName": "Project", "dotnetRunMessages": true, "launchBrowser": false, - "applicationUrl": "http://localhost:5000", + "applicationUrl": "http://0.0.0.0:9212", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Production" } diff --git a/apihost/Tnb.API.Entry/Startup.cs b/apihost/Tnb.API.Entry/Startup.cs index d8ac9877..d6383883 100644 --- a/apihost/Tnb.API.Entry/Startup.cs +++ b/apihost/Tnb.API.Entry/Startup.cs @@ -7,6 +7,7 @@ using JNPF.SpecificationDocument; using JNPF.TaskScheduler.Interfaces.TaskScheduler; using JNPF.VisualDev; using Microsoft.Extensions.Options; +using Nacos.AspNetCore.V2; using Senparc.CO2NET; using Senparc.CO2NET.RegisterServices; using Senparc.Weixin; @@ -49,7 +50,7 @@ public class Startup : AppStartup services.AddMemoryCache(); // 使用本地缓存必须添加 services.AddConfigurableOptions(); - services.AddSingleton(typeof(ISingleton), typeof(RedisData)); + // services.AddSingleton(typeof(ISingleton), typeof(RedisData)); // 微信 services.AddSenparcGlobalServices(App.Configuration) // Senparc.CO2NET 全局注册 .AddSenparcWeixinServices(App.Configuration); // Senparc.Weixin 注册(如果使用Senparc.Weixin SDK则添加) @@ -57,14 +58,14 @@ public class Startup : AppStartup services.AddOverideVisualDev(); //定时任务 - SnowflakeIdHelper.InitYitIdWorker(); - services.AddHostedService(); - services.AddSingleton(sp => new TimedTaskBackgroundService()); + //services.AddHostedService(); + //services.AddSingleton(sp => new TimedTaskBackgroundService()); //var bgSvc = App.GetRequiredService(); //bgSvc.StartAsync(CancellationToken.None); - services.AddHostedService(); + //services.AddHostedService(); + services.AddNacosAspNet(App.Configuration, "Nacos"); } @@ -113,6 +114,7 @@ public class Startup : AppStartup endpoints.MapControllerRoute(name: "default", pattern: "{controller=Home}/{action=Index}/{id?}"); }); + SnowflakeIdHelper.InitYitIdWorker(); bool isStartTimeJob = App.GetConfig("IsStartTimeJob"); if (isStartTimeJob) diff --git a/apihost/Tnb.API.Entry/Tnb.API.Entry.csproj b/apihost/Tnb.API.Entry/Tnb.API.Entry.csproj index 8267f70f..5628c052 100644 --- a/apihost/Tnb.API.Entry/Tnb.API.Entry.csproj +++ b/apihost/Tnb.API.Entry/Tnb.API.Entry.csproj @@ -44,9 +44,7 @@ - - diff --git a/apihost/Tnb.API.Entry/appsettings.json b/apihost/Tnb.API.Entry/appsettings.json index 44864973..6a4434b5 100644 --- a/apihost/Tnb.API.Entry/appsettings.json +++ b/apihost/Tnb.API.Entry/appsettings.json @@ -1,4 +1,9 @@ { "AllowedHosts": "*", - "ConfigurationScanDirectories": [ "Configurations" ] + "ConfigurationScanDirectories": [ "Configurations" ], + "YitId": { + "WorkerId": 1, //必须 全局唯一,必须 程序设定,理论最大值 2^WorkerIdBitLength-1 + "WorkerIdBitLength": 4, //机器码位长,决定 WorkerId 的最大值,默认值6,取值范围 [1, 16] + "SeqBitLength": 4 //序列数位长,默认值6,取值范围 [3, 21](建议不小于4),决定每毫秒基础生成的ID个数 + } } \ No newline at end of file diff --git a/apihost/Tnb.API.Entry/wwwroot/Template/VengineSqlSugar/AppService.cshtml b/apihost/Tnb.API.Entry/wwwroot/Template/VengineSqlSugar/AppService.cshtml index 1652292b..5217c36e 100644 --- a/apihost/Tnb.API.Entry/wwwroot/Template/VengineSqlSugar/AppService.cshtml +++ b/apihost/Tnb.API.Entry/wwwroot/Template/VengineSqlSugar/AppService.cshtml @@ -1,8 +1,4 @@ -///////////////////////////////////////////////////////////////////////////////// -// 宁波拓通e智造平台 ToTong Next Builder // -// https://git.tuotong-tech.com/tnb/tnb-server // -///////////////////////////////////////////////////////////////////////////////// - + @using Tnb.Core; @using Tnb.Vengine; @using Tnb.Vengine.Domain; diff --git a/apihost/Tnb.API.Entry/wwwroot/Template/VengineSqlSugar/EntityDto.cshtml b/apihost/Tnb.API.Entry/wwwroot/Template/VengineSqlSugar/EntityDto.cshtml index ef7ef708..2e127f32 100644 --- a/apihost/Tnb.API.Entry/wwwroot/Template/VengineSqlSugar/EntityDto.cshtml +++ b/apihost/Tnb.API.Entry/wwwroot/Template/VengineSqlSugar/EntityDto.cshtml @@ -1,8 +1,4 @@ -///////////////////////////////////////////////////////////////////////////////// -// 宁波拓通e智造平台 ToTong Next Builder // -// https://git.tuotong-tech.com/tnb/tnb-server // -///////////////////////////////////////////////////////////////////////////////// - + @using Tnb.Core; @using Tnb.Vengine; @using Tnb.Vengine.Domain; diff --git a/apihost/Tnb.API.Entry/wwwroot/Template/VengineSqlSugar/EntityDtoAcmen.cshtml b/apihost/Tnb.API.Entry/wwwroot/Template/VengineSqlSugar/EntityDtoAcmen.cshtml index a1fd3788..514fcec5 100644 --- a/apihost/Tnb.API.Entry/wwwroot/Template/VengineSqlSugar/EntityDtoAcmen.cshtml +++ b/apihost/Tnb.API.Entry/wwwroot/Template/VengineSqlSugar/EntityDtoAcmen.cshtml @@ -1,11 +1,5 @@ //////////////////////////////////////////////////// -// 本文件由拓通低代码开发平台自动生成,请不要修改 // -// ________ ___ ________ // -// /__ __/ / \ /__ __/ // -// / / / / / / // -// / / / / / / // -// /__/ \___/ /__/ // -// // +// 本文件由卡奥斯低代码开发平台自动生成,请不要修改 // //////////////////////////////////////////////////// @using Tnb.Core; diff --git a/apihost/Tnb.API.Entry/wwwroot/Template/VengineSqlSugar/EntityInfo.cshtml b/apihost/Tnb.API.Entry/wwwroot/Template/VengineSqlSugar/EntityInfo.cshtml index 86c1e79f..6a654f33 100644 --- a/apihost/Tnb.API.Entry/wwwroot/Template/VengineSqlSugar/EntityInfo.cshtml +++ b/apihost/Tnb.API.Entry/wwwroot/Template/VengineSqlSugar/EntityInfo.cshtml @@ -1,8 +1,4 @@ -///////////////////////////////////////////////////////////////////////////////// -// 宁波拓通e智造平台 ToTong Next Builder // -// https://git.tuotong-tech.com/tnb/tnb-server // -///////////////////////////////////////////////////////////////////////////////// - + @using Tnb.Core; @using Tnb.Vengine; @using Tnb.Vengine.Domain; diff --git a/apihost/Tnb.API.Entry/wwwroot/Template/VengineSqlSugar/EntityInfoAcmen.cshtml b/apihost/Tnb.API.Entry/wwwroot/Template/VengineSqlSugar/EntityInfoAcmen.cshtml index 8178413c..92480391 100644 --- a/apihost/Tnb.API.Entry/wwwroot/Template/VengineSqlSugar/EntityInfoAcmen.cshtml +++ b/apihost/Tnb.API.Entry/wwwroot/Template/VengineSqlSugar/EntityInfoAcmen.cshtml @@ -1,11 +1,5 @@ //////////////////////////////////////////////////// -// 本文件由拓通低代码开发平台自动生成,请不要修改 // -// ________ ___ ________ // -// /__ __/ / \ /__ __/ // -// / / / / / / // -// / / / / / / // -// /__/ \___/ /__/ // -// // +// 本文件由卡奥斯低代码开发平台自动生成,请不要修改 // //////////////////////////////////////////////////// @using JNPF.Common.Extension; diff --git a/app/Tnb.Apps.Entitys/Entity/AppDataEntity.cs b/app/Tnb.Apps.Entitys/Entity/AppDataEntity.cs index 90cf559e..a2fce06e 100644 --- a/app/Tnb.Apps.Entitys/Entity/AppDataEntity.cs +++ b/app/Tnb.Apps.Entitys/Entity/AppDataEntity.cs @@ -6,7 +6,7 @@ namespace JNPF.Apps.Entitys; /// /// App常用数据 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// [SugarTable("BASE_APPDATA")] diff --git a/app/Tnb.Apps.Interfaces/IAppDataService.cs b/app/Tnb.Apps.Interfaces/IAppDataService.cs index 9d1dacc9..5d1710be 100644 --- a/app/Tnb.Apps.Interfaces/IAppDataService.cs +++ b/app/Tnb.Apps.Interfaces/IAppDataService.cs @@ -5,7 +5,7 @@ namespace JNPF.Apps.Interfaces; /// /// App常用数据 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01 . /// public interface IAppDataService diff --git a/app/Tnb.Apps/AppDataService.cs b/app/Tnb.Apps/AppDataService.cs index 27cd871c..91c95cda 100644 --- a/app/Tnb.Apps/AppDataService.cs +++ b/app/Tnb.Apps/AppDataService.cs @@ -23,7 +23,7 @@ namespace JNPF.Apps; /// /// App常用数据 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01 . /// [ApiDescriptionSettings(Tag = "App", Name = "Data", Order = 800)] diff --git a/app/Tnb.Apps/AppMenuService.cs b/app/Tnb.Apps/AppMenuService.cs index 1102d5a0..cbb7d697 100644 --- a/app/Tnb.Apps/AppMenuService.cs +++ b/app/Tnb.Apps/AppMenuService.cs @@ -11,7 +11,7 @@ namespace JNPF.Apps; /// /// App菜单 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01 . /// [ApiDescriptionSettings(Tag = "App", Name = "Menu", Order = 800)] diff --git a/app/Tnb.Apps/AppUserService.cs b/app/Tnb.Apps/AppUserService.cs index fcd60326..431f5dd8 100644 --- a/app/Tnb.Apps/AppUserService.cs +++ b/app/Tnb.Apps/AppUserService.cs @@ -12,7 +12,7 @@ namespace JNPF.Apps; /// /// App用户信息 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// [ApiDescriptionSettings(Tag = "App", Name = "User", Order = 800)] diff --git a/app/Tnb.Apps/AppVersion.cs b/app/Tnb.Apps/AppVersion.cs index 9be75f5b..4498391b 100644 --- a/app/Tnb.Apps/AppVersion.cs +++ b/app/Tnb.Apps/AppVersion.cs @@ -10,7 +10,7 @@ namespace JNPF.Apps; /// /// App版本信息 /// 版 本:V3.3 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2022-04-07. /// [ApiDescriptionSettings(Tag = "App", Name = "Version", Order = 806)] diff --git a/common/Tnb.Common.Core/EventBus/LogEventSubscriber.cs b/common/Tnb.Common.Core/EventBus/LogEventSubscriber.cs index a9a47d5c..1c3a10d0 100644 --- a/common/Tnb.Common.Core/EventBus/LogEventSubscriber.cs +++ b/common/Tnb.Common.Core/EventBus/LogEventSubscriber.cs @@ -1,6 +1,8 @@ -using JNPF.Common.Configuration; +using System.Text.RegularExpressions; +using JNPF.Common.Configuration; using JNPF.DependencyInjection; using JNPF.EventBus; +using JNPF.VisualDev.Entitys; using SqlSugar; namespace JNPF.EventHandler; @@ -42,7 +44,18 @@ public class LogEventSubscriber : IEventSubscriber, ISingleton _sqlSugarClient.ChangeDatabase(log.ConnectionConfig.ConfigId); } - await _sqlSugarClient.CopyNew().Insertable(log.Entity).IgnoreColumns(ignoreNullColumn: true).ExecuteCommandAsync(); + string pattern = @"^[0-9]*$"; + var db = _sqlSugarClient.CopyNew(); + if (!string.IsNullOrEmpty(log.Entity.ModuleId) && new Regex(pattern).IsMatch(log.Entity.ModuleId)) + { + var module = await db.Queryable().Where(x => x.Id == log.Entity.ModuleId).FirstAsync(); + if (module != null) + { + log.Entity.ModuleName = module.FullName; + } + } + + await db.Insertable(log.Entity).IgnoreColumns(ignoreNullColumn: true).ExecuteCommandAsync(); } /// diff --git a/common/Tnb.Common.Core/Filter/RequestActionFilter.cs b/common/Tnb.Common.Core/Filter/RequestActionFilter.cs index 46d764a8..8eb30bff 100644 --- a/common/Tnb.Common.Core/Filter/RequestActionFilter.cs +++ b/common/Tnb.Common.Core/Filter/RequestActionFilter.cs @@ -107,7 +107,77 @@ public class RequestActionFilter : IAsyncActionFilter ModuleName = module.ModuleName, Json = string.Format("{0}应用【{1}】【{2}】", module.Action, args, result?.ToJsonString()) })); + }else if (actionName == "JNPF.VisualDev.VisualDevModelDataService.Create") + { + var args = context.ActionArguments.ToJsonString(); + var result = (actionContext.Result as JsonResult)?.Value; + + string moduleId = httpRequest.Path.Value.Substring(httpRequest.Path.Value.LastIndexOf("/")+1); + + await _eventPublisher.PublishAsync(new LogEventSource("Log:CreateOpLog", options, new SysLogEntity + { + Id = SnowflakeIdHelper.NextId(), + UserId = userId, + UserName = userName, + Category = 3, + IPAddress = NetHelper.Ip, + RequestURL = httpRequest.Path, + RequestDuration = (int)sw.ElapsedMilliseconds, + RequestMethod = "新增", + PlatForm = string.Format("{0}-{1}", userAgent.OS.ToString(), userAgent.RawValue), + CreatorTime = DateTime.Now, + ModuleName = moduleId, + ModuleId = moduleId, + Json = string.Format("{0}应用【{1}】【{2}】", "新增", args, result?.ToJsonString()) + })); + }else if (actionName == "JNPF.VisualDev.VisualDevModelDataService.Update") + { + var args = context.ActionArguments.ToJsonString(); + var result = (actionContext.Result as JsonResult)?.Value; + string[] arr = httpRequest.Path.Value.Split("/"); + string moduleId = arr[arr.Length - 2]; + + await _eventPublisher.PublishAsync(new LogEventSource("Log:CreateOpLog", options, new SysLogEntity + { + Id = SnowflakeIdHelper.NextId(), + UserId = userId, + UserName = userName, + Category = 3, + IPAddress = NetHelper.Ip, + RequestURL = httpRequest.Path, + RequestDuration = (int)sw.ElapsedMilliseconds, + RequestMethod = "编辑", + PlatForm = string.Format("{0}-{1}", userAgent.OS.ToString(), userAgent.RawValue), + CreatorTime = DateTime.Now, + ModuleName = moduleId, + ModuleId = moduleId, + Json = string.Format("{0}应用【{1}】【{2}】", "编辑", args, result?.ToJsonString()) + })); + }else if (actionName == "JNPF.VisualDev.VisualDevModelDataService.Delete") + { + var args = context.ActionArguments.ToJsonString(); + var result = (actionContext.Result as JsonResult)?.Value; + string[] arr = httpRequest.Path.Value.Split("/"); + string moduleId = arr[arr.Length - 2]; + + await _eventPublisher.PublishAsync(new LogEventSource("Log:CreateOpLog", options, new SysLogEntity + { + Id = SnowflakeIdHelper.NextId(), + UserId = userId, + UserName = userName, + Category = 3, + IPAddress = NetHelper.Ip, + RequestURL = httpRequest.Path, + RequestDuration = (int)sw.ElapsedMilliseconds, + RequestMethod = "删除", + PlatForm = string.Format("{0}-{1}", userAgent.OS.ToString(), userAgent.RawValue), + CreatorTime = DateTime.Now, + ModuleName = moduleId, + ModuleId = moduleId, + Json = string.Format("{0}应用【{1}】【{2}】", "删除", args, result?.ToJsonString()) + })); } + } } } \ No newline at end of file diff --git a/common/Tnb.Common/Contracts/Entity.cs b/common/Tnb.Common/Contracts/Entity.cs index 19f7378b..2e8b4bc6 100644 --- a/common/Tnb.Common/Contracts/Entity.cs +++ b/common/Tnb.Common/Contracts/Entity.cs @@ -1,7 +1,3 @@ -///////////////////////////////////////////////////////////////////////////////// -// 宁波拓通e智造平台 ToTong Next Builder // -// https://git.tuotong-tech.com/tnb/tnb.server // -///////////////////////////////////////////////////////////////////////////////// using JNPF.Common.Contracts; diff --git a/common/Tnb.Common/Models/AnnexModel.cs b/common/Tnb.Common/Models/AnnexModel.cs index 64e66bc7..6850a8b1 100644 --- a/common/Tnb.Common/Models/AnnexModel.cs +++ b/common/Tnb.Common/Models/AnnexModel.cs @@ -5,7 +5,7 @@ namespace JNPF.Common.Models /// /// 附件模型 /// 版 本:V3.3.3 - /// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 作 者:JNPF开发平台组. /// [SuppressSniffer] diff --git a/common/Tnb.Common/Models/ChunkModel.cs b/common/Tnb.Common/Models/ChunkModel.cs index 7e47314a..1132e23b 100644 --- a/common/Tnb.Common/Models/ChunkModel.cs +++ b/common/Tnb.Common/Models/ChunkModel.cs @@ -6,7 +6,7 @@ namespace JNPF.Common.Models; /// /// 文件分片模型 /// 版 本:V3.3.3 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 作 者:JNPF开发平台组. /// [SuppressSniffer] diff --git a/common/Tnb.Common/Models/NPOI/ExcelColumnModel.cs b/common/Tnb.Common/Models/NPOI/ExcelColumnModel.cs index 4d665ed8..0dbbc8f6 100644 --- a/common/Tnb.Common/Models/NPOI/ExcelColumnModel.cs +++ b/common/Tnb.Common/Models/NPOI/ExcelColumnModel.cs @@ -6,8 +6,6 @@ namespace JNPF.Common.Models.NPOI; /// /// Excel导出列名 /// 版 本:V3.0.0 -/// 版 权:引迈信息技术有限公司(https://www.jnpfsoft.com) -/// 作 者:JNPF开发平台组 /// 日 期:2017.03.09. /// [SuppressSniffer] diff --git a/common/Tnb.Common/Models/NPOI/ExcelConfig.cs b/common/Tnb.Common/Models/NPOI/ExcelConfig.cs index 8f215a02..2c255f4c 100644 --- a/common/Tnb.Common/Models/NPOI/ExcelConfig.cs +++ b/common/Tnb.Common/Models/NPOI/ExcelConfig.cs @@ -6,8 +6,6 @@ namespace JNPF.Common.Models.NPOI; /// /// Excel导出配置 /// 版 本:V3.0.0 -/// 版 权:引迈信息技术有限公司(https://www.jnpfsoft.com) -/// 作 者:JNPF开发平台组 /// 日 期:2017.03.09. /// [SuppressSniffer] diff --git a/common/Tnb.Common/Models/NPOI/ExcelTemplateModel.cs b/common/Tnb.Common/Models/NPOI/ExcelTemplateModel.cs index ce795303..b75ce5ff 100644 --- a/common/Tnb.Common/Models/NPOI/ExcelTemplateModel.cs +++ b/common/Tnb.Common/Models/NPOI/ExcelTemplateModel.cs @@ -5,8 +5,6 @@ namespace JNPF.Common.Models.NPOI; /// /// Excel导出模板 /// 版 本:V3.0.0 -/// 版 权:引迈信息技术有限公司(https://www.jnpfsoft.com) -/// 作 者:JNPF开发平台组 /// 日 期:2017.03.09. /// [SuppressSniffer] diff --git a/common/Tnb.Common/Models/User/UserInfoModel.cs b/common/Tnb.Common/Models/User/UserInfoModel.cs index 909727f7..2a9f5102 100644 --- a/common/Tnb.Common/Models/User/UserInfoModel.cs +++ b/common/Tnb.Common/Models/User/UserInfoModel.cs @@ -5,8 +5,6 @@ namespace JNPF.Common.Models.User /// /// 登录者信息 /// 版 本:V3.2.0 - /// 版 权:引迈信息技术有限公司(https://www.jnpfsoft.com) - /// 作 者:JNPF开发平台组. /// [SuppressSniffer] public class UserInfoModel diff --git a/common/Tnb.Common/Security/CodeGenHelper.cs b/common/Tnb.Common/Security/CodeGenHelper.cs index aa75e88c..c77c0613 100644 --- a/common/Tnb.Common/Security/CodeGenHelper.cs +++ b/common/Tnb.Common/Security/CodeGenHelper.cs @@ -291,7 +291,7 @@ public static class CodeGenHelper result.Add(label, "系统自动生成"); break; case JnpfKeyConst.COMSELECT: - result.Add(label, multiple ? "例:引迈信息/产品部,引迈信息/技术部" : "例:引迈信息/技术部"); + result.Add(label, multiple ? "例:卡奥斯信息/产品部,卡奥斯信息/技术部" : "例:卡奥斯信息/技术部"); break; case JnpfKeyConst.DEPSELECT: result.Add(label, multiple ? "例:产品部/部门编码,技术部/部门编码" : "例:技术部/部门编码"); @@ -303,7 +303,7 @@ public static class CodeGenHelper result.Add(label, multiple ? "例:张三/账号,李四/账号" : "例:张三/账号"); break; case JnpfKeyConst.USERSSELECT: - result.Add(label, multiple ? "例:引迈信息/产品部,产品部/部门编码,技术经理/岗位编码,研发人员/角色编码,A分组/分组编码,张三/账号" : "例:李四/账号"); + result.Add(label, multiple ? "例:卡奥斯信息/产品部,产品部/部门编码,技术经理/岗位编码,研发人员/角色编码,A分组/分组编码,张三/账号" : "例:李四/账号"); break; case JnpfKeyConst.ROLESELECT: result.Add(label, multiple ? "例:研发人员/角色编码,测试人员/角色编码" : "例:研发人员/角色编码"); diff --git a/common/Tnb.Common/Security/ExcelExportHelper.cs b/common/Tnb.Common/Security/ExcelExportHelper.cs index 4c3c7fa2..7657801f 100644 --- a/common/Tnb.Common/Security/ExcelExportHelper.cs +++ b/common/Tnb.Common/Security/ExcelExportHelper.cs @@ -16,7 +16,7 @@ namespace JNPF.Common.Security; /// /// Excel导出操作类 /// 版 本:V3.2.0 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2017.03.09. /// [SuppressSniffer] @@ -226,16 +226,16 @@ public class ExcelExportHelper SummaryInformation si = PropertySetFactory.CreateSummaryInformation(); // 填加xls文件作者信息 - si.Author = "拓通智联科技有限公司"; + si.Author = "卡奥斯数字科技有限公司"; // 填加xls文件创建程序信息 - si.ApplicationName = "拓通智联科技有限公司"; + si.ApplicationName = "卡奥斯数字科技有限公司"; // 填加xls文件最后保存者信息 - si.LastAuthor = "拓通智联科技有限公司"; + si.LastAuthor = "卡奥斯数字科技有限公司"; // 填加xls文件作者信息 - si.Comments = "拓通智联科技有限公司"; + si.Comments = "卡奥斯数字科技有限公司"; // 填加xls文件标题信息 si.Title = "标题信息"; @@ -487,16 +487,16 @@ public class ExcelExportHelper SummaryInformation si = PropertySetFactory.CreateSummaryInformation(); // 填加xls文件作者信息 - si.Author = "拓通智联科技有限公司"; + si.Author = "卡奥斯数字科技有限公司"; // 填加xls文件创建程序信息 - si.ApplicationName = "拓通智联科技有限公司"; + si.ApplicationName = "卡奥斯数字科技有限公司"; // 填加xls文件最后保存者信息 - si.LastAuthor = "拓通智联科技有限公司"; + si.LastAuthor = "卡奥斯数字科技有限公司"; // 填加xls文件作者信息 - si.Comments = "拓通智联科技有限公司"; + si.Comments = "卡奥斯数字科技有限公司"; // 填加xls文件标题信息 si.Title = "标题信息"; @@ -762,16 +762,16 @@ public class ExcelExportHelper SummaryInformation si = PropertySetFactory.CreateSummaryInformation(); // 填加xls文件作者信息 - si.Author = "拓通智联科技有限公司"; + si.Author = "卡奥斯数字科技有限公司"; // 填加xls文件创建程序信息 - si.ApplicationName = "拓通智联科技有限公司"; + si.ApplicationName = "卡奥斯数字科技有限公司"; // 填加xls文件最后保存者信息 - si.LastAuthor = "拓通智联科技有限公司"; + si.LastAuthor = "卡奥斯数字科技有限公司"; // 填加xls文件作者信息 - si.Comments = "拓通智联科技有限公司"; + si.Comments = "卡奥斯数字科技有限公司"; // 填加xls文件标题信息 si.Title = "标题信息"; diff --git a/common/Tnb.Common/Security/ExcelImportHelper.cs b/common/Tnb.Common/Security/ExcelImportHelper.cs index 77b164b1..ecd4abaa 100644 --- a/common/Tnb.Common/Security/ExcelImportHelper.cs +++ b/common/Tnb.Common/Security/ExcelImportHelper.cs @@ -9,7 +9,7 @@ namespace JNPF.Common.Helper /// /// Excel导入操作类 /// 版 本:V3.2.0 - /// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2017.03.12. /// [SuppressSniffer] diff --git a/common/Tnb.Common/Security/FileHelper.cs b/common/Tnb.Common/Security/FileHelper.cs index 06985c42..4c40635a 100644 --- a/common/Tnb.Common/Security/FileHelper.cs +++ b/common/Tnb.Common/Security/FileHelper.cs @@ -12,7 +12,7 @@ namespace JNPF.Common.Security; /// /// FileHelper /// 版 本:V3.2.0 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 作 者:JNPF开发平台组. /// [SuppressSniffer] diff --git a/common/Tnb.Common/Security/JsonHelper.cs b/common/Tnb.Common/Security/JsonHelper.cs index dc9f8913..b0a968d8 100644 --- a/common/Tnb.Common/Security/JsonHelper.cs +++ b/common/Tnb.Common/Security/JsonHelper.cs @@ -7,7 +7,7 @@ namespace JNPF.Common.Security; /// /// JsonHelper /// 版 本:V3.4.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 作 者:JNPF开发平台组. /// public static class JsonHelper diff --git a/common/Tnb.Common/Security/NetHelper.cs b/common/Tnb.Common/Security/NetHelper.cs index 9444de66..fed555c6 100644 --- a/common/Tnb.Common/Security/NetHelper.cs +++ b/common/Tnb.Common/Security/NetHelper.cs @@ -9,7 +9,7 @@ namespace JNPF.Common.Security; /// /// 网络操作 /// 版 本:V3.0.0 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 作 者:JNPF开发平台组. /// [SuppressSniffer] diff --git a/common/Tnb.Common/Security/PinyinHelper.cs b/common/Tnb.Common/Security/PinyinHelper.cs index 1d862a43..0b8ba55f 100644 --- a/common/Tnb.Common/Security/PinyinHelper.cs +++ b/common/Tnb.Common/Security/PinyinHelper.cs @@ -6,7 +6,7 @@ namespace JNPF.Common.Security; /// /// 汉字转换拼音 /// 版 本:V3.2.0 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 作 者:JNPF开发平台组. /// [SuppressSniffer] diff --git a/common/Tnb.Common/Security/QueryTreeHelper.cs b/common/Tnb.Common/Security/QueryTreeHelper.cs index 3baf070b..bedbfe22 100644 --- a/common/Tnb.Common/Security/QueryTreeHelper.cs +++ b/common/Tnb.Common/Security/QueryTreeHelper.cs @@ -7,7 +7,7 @@ namespace JNPF.Common.Security; /// /// 树形结构查询 /// 版 本:V3.2.0 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 作 者:JNPF开发平台组. /// [SuppressSniffer] diff --git a/common/Tnb.Common/Utils/AdapterCfg.cs b/common/Tnb.Common/Utils/AdapterCfg.cs index 3fe5d46e..f2449f18 100644 --- a/common/Tnb.Common/Utils/AdapterCfg.cs +++ b/common/Tnb.Common/Utils/AdapterCfg.cs @@ -1,8 +1,4 @@ -///////////////////////////////////////////////////////////////////////////////// -// 宁波拓通e智造平台 ToTong Next Builder // -// https://git.tuotong-tech.com/tnb/tnb.server // -///////////////////////////////////////////////////////////////////////////////// - + using Newtonsoft.Json.Linq; namespace Mapster; diff --git a/common/Tnb.SqlSugar/Repositories/SqlSugarRepository.cs b/common/Tnb.SqlSugar/Repositories/SqlSugarRepository.cs index 18a55888..44195df4 100644 --- a/common/Tnb.SqlSugar/Repositories/SqlSugarRepository.cs +++ b/common/Tnb.SqlSugar/Repositories/SqlSugarRepository.cs @@ -73,17 +73,17 @@ where TEntity : class, new() base.Context.Ado.CommandTimeOut = 30; base.Context.Aop.OnLogExecuted = (sql, pars) => { - var oldColor = Console.ForegroundColor; + // var oldColor = Console.ForegroundColor; Console.ForegroundColor = ConsoleColor.Green; var finalSql = UtilMethods.GetSqlString(Context.CurrentConnectionConfig.DbType, sql, pars); - Console.WriteLine($"【{DateTime.Now.ToString("HH:mm:ss.fff")}——SQL执行完成】{Context.Ado.SqlExecutionTime.TotalMilliseconds} ms"); - Console.WriteLine(finalSql); - Console.ForegroundColor = oldColor; + // Console.WriteLine($"【{DateTime.Now.ToString("HH:mm:ss.fff")}——SQL执行完成】{Context.Ado.SqlExecutionTime.TotalMilliseconds} ms"); + // Console.WriteLine(finalSql); + // Console.ForegroundColor = oldColor; if (Context.Ado.SqlExecutionTime.TotalMilliseconds > 3000) { Log.Warning($"慢查询: {Context.Ado.SqlExecutionTime.TotalMilliseconds}ms, SQL: " + finalSql); } - Console.WriteLine(); + // Console.WriteLine(); //App.PrintToMiniProfiler("SqlSugar", "Info", sql + "\r\n" + base.Context.Utilities.SerializeObject(pars.ToDictionary(it => it.ParameterName, it => it.Value))); }; base.Context.Aop.OnError = (ex) => diff --git a/common/Tnb.SqlSugar/Tnb.SqlSugar.csproj b/common/Tnb.SqlSugar/Tnb.SqlSugar.csproj index 87c80703..20799dc6 100644 --- a/common/Tnb.SqlSugar/Tnb.SqlSugar.csproj +++ b/common/Tnb.SqlSugar/Tnb.SqlSugar.csproj @@ -5,7 +5,7 @@ - ToTong + cosmoplat TNB 数据库访问器 SqlSugar 插件 enable $(NoWarn);CS1591; diff --git a/message/Tnb.Message.Entitys/Dto/IM/OnlineUserListOutput.cs b/message/Tnb.Message.Entitys/Dto/IM/OnlineUserListOutput.cs index 13205261..534b1cfe 100644 --- a/message/Tnb.Message.Entitys/Dto/IM/OnlineUserListOutput.cs +++ b/message/Tnb.Message.Entitys/Dto/IM/OnlineUserListOutput.cs @@ -5,7 +5,7 @@ namespace JNPF.Message.Entitys.Dto.IM; /// /// 在线用户 /// 版 本:V3.2.0 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2017.09.20. /// [SuppressSniffer] diff --git a/message/Tnb.Message.Entitys/Entity/IMContentEntity.cs b/message/Tnb.Message.Entitys/Entity/IMContentEntity.cs index 2beba0c2..0234a8e9 100644 --- a/message/Tnb.Message.Entitys/Entity/IMContentEntity.cs +++ b/message/Tnb.Message.Entitys/Entity/IMContentEntity.cs @@ -6,7 +6,7 @@ namespace JNPF.Message.Entitys; /// /// 在线聊天 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// [SugarTable("BASE_IMCONTENT")] diff --git a/message/Tnb.Message.Entitys/Entity/MessageAccountEntity.cs b/message/Tnb.Message.Entitys/Entity/MessageAccountEntity.cs index 39416b8f..01e04b06 100644 --- a/message/Tnb.Message.Entitys/Entity/MessageAccountEntity.cs +++ b/message/Tnb.Message.Entitys/Entity/MessageAccountEntity.cs @@ -6,7 +6,7 @@ namespace JNPF.Message.Entitys.Entity; /// /// 消息账号配置 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// [SugarTable("BASE_MESSAGE_ACCOUNT_CONFIG")] diff --git a/message/Tnb.Message.Entitys/Entity/MessageDataTypeEntity.cs b/message/Tnb.Message.Entitys/Entity/MessageDataTypeEntity.cs index b632cbf0..46b395cb 100644 --- a/message/Tnb.Message.Entitys/Entity/MessageDataTypeEntity.cs +++ b/message/Tnb.Message.Entitys/Entity/MessageDataTypeEntity.cs @@ -6,7 +6,7 @@ namespace JNPF.Message.Entitys.Entity; /// /// 消息字典配置 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// [SugarTable("BASE_MESSAGE_DATA_TYPE")] diff --git a/message/Tnb.Message.Entitys/Entity/MessageEntity.cs b/message/Tnb.Message.Entitys/Entity/MessageEntity.cs index ab55cc10..5c75bef9 100644 --- a/message/Tnb.Message.Entitys/Entity/MessageEntity.cs +++ b/message/Tnb.Message.Entitys/Entity/MessageEntity.cs @@ -6,7 +6,7 @@ namespace JNPF.Message.Entitys; /// /// 消息实例 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// [SugarTable("BASE_MESSAGE")] diff --git a/message/Tnb.Message.Entitys/Entity/MessageMonitorEntity.cs b/message/Tnb.Message.Entitys/Entity/MessageMonitorEntity.cs index ed4aa312..a175a8a4 100644 --- a/message/Tnb.Message.Entitys/Entity/MessageMonitorEntity.cs +++ b/message/Tnb.Message.Entitys/Entity/MessageMonitorEntity.cs @@ -6,7 +6,6 @@ namespace JNPF.Message.Entitys.Entity; /// /// 消息监控 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) /// 日 期:2021-06-01. /// [SugarTable("BASE_MESSAGE_MONITOR")] diff --git a/message/Tnb.Message.Entitys/Entity/MessageReceiveEntity.cs b/message/Tnb.Message.Entitys/Entity/MessageReceiveEntity.cs index 66a84eaa..355b2131 100644 --- a/message/Tnb.Message.Entitys/Entity/MessageReceiveEntity.cs +++ b/message/Tnb.Message.Entitys/Entity/MessageReceiveEntity.cs @@ -6,7 +6,7 @@ namespace JNPF.Message.Entitys; /// /// 消息接收 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// [SugarTable("BASE_MESSAGERECEIVE")] diff --git a/message/Tnb.Message.Entitys/Entity/MessageSendEntity.cs b/message/Tnb.Message.Entitys/Entity/MessageSendEntity.cs index 15f1fc97..18c5b2c3 100644 --- a/message/Tnb.Message.Entitys/Entity/MessageSendEntity.cs +++ b/message/Tnb.Message.Entitys/Entity/MessageSendEntity.cs @@ -6,7 +6,7 @@ namespace JNPF.Message.Entitys.Entity; /// /// 消息发送配置 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// [SugarTable("BASE_MESSAGE_SEND_CONFIG")] diff --git a/message/Tnb.Message.Entitys/Entity/MessageSendRecordEntity.cs b/message/Tnb.Message.Entitys/Entity/MessageSendRecordEntity.cs index 6a2cdd84..39f5d925 100644 --- a/message/Tnb.Message.Entitys/Entity/MessageSendRecordEntity.cs +++ b/message/Tnb.Message.Entitys/Entity/MessageSendRecordEntity.cs @@ -6,7 +6,7 @@ namespace JNPF.Message.Entitys.Entity; /// /// 消息发送记录配置 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// [SugarTable("BASE_MESSAGE_SEND_RECORD")] diff --git a/message/Tnb.Message.Entitys/Entity/MessageSendTemplateEntity.cs b/message/Tnb.Message.Entitys/Entity/MessageSendTemplateEntity.cs index fa34cd6b..054f7f88 100644 --- a/message/Tnb.Message.Entitys/Entity/MessageSendTemplateEntity.cs +++ b/message/Tnb.Message.Entitys/Entity/MessageSendTemplateEntity.cs @@ -6,7 +6,7 @@ namespace JNPF.Message.Entitys.Entity; /// /// 消息发送模板配置 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// [SugarTable("BASE_MESSAGE_SEND_TEMPLATE")] diff --git a/message/Tnb.Message.Entitys/Entity/MessageShortLinkEntity.cs b/message/Tnb.Message.Entitys/Entity/MessageShortLinkEntity.cs index ff7d9060..baa30e53 100644 --- a/message/Tnb.Message.Entitys/Entity/MessageShortLinkEntity.cs +++ b/message/Tnb.Message.Entitys/Entity/MessageShortLinkEntity.cs @@ -6,7 +6,7 @@ namespace JNPF.Message.Entitys.Entity; /// /// 消息连接 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// [SugarTable("BASE_MESSAGE_SHORT_LINK")] diff --git a/message/Tnb.Message.Entitys/Entity/MessageSmsFieldEntity.cs b/message/Tnb.Message.Entitys/Entity/MessageSmsFieldEntity.cs index ad432df4..d3fe8e6e 100644 --- a/message/Tnb.Message.Entitys/Entity/MessageSmsFieldEntity.cs +++ b/message/Tnb.Message.Entitys/Entity/MessageSmsFieldEntity.cs @@ -6,7 +6,7 @@ namespace JNPF.Message.Entitys.Entity; /// /// 短信变量 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// [SugarTable("BASE_MESSAGE_SMS_FIELD")] diff --git a/message/Tnb.Message.Entitys/Entity/MessageTemplateEntity.cs b/message/Tnb.Message.Entitys/Entity/MessageTemplateEntity.cs index 08ca9030..41aefdf8 100644 --- a/message/Tnb.Message.Entitys/Entity/MessageTemplateEntity.cs +++ b/message/Tnb.Message.Entitys/Entity/MessageTemplateEntity.cs @@ -6,7 +6,7 @@ namespace JNPF.Message.Entitys.Entity; /// /// 消息模板配置 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// [SugarTable("BASE_MESSAGE_TEMPLATE_CONFIG")] diff --git a/message/Tnb.Message.Entitys/Entity/MessageTemplateParamEntity.cs b/message/Tnb.Message.Entitys/Entity/MessageTemplateParamEntity.cs index 47baf4ac..a78a8aeb 100644 --- a/message/Tnb.Message.Entitys/Entity/MessageTemplateParamEntity.cs +++ b/message/Tnb.Message.Entitys/Entity/MessageTemplateParamEntity.cs @@ -6,7 +6,7 @@ namespace JNPF.Message.Entitys.Entity; /// /// 消息模板参数 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// [SugarTable("BASE_MESSAGE_TEMPLATE_PARAM")] diff --git a/message/Tnb.Message.Entitys/Entity/MessageWechatUserEntity.cs b/message/Tnb.Message.Entitys/Entity/MessageWechatUserEntity.cs index c9fe39b4..b8298f6a 100644 --- a/message/Tnb.Message.Entitys/Entity/MessageWechatUserEntity.cs +++ b/message/Tnb.Message.Entitys/Entity/MessageWechatUserEntity.cs @@ -6,7 +6,7 @@ namespace JNPF.Message.Entitys.Entity; /// /// 微信公众号用户 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// [SugarTable("BASE_MESSAGE_WECHAT_USER")] diff --git a/message/Tnb.Message.Entitys/Entity/UserDeviceEntity.cs b/message/Tnb.Message.Entitys/Entity/UserDeviceEntity.cs index 1b988883..041229ed 100644 --- a/message/Tnb.Message.Entitys/Entity/UserDeviceEntity.cs +++ b/message/Tnb.Message.Entitys/Entity/UserDeviceEntity.cs @@ -6,7 +6,7 @@ namespace JNPF.Message.Entitys.Entity; /// /// 个推用户表. /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// [SugarTable("BASE_USER_DEVICE")] diff --git a/message/Tnb.Message.Interfaces/IMessageService.cs b/message/Tnb.Message.Interfaces/IMessageService.cs index d9b18ce4..86d02ed6 100644 --- a/message/Tnb.Message.Interfaces/IMessageService.cs +++ b/message/Tnb.Message.Interfaces/IMessageService.cs @@ -3,7 +3,7 @@ /// /// 系统消息 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// public interface IMessageService diff --git a/message/Tnb.Message.Interfaces/IShortLinkService.cs b/message/Tnb.Message.Interfaces/IShortLinkService.cs index d01fb7bb..4a44a1c0 100644 --- a/message/Tnb.Message.Interfaces/IShortLinkService.cs +++ b/message/Tnb.Message.Interfaces/IShortLinkService.cs @@ -5,7 +5,7 @@ namespace JNPF.Message.Interfaces.Message; /// /// 系统消息 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// public interface IShortLinkService diff --git a/message/Tnb.Message/Service/MessageAccountService.cs b/message/Tnb.Message/Service/MessageAccountService.cs index af1cd157..ebcc7766 100644 --- a/message/Tnb.Message/Service/MessageAccountService.cs +++ b/message/Tnb.Message/Service/MessageAccountService.cs @@ -20,7 +20,7 @@ namespace JNPF.Message.Service; /// /// 消息账号 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// [ApiDescriptionSettings(Tag = "Message", Name = "AccountConfig", Order = 240)] diff --git a/message/Tnb.Message/Service/MessageDataTypeService.cs b/message/Tnb.Message/Service/MessageDataTypeService.cs index 3198d3db..60d00c6a 100644 --- a/message/Tnb.Message/Service/MessageDataTypeService.cs +++ b/message/Tnb.Message/Service/MessageDataTypeService.cs @@ -9,7 +9,7 @@ namespace JNPF.Message.Service; /// /// 消息账号 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// [ApiDescriptionSettings(Tag = "Message", Name = "MessageDataType", Order = 240)] diff --git a/message/Tnb.Message/Service/MessageMonitorService.cs b/message/Tnb.Message/Service/MessageMonitorService.cs index 1b20d43f..271e4ea9 100644 --- a/message/Tnb.Message/Service/MessageMonitorService.cs +++ b/message/Tnb.Message/Service/MessageMonitorService.cs @@ -15,7 +15,7 @@ namespace JNPF.Message.Service; /// /// 消息监控 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// [ApiDescriptionSettings(Tag = "Message", Name = "MessageMonitor", Order = 240)] diff --git a/message/Tnb.Message/Service/MessageService.cs b/message/Tnb.Message/Service/MessageService.cs index 4c6d71de..9aa75e94 100644 --- a/message/Tnb.Message/Service/MessageService.cs +++ b/message/Tnb.Message/Service/MessageService.cs @@ -26,8 +26,6 @@ namespace JNPF.Message; /// /// 系统消息 /// 版 本:V3.2 -/// 版 权:引迈信息技术有限公司(https://www.jnpfsoft.com) -/// 作 者:JNPF开发平台组 /// 日 期:2021-06-01. /// [ApiDescriptionSettings(Tag = "Message", Name = "message", Order = 240)] diff --git a/message/Tnb.Message/Service/MessageTemplateService.cs b/message/Tnb.Message/Service/MessageTemplateService.cs index 41b56eaa..85f99a4d 100644 --- a/message/Tnb.Message/Service/MessageTemplateService.cs +++ b/message/Tnb.Message/Service/MessageTemplateService.cs @@ -18,7 +18,7 @@ namespace JNPF.Message.Service; /// /// 消息监控 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// [ApiDescriptionSettings(Tag = "Message", Name = "MessageTemplate", Order = 240)] diff --git a/message/Tnb.Message/Service/SendMessageService.cs b/message/Tnb.Message/Service/SendMessageService.cs index 658e4e59..8f40a35d 100644 --- a/message/Tnb.Message/Service/SendMessageService.cs +++ b/message/Tnb.Message/Service/SendMessageService.cs @@ -35,7 +35,7 @@ namespace JNPF.Message.Service; /// /// 发送配置 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// [ApiDescriptionSettings(Tag = "Message", Name = "SendMessage", Order = 240)] diff --git a/message/Tnb.Message/Service/ShortLinkService.cs b/message/Tnb.Message/Service/ShortLinkService.cs index 85b77538..2b0bba06 100644 --- a/message/Tnb.Message/Service/ShortLinkService.cs +++ b/message/Tnb.Message/Service/ShortLinkService.cs @@ -27,7 +27,7 @@ namespace JNPF.Message.Service; /// /// 公众号. /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// [ApiDescriptionSettings(Tag = "Message", Name = "ShortLink", Order = 240)] diff --git a/message/Tnb.Message/Service/WechatOpenService.cs b/message/Tnb.Message/Service/WechatOpenService.cs index d7d5a4fa..7d9af6a1 100644 --- a/message/Tnb.Message/Service/WechatOpenService.cs +++ b/message/Tnb.Message/Service/WechatOpenService.cs @@ -18,7 +18,7 @@ namespace JNPF.Message.Service; /// /// 公众号. /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// [ApiDescriptionSettings(Tag = "Message", Name = "WechatOpen", Order = 240)] diff --git a/request.http b/request.http index eea74a8c..60a984df 100644 --- a/request.http +++ b/request.http @@ -1,5 +1,5 @@ @host=http://localhost:9231 -//@host=http://api.tuotong-tech.com +//@host=http://api.cosmoplat-tech.com ### 用户登录 # @name login diff --git a/system/Tnb.Systems.Entitys/Entity/Permission/ColumnsPurviewEntity.cs b/system/Tnb.Systems.Entitys/Entity/Permission/ColumnsPurviewEntity.cs index 2a7dbf75..c40e1513 100644 --- a/system/Tnb.Systems.Entitys/Entity/Permission/ColumnsPurviewEntity.cs +++ b/system/Tnb.Systems.Entitys/Entity/Permission/ColumnsPurviewEntity.cs @@ -6,7 +6,7 @@ namespace JNPF.Systems.Entitys.Permission; /// /// 模块列表权限 /// 版 本:V3.3 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2022-03-15. /// [SugarTable("BASE_COLUMNSPURVIEW")] diff --git a/system/Tnb.Systems.Entitys/Entity/Permission/OrganizeAdministratorEntity.cs b/system/Tnb.Systems.Entitys/Entity/Permission/OrganizeAdministratorEntity.cs index 16df5510..7e6c1c24 100644 --- a/system/Tnb.Systems.Entitys/Entity/Permission/OrganizeAdministratorEntity.cs +++ b/system/Tnb.Systems.Entitys/Entity/Permission/OrganizeAdministratorEntity.cs @@ -6,7 +6,7 @@ namespace JNPF.Systems.Entitys.Permission; /// /// 分级管理 /// 版 本:V3.2.0 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021.09.27. /// [SugarTable("BASE_ORGANIZEADMINISTRATOR")] diff --git a/system/Tnb.Systems.Entitys/Entity/Permission/OrganizeEntity.cs b/system/Tnb.Systems.Entitys/Entity/Permission/OrganizeEntity.cs index 774b8a81..d9bd8fbe 100644 --- a/system/Tnb.Systems.Entitys/Entity/Permission/OrganizeEntity.cs +++ b/system/Tnb.Systems.Entitys/Entity/Permission/OrganizeEntity.cs @@ -6,7 +6,7 @@ namespace JNPF.Systems.Entitys.Permission; /// /// 机构管理 /// 版 本:V3.0.0 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2017.09.20. /// [SugarTable("BASE_ORGANIZE")] diff --git a/system/Tnb.Systems.Entitys/Entity/System/AdvancedQuerySchemeEntity.cs b/system/Tnb.Systems.Entitys/Entity/System/AdvancedQuerySchemeEntity.cs index b4af3482..2c1278dc 100644 --- a/system/Tnb.Systems.Entitys/Entity/System/AdvancedQuerySchemeEntity.cs +++ b/system/Tnb.Systems.Entitys/Entity/System/AdvancedQuerySchemeEntity.cs @@ -6,7 +6,7 @@ namespace JNPF.Systems.Entitys.System; /// /// 高级查询方案 /// 版 本:V3.4 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2022-06-06. /// [SugarTable("BASE_ADVANCEDQUERYSCHEME")] diff --git a/system/Tnb.Systems.Entitys/Entity/System/BillRuleEntity.cs b/system/Tnb.Systems.Entitys/Entity/System/BillRuleEntity.cs index 6a92a153..f0b334bf 100644 --- a/system/Tnb.Systems.Entitys/Entity/System/BillRuleEntity.cs +++ b/system/Tnb.Systems.Entitys/Entity/System/BillRuleEntity.cs @@ -6,7 +6,7 @@ namespace JNPF.Systems.Entitys.System; /// /// 单据规则 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// [SugarTable("BASE_BILLRULE")] diff --git a/system/Tnb.Systems.Entitys/Entity/System/ComFieldsEntity.cs b/system/Tnb.Systems.Entitys/Entity/System/ComFieldsEntity.cs index 54319176..969bcc24 100644 --- a/system/Tnb.Systems.Entitys/Entity/System/ComFieldsEntity.cs +++ b/system/Tnb.Systems.Entitys/Entity/System/ComFieldsEntity.cs @@ -6,7 +6,7 @@ namespace JNPF.Systems.Entitys.System; /// /// 常用字段 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// [SugarTable("BASE_COMFIELDS")] diff --git a/system/Tnb.Systems.Entitys/Entity/System/CommonWordsEntity.cs b/system/Tnb.Systems.Entitys/Entity/System/CommonWordsEntity.cs index c5b9bbf1..2f0b4b39 100644 --- a/system/Tnb.Systems.Entitys/Entity/System/CommonWordsEntity.cs +++ b/system/Tnb.Systems.Entitys/Entity/System/CommonWordsEntity.cs @@ -6,8 +6,6 @@ namespace JNPF.Systems.Entitys.Entity.System; /// /// 常用语 /// 版 本:V3.2 -/// 版 权:引迈信息技术有限公司(https://www.jnpfsoft.com) -/// 作 者:JNPF开发平台组 /// 日 期:2021-06-01. /// [SugarTable("BASE_COMMONWORDS")] diff --git a/system/Tnb.Systems.Entitys/Entity/System/DataInterfaceEntity.cs b/system/Tnb.Systems.Entitys/Entity/System/DataInterfaceEntity.cs index e80ff18d..04c20593 100644 --- a/system/Tnb.Systems.Entitys/Entity/System/DataInterfaceEntity.cs +++ b/system/Tnb.Systems.Entitys/Entity/System/DataInterfaceEntity.cs @@ -6,7 +6,7 @@ namespace JNPF.Systems.Entitys.System; /// /// 数据接口 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// [SugarTable("BASE_DATAINTERFACE")] diff --git a/system/Tnb.Systems.Entitys/Entity/System/DataInterfaceLogEntity.cs b/system/Tnb.Systems.Entitys/Entity/System/DataInterfaceLogEntity.cs index 54a2f80f..08ec99d5 100644 --- a/system/Tnb.Systems.Entitys/Entity/System/DataInterfaceLogEntity.cs +++ b/system/Tnb.Systems.Entitys/Entity/System/DataInterfaceLogEntity.cs @@ -6,7 +6,7 @@ namespace JNPF.Systems.Entitys.System; /// /// 数据接口日志 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// [SugarTable("BASE_DATAINTERFACELOG")] diff --git a/system/Tnb.Systems.Entitys/Entity/System/DbBackupEntity.cs b/system/Tnb.Systems.Entitys/Entity/System/DbBackupEntity.cs index 72b91f5f..c2169292 100644 --- a/system/Tnb.Systems.Entitys/Entity/System/DbBackupEntity.cs +++ b/system/Tnb.Systems.Entitys/Entity/System/DbBackupEntity.cs @@ -6,7 +6,7 @@ namespace JNPF.Systems.Entitys.System; /// /// 数据备份 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// [SugarTable("BASE_DBBACKUP")] diff --git a/system/Tnb.Systems.Entitys/Entity/System/DbLinkEntity.cs b/system/Tnb.Systems.Entitys/Entity/System/DbLinkEntity.cs index 7d70e43e..94de3baf 100644 --- a/system/Tnb.Systems.Entitys/Entity/System/DbLinkEntity.cs +++ b/system/Tnb.Systems.Entitys/Entity/System/DbLinkEntity.cs @@ -6,7 +6,7 @@ namespace JNPF.Systems.Entitys.System; /// /// 数据连接 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// [SugarTable("BASE_DBLINK")] diff --git a/system/Tnb.Systems.Entitys/Entity/System/DictionaryDataEntity.cs b/system/Tnb.Systems.Entitys/Entity/System/DictionaryDataEntity.cs index 9ab45095..1036879b 100644 --- a/system/Tnb.Systems.Entitys/Entity/System/DictionaryDataEntity.cs +++ b/system/Tnb.Systems.Entitys/Entity/System/DictionaryDataEntity.cs @@ -6,7 +6,7 @@ namespace JNPF.Systems.Entitys.System; /// /// 字典数据 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// [SugarTable("BASE_DICTIONARYDATA")] diff --git a/system/Tnb.Systems.Entitys/Entity/System/DictionaryTypeEntity.cs b/system/Tnb.Systems.Entitys/Entity/System/DictionaryTypeEntity.cs index 5178206d..3a7ca9c8 100644 --- a/system/Tnb.Systems.Entitys/Entity/System/DictionaryTypeEntity.cs +++ b/system/Tnb.Systems.Entitys/Entity/System/DictionaryTypeEntity.cs @@ -6,7 +6,7 @@ namespace JNPF.Systems.Entitys.System; /// /// 字典分类 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// [SugarTable("BASE_DICTIONARYTYPE")] diff --git a/system/Tnb.Systems.Entitys/Entity/System/InterfaceOauthEntity.cs b/system/Tnb.Systems.Entitys/Entity/System/InterfaceOauthEntity.cs index a34f7fd0..0f7f8bc1 100644 --- a/system/Tnb.Systems.Entitys/Entity/System/InterfaceOauthEntity.cs +++ b/system/Tnb.Systems.Entitys/Entity/System/InterfaceOauthEntity.cs @@ -6,7 +6,7 @@ namespace JNPF.Systems.Entitys.System; /// /// 接口认证 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// [SugarTable("BASE_INTERFACEOAUTH")] diff --git a/system/Tnb.Systems.Entitys/Entity/System/MessageTemplateEntity.cs b/system/Tnb.Systems.Entitys/Entity/System/MessageTemplateEntity.cs index fc2afc8a..e20018b6 100644 --- a/system/Tnb.Systems.Entitys/Entity/System/MessageTemplateEntity.cs +++ b/system/Tnb.Systems.Entitys/Entity/System/MessageTemplateEntity.cs @@ -6,7 +6,7 @@ namespace JNPF.Systems.Entitys.System; /// /// 消息模板 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// [SugarTable("BASE_MESSAGE_TEMPLATE")] diff --git a/system/Tnb.Systems.Entitys/Entity/System/ModuleDataAuthorizeEntity.cs b/system/Tnb.Systems.Entitys/Entity/System/ModuleDataAuthorizeEntity.cs index a00eff2b..e056edc6 100644 --- a/system/Tnb.Systems.Entitys/Entity/System/ModuleDataAuthorizeEntity.cs +++ b/system/Tnb.Systems.Entitys/Entity/System/ModuleDataAuthorizeEntity.cs @@ -6,7 +6,7 @@ namespace JNPF.Systems.Entitys.System; /// /// 数据权限 /// 版 本:V3.0.0 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2017.09.20. /// [SugarTable("BASE_MODULEDATAAUTHORIZE")] diff --git a/system/Tnb.Systems.Entitys/Entity/System/ModuleDataAuthorizeLinkEntity.cs b/system/Tnb.Systems.Entitys/Entity/System/ModuleDataAuthorizeLinkEntity.cs index 4f94ee53..4bba5b72 100644 --- a/system/Tnb.Systems.Entitys/Entity/System/ModuleDataAuthorizeLinkEntity.cs +++ b/system/Tnb.Systems.Entitys/Entity/System/ModuleDataAuthorizeLinkEntity.cs @@ -7,7 +7,7 @@ namespace JNPF.Systems.Entitys.System; /// /// 数据权限连接管理 /// 版 本:V3.0.0 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2017.09.20. /// [SugarTable("BASE_MODULEDATAAUTHORIZELINK")] diff --git a/system/Tnb.Systems.Entitys/Entity/System/ModuleFormEntity.cs b/system/Tnb.Systems.Entitys/Entity/System/ModuleFormEntity.cs index f73c142c..9053a1bc 100644 --- a/system/Tnb.Systems.Entitys/Entity/System/ModuleFormEntity.cs +++ b/system/Tnb.Systems.Entitys/Entity/System/ModuleFormEntity.cs @@ -7,7 +7,7 @@ namespace JNPF.Systems.Entitys.System; /// /// 表单权限 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// [SugarTable("BASE_MODULEFORM")] diff --git a/system/Tnb.Systems.Entitys/Entity/System/PrintDevEntity.cs b/system/Tnb.Systems.Entitys/Entity/System/PrintDevEntity.cs index e08e062d..f617a9d3 100644 --- a/system/Tnb.Systems.Entitys/Entity/System/PrintDevEntity.cs +++ b/system/Tnb.Systems.Entitys/Entity/System/PrintDevEntity.cs @@ -7,7 +7,7 @@ namespace JNPF.Systems.Entitys.System; /// /// 打印模板配置 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// [SugarTable("BASE_PRINTDEV")] diff --git a/system/Tnb.Systems.Entitys/Entity/System/PrintLogEntity.cs b/system/Tnb.Systems.Entitys/Entity/System/PrintLogEntity.cs index d309b5af..bbb55a0a 100644 --- a/system/Tnb.Systems.Entitys/Entity/System/PrintLogEntity.cs +++ b/system/Tnb.Systems.Entitys/Entity/System/PrintLogEntity.cs @@ -7,8 +7,6 @@ namespace JNPF.Systems.Entitys.Entity.System; /// /// 打印模板日志 /// 版 本:V3.2 -/// 版 权:引迈信息技术有限公司(https://www.jnpfsoft.com) -/// 作 者:JNPF开发平台组 /// 日 期:2021-06-01. /// [SugarTable("BASE_PRINT_LOG")] diff --git a/system/Tnb.Systems.Entitys/Entity/System/ProvinceEntity.cs b/system/Tnb.Systems.Entitys/Entity/System/ProvinceEntity.cs index cee92b65..8a89072c 100644 --- a/system/Tnb.Systems.Entitys/Entity/System/ProvinceEntity.cs +++ b/system/Tnb.Systems.Entitys/Entity/System/ProvinceEntity.cs @@ -6,7 +6,7 @@ namespace JNPF.Systems.Entitys.System; /// /// 行政区划 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// [SugarTable("BASE_PROVINCE")] diff --git a/system/Tnb.Systems.Entitys/Entity/System/SynThirdInfoEntity.cs b/system/Tnb.Systems.Entitys/Entity/System/SynThirdInfoEntity.cs index c0369c37..bf02cc77 100644 --- a/system/Tnb.Systems.Entitys/Entity/System/SynThirdInfoEntity.cs +++ b/system/Tnb.Systems.Entitys/Entity/System/SynThirdInfoEntity.cs @@ -6,7 +6,7 @@ namespace JNPF.Systems.Entitys.System; /// /// 第三方工具对象同步表 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// [SugarTable("BASE_SYNTHIRDINFO")] diff --git a/system/Tnb.Systems.Entitys/Entity/System/TimeTaskEntity.cs b/system/Tnb.Systems.Entitys/Entity/System/TimeTaskEntity.cs index 613d40fe..5a1c2a1e 100644 --- a/system/Tnb.Systems.Entitys/Entity/System/TimeTaskEntity.cs +++ b/system/Tnb.Systems.Entitys/Entity/System/TimeTaskEntity.cs @@ -7,7 +7,7 @@ namespace JNPF.Systems.Entitys.System; /// /// 定时任务 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// [SugarTable("BASE_TIMETASK")] diff --git a/system/Tnb.Systems.Entitys/Entity/System/TimeTaskLogEntity.cs b/system/Tnb.Systems.Entitys/Entity/System/TimeTaskLogEntity.cs index 27d5d357..64ee202f 100644 --- a/system/Tnb.Systems.Entitys/Entity/System/TimeTaskLogEntity.cs +++ b/system/Tnb.Systems.Entitys/Entity/System/TimeTaskLogEntity.cs @@ -6,7 +6,7 @@ namespace JNPF.Systems.Entitys.System; /// /// 定时任务日志 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01 . /// [SugarTable("BASE_TIMETASKLOG")] diff --git a/system/Tnb.Systems.Interfaces/Permission/IOrganizeAdministratorService.cs b/system/Tnb.Systems.Interfaces/Permission/IOrganizeAdministratorService.cs index 786bd3f9..4961bd12 100644 --- a/system/Tnb.Systems.Interfaces/Permission/IOrganizeAdministratorService.cs +++ b/system/Tnb.Systems.Interfaces/Permission/IOrganizeAdministratorService.cs @@ -5,7 +5,7 @@ namespace JNPF.Systems.Interfaces.Permission; /// /// 分级管理 /// 版 本:V3.2.5 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021.09.27. /// public interface IOrganizeAdministratorService diff --git a/system/Tnb.Systems.Interfaces/Permission/IOrganizeService.cs b/system/Tnb.Systems.Interfaces/Permission/IOrganizeService.cs index beb26e7b..185be808 100644 --- a/system/Tnb.Systems.Interfaces/Permission/IOrganizeService.cs +++ b/system/Tnb.Systems.Interfaces/Permission/IOrganizeService.cs @@ -8,7 +8,7 @@ namespace JNPF.Systems.Interfaces.Permission; /// 机构管理 /// 组织架构:公司》部门》岗位》用户 /// 版 本:V3.0.0 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021.06.07. /// public interface IOrganizeService diff --git a/system/Tnb.Systems.Interfaces/System/IBillRullService.cs b/system/Tnb.Systems.Interfaces/System/IBillRullService.cs index 3ef0a989..b9097007 100644 --- a/system/Tnb.Systems.Interfaces/System/IBillRullService.cs +++ b/system/Tnb.Systems.Interfaces/System/IBillRullService.cs @@ -3,7 +3,7 @@ /// /// 单据规则 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// public interface IBillRullService diff --git a/system/Tnb.Systems.Interfaces/System/IDataInterfaceService.cs b/system/Tnb.Systems.Interfaces/System/IDataInterfaceService.cs index 5ebe0623..f2a669a4 100644 --- a/system/Tnb.Systems.Interfaces/System/IDataInterfaceService.cs +++ b/system/Tnb.Systems.Interfaces/System/IDataInterfaceService.cs @@ -8,7 +8,7 @@ namespace JNPF.Systems.Interfaces.System; /// /// 数据接口 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// public interface IDataInterfaceService diff --git a/system/Tnb.Systems.Interfaces/System/IDbLinkService.cs b/system/Tnb.Systems.Interfaces/System/IDbLinkService.cs index 1941267f..d54451b8 100644 --- a/system/Tnb.Systems.Interfaces/System/IDbLinkService.cs +++ b/system/Tnb.Systems.Interfaces/System/IDbLinkService.cs @@ -6,7 +6,7 @@ namespace JNPF.Systems.Interfaces.System; /// /// 数据连接 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// public interface IDbLinkService diff --git a/system/Tnb.Systems.Interfaces/System/IDictionaryDataService.cs b/system/Tnb.Systems.Interfaces/System/IDictionaryDataService.cs index d166c8dc..0e259d94 100644 --- a/system/Tnb.Systems.Interfaces/System/IDictionaryDataService.cs +++ b/system/Tnb.Systems.Interfaces/System/IDictionaryDataService.cs @@ -5,7 +5,7 @@ namespace JNPF.Systems.Interfaces.System; /// /// 字典数据 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// public interface IDictionaryDataService diff --git a/system/Tnb.Systems.Interfaces/System/IDictionaryTypeService.cs b/system/Tnb.Systems.Interfaces/System/IDictionaryTypeService.cs index 29b9a2cf..f9cdda53 100644 --- a/system/Tnb.Systems.Interfaces/System/IDictionaryTypeService.cs +++ b/system/Tnb.Systems.Interfaces/System/IDictionaryTypeService.cs @@ -5,7 +5,7 @@ namespace JNPF.Systems.Interfaces.System; /// /// 字典分类 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// public interface IDictionaryTypeService diff --git a/system/Tnb.Systems.Interfaces/System/IModuleButtonService.cs b/system/Tnb.Systems.Interfaces/System/IModuleButtonService.cs index 58fc8dbf..1ab0230a 100644 --- a/system/Tnb.Systems.Interfaces/System/IModuleButtonService.cs +++ b/system/Tnb.Systems.Interfaces/System/IModuleButtonService.cs @@ -5,7 +5,7 @@ namespace JNPF.Systems.Interfaces.System; /// /// 功能按钮 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// public interface IModuleButtonService diff --git a/system/Tnb.Systems.Interfaces/System/IModuleColumnService.cs b/system/Tnb.Systems.Interfaces/System/IModuleColumnService.cs index 465af3eb..bf54ff5a 100644 --- a/system/Tnb.Systems.Interfaces/System/IModuleColumnService.cs +++ b/system/Tnb.Systems.Interfaces/System/IModuleColumnService.cs @@ -5,7 +5,7 @@ namespace JNPF.Systems.Interfaces.System; /// /// 功能列表 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// public interface IModuleColumnService diff --git a/system/Tnb.Systems.Interfaces/System/IModuleDataAuthorizeSchemeService.cs b/system/Tnb.Systems.Interfaces/System/IModuleDataAuthorizeSchemeService.cs index 4c8d421a..70d17c84 100644 --- a/system/Tnb.Systems.Interfaces/System/IModuleDataAuthorizeSchemeService.cs +++ b/system/Tnb.Systems.Interfaces/System/IModuleDataAuthorizeSchemeService.cs @@ -5,7 +5,7 @@ namespace JNPF.Systems.Interfaces.System; /// /// 数据权限方案 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// public interface IModuleDataAuthorizeSchemeService diff --git a/system/Tnb.Systems.Interfaces/System/IModuleDataAuthorizeService.cs b/system/Tnb.Systems.Interfaces/System/IModuleDataAuthorizeService.cs index c01891a6..7923f913 100644 --- a/system/Tnb.Systems.Interfaces/System/IModuleDataAuthorizeService.cs +++ b/system/Tnb.Systems.Interfaces/System/IModuleDataAuthorizeService.cs @@ -5,7 +5,7 @@ namespace JNPF.Systems.Interfaces.System; /// /// 数据权限 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// public interface IModuleDataAuthorizeService diff --git a/system/Tnb.Systems.Interfaces/System/IModuleFormService.cs b/system/Tnb.Systems.Interfaces/System/IModuleFormService.cs index 36b56053..dcf28c91 100644 --- a/system/Tnb.Systems.Interfaces/System/IModuleFormService.cs +++ b/system/Tnb.Systems.Interfaces/System/IModuleFormService.cs @@ -5,7 +5,7 @@ namespace JNPF.Systems.Interfaces.System; /// /// 表单权限 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// public interface IModuleFormService diff --git a/system/Tnb.Systems.Interfaces/System/IModuleService.cs b/system/Tnb.Systems.Interfaces/System/IModuleService.cs index 481b84b2..3c62f1d8 100644 --- a/system/Tnb.Systems.Interfaces/System/IModuleService.cs +++ b/system/Tnb.Systems.Interfaces/System/IModuleService.cs @@ -6,7 +6,7 @@ namespace JNPF.Systems.Interfaces.System; /// /// 菜单管理 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// public interface IModuleService diff --git a/system/Tnb.Systems.Interfaces/System/ISynThirdInfoService.cs b/system/Tnb.Systems.Interfaces/System/ISynThirdInfoService.cs index 5cb87031..ec4212fc 100644 --- a/system/Tnb.Systems.Interfaces/System/ISynThirdInfoService.cs +++ b/system/Tnb.Systems.Interfaces/System/ISynThirdInfoService.cs @@ -7,7 +7,7 @@ namespace JNPF.Systems.Interfaces.System; /// /// 第三方同步 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// public interface ISynThirdInfoService diff --git a/system/Tnb.Systems.Interfaces/System/ISysConfigService.cs b/system/Tnb.Systems.Interfaces/System/ISysConfigService.cs index dd16f00f..99539939 100644 --- a/system/Tnb.Systems.Interfaces/System/ISysConfigService.cs +++ b/system/Tnb.Systems.Interfaces/System/ISysConfigService.cs @@ -6,7 +6,7 @@ namespace JNPF.Systems.Interfaces.System; /// /// 系统配置 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// public interface ISysConfigService diff --git a/system/Tnb.Systems/Permission/AuthorizeService.cs b/system/Tnb.Systems/Permission/AuthorizeService.cs index ae68c5d3..49fc9100 100644 --- a/system/Tnb.Systems/Permission/AuthorizeService.cs +++ b/system/Tnb.Systems/Permission/AuthorizeService.cs @@ -784,6 +784,10 @@ public class AuthorizeService : IAuthorizeService, IDynamicApiController, ITrans { var tenantId = _userManager.TenantId; var list = await GetOnlineUserList(tenantId); + if (list == null) + { + return; + } var user = list.Find(it => it.tenantId == tenantId && it.userId == id); if (user != null) { diff --git a/system/Tnb.Systems/Permission/GroupService.cs b/system/Tnb.Systems/Permission/GroupService.cs index c6fa135d..13d34a90 100644 --- a/system/Tnb.Systems/Permission/GroupService.cs +++ b/system/Tnb.Systems/Permission/GroupService.cs @@ -19,7 +19,7 @@ namespace JNPF.Systems; /// /// 业务实现:分组管理 /// 版 本:V3.3.3 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2022.03.11. /// [ApiDescriptionSettings(Tag = "Permission", Name = "Group", Order = 162)] diff --git a/system/Tnb.Systems/Permission/OrganizeAdministratorService.cs b/system/Tnb.Systems/Permission/OrganizeAdministratorService.cs index fa2e3cb8..760b223f 100644 --- a/system/Tnb.Systems/Permission/OrganizeAdministratorService.cs +++ b/system/Tnb.Systems/Permission/OrganizeAdministratorService.cs @@ -21,7 +21,7 @@ namespace JNPF.Systems; /// /// 分级管理 /// 版 本:V3.2.0 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021.09.27. /// [ApiDescriptionSettings(Tag = "Permission", Name = "OrganizeAdministrator", Order = 166)] diff --git a/system/Tnb.Systems/Permission/OrganizeService.cs b/system/Tnb.Systems/Permission/OrganizeService.cs index a0a14251..ecf80705 100644 --- a/system/Tnb.Systems/Permission/OrganizeService.cs +++ b/system/Tnb.Systems/Permission/OrganizeService.cs @@ -27,7 +27,7 @@ namespace JNPF.Systems; /// 机构管理. /// 组织架构:公司》部门》岗位》用户 /// 版 本:V3.2.0 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021.06.07. /// [ApiDescriptionSettings(Tag = "Permission", Name = "Organize", Order = 165)] diff --git a/system/Tnb.Systems/Permission/PositionService.cs b/system/Tnb.Systems/Permission/PositionService.cs index 29753cdd..c73e42ac 100644 --- a/system/Tnb.Systems/Permission/PositionService.cs +++ b/system/Tnb.Systems/Permission/PositionService.cs @@ -21,7 +21,7 @@ namespace JNPF.Systems; /// /// 业务实现:岗位管理. /// 版 本:V3.2.0 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021.06.07. /// [ApiDescriptionSettings(Tag = "Permission", Name = "Position", Order = 162)] diff --git a/system/Tnb.Systems/System/ComFieldsService.cs b/system/Tnb.Systems/System/ComFieldsService.cs index e26ba5e1..75b6fd89 100644 --- a/system/Tnb.Systems/System/ComFieldsService.cs +++ b/system/Tnb.Systems/System/ComFieldsService.cs @@ -13,7 +13,7 @@ namespace JNPF.Systems; /// /// 常用字段 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// [ApiDescriptionSettings(Tag = "System", Name = "CommonFields", Order = 201)] diff --git a/system/Tnb.Systems/System/DataBaseService.cs b/system/Tnb.Systems/System/DataBaseService.cs index 45599bce..f401a4e6 100644 --- a/system/Tnb.Systems/System/DataBaseService.cs +++ b/system/Tnb.Systems/System/DataBaseService.cs @@ -29,7 +29,7 @@ namespace JNPF.Systems; /// /// 数据管理 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// [ApiDescriptionSettings(Tag = "System", Name = "DataModel", Order = 208)] diff --git a/system/Tnb.Systems/System/DataInterfaceLogService.cs b/system/Tnb.Systems/System/DataInterfaceLogService.cs index 75590863..1c663a59 100644 --- a/system/Tnb.Systems/System/DataInterfaceLogService.cs +++ b/system/Tnb.Systems/System/DataInterfaceLogService.cs @@ -13,7 +13,7 @@ namespace JNPF.Systems; /// /// 数据接口日志 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// [ApiDescriptionSettings(Tag = "System", Name = "DataInterfaceLog", Order = 204)] diff --git a/system/Tnb.Systems/System/DataInterfaceService.cs b/system/Tnb.Systems/System/DataInterfaceService.cs index 91a451b7..6b0d7741 100644 --- a/system/Tnb.Systems/System/DataInterfaceService.cs +++ b/system/Tnb.Systems/System/DataInterfaceService.cs @@ -47,8 +47,6 @@ namespace JNPF.Systems; /// /// 数据接口 /// 版 本:V3.2 -/// 版 权:引迈信息技术有限公司(https://www.jnpfsoft.com) -/// 作 者:JNPF开发平台组 /// 日 期:2021-06-01. /// [ApiDescriptionSettings(Tag = "System", Name = "DataInterface", Order = 204)] @@ -314,6 +312,7 @@ public class DataInterfaceService : IDataInterfaceService, IDynamicApiController /// [HttpPost("{id}/Actions/Preview")] [UnitOfWork] + [AllowAnonymous] public async Task Preview(string id, [FromBody] DataInterfacePreviewInput input) { _configId = _userManager.TenantId; @@ -325,6 +324,11 @@ public class DataInterfaceService : IDataInterfaceService, IDynamicApiController { dicParameters = input.paramList.ToDictionary(x => x.field, y => y.defaultValue); } + + if (!string.IsNullOrEmpty(info.Path) && !info.Path.StartsWith("http")) + { + info.Path = $"{App.HttpContext.Request.Scheme}://{App.HttpContext.Request.Host}{info.Path}"; + } VerifyRequired(info, dicParameters); ReplaceParameterValue(info, dicParameters); if (info?.DataType == 1) @@ -558,6 +562,7 @@ public class DataInterfaceService : IDataInterfaceService, IDynamicApiController [UnitOfWork] public async Task GetFields(string id, [FromBody] DataInterfacePreviewInput input) { + Object tempObj = null; try { //modifyby zhoukeda 20230803 @@ -569,12 +574,22 @@ public class DataInterfaceService : IDataInterfaceService, IDynamicApiController } else { - return result.ToObject>>().FirstOrDefault().Keys.ToList(); + tempObj = result; + var list = result.ToObject>>().FirstOrDefault().Keys.ToList(); + return list; } } catch (Exception e) { - throw Oops.Oh(ErrorCode.COM1020); + try + { + return JsonConvert.DeserializeObject>>(JsonConvert.SerializeObject(tempObj)).FirstOrDefault().Keys.ToList(); + } + catch (Exception exception) + { + throw Oops.Oh(ErrorCode.COM1020); + } + } } #endregion diff --git a/system/Tnb.Systems/System/DataSyncService.cs b/system/Tnb.Systems/System/DataSyncService.cs index 6d70632a..8920ce4f 100644 --- a/system/Tnb.Systems/System/DataSyncService.cs +++ b/system/Tnb.Systems/System/DataSyncService.cs @@ -18,7 +18,7 @@ namespace JNPF.Systems; /// /// 数据同步 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// [ApiDescriptionSettings(Tag = "System", Name = "DataSync", Order = 209)] diff --git a/system/Tnb.Systems/System/DbBackupService.cs b/system/Tnb.Systems/System/DbBackupService.cs index c175a554..c399ef0c 100644 --- a/system/Tnb.Systems/System/DbBackupService.cs +++ b/system/Tnb.Systems/System/DbBackupService.cs @@ -18,7 +18,7 @@ namespace JNPF.Systems; /// /// 数据备份 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// [ApiDescriptionSettings(Tag = "System", Name = "DataBackup", Order = 207)] diff --git a/system/Tnb.Systems/System/DbLinkService.cs b/system/Tnb.Systems/System/DbLinkService.cs index 3ead4d4b..242146dd 100644 --- a/system/Tnb.Systems/System/DbLinkService.cs +++ b/system/Tnb.Systems/System/DbLinkService.cs @@ -20,7 +20,7 @@ namespace JNPF.Systems; /// /// 数据连接 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// [ApiDescriptionSettings(Tag = "System", Name = "DataSource", Order = 205)] diff --git a/system/Tnb.Systems/System/DictionaryDataService.cs b/system/Tnb.Systems/System/DictionaryDataService.cs index ec5ed2db..30ad940a 100644 --- a/system/Tnb.Systems/System/DictionaryDataService.cs +++ b/system/Tnb.Systems/System/DictionaryDataService.cs @@ -20,7 +20,7 @@ namespace JNPF.Systems; /// /// 字典数据 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// [ApiDescriptionSettings(Tag = "System", Name = "DictionaryData", Order = 203)] diff --git a/system/Tnb.Systems/System/DictionaryTypeService.cs b/system/Tnb.Systems/System/DictionaryTypeService.cs index 2498f0cb..acbf2541 100644 --- a/system/Tnb.Systems/System/DictionaryTypeService.cs +++ b/system/Tnb.Systems/System/DictionaryTypeService.cs @@ -16,7 +16,7 @@ namespace JNPF.Systems; /// /// 字典分类 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// [ApiDescriptionSettings(Tag = "System", Name = "DictionaryType", Order = 202)] diff --git a/system/Tnb.Systems/System/InterfaceOauthService.cs b/system/Tnb.Systems/System/InterfaceOauthService.cs index a67f4a2a..78f6f105 100644 --- a/system/Tnb.Systems/System/InterfaceOauthService.cs +++ b/system/Tnb.Systems/System/InterfaceOauthService.cs @@ -21,7 +21,7 @@ namespace JNPF.Systems.System; /// /// 接口认证 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// [ApiDescriptionSettings(Tag = "System", Name = "InterfaceOauth", Order = 202)] diff --git a/system/Tnb.Systems/System/ModuleButtonService.cs b/system/Tnb.Systems/System/ModuleButtonService.cs index 3f17c752..a997773b 100644 --- a/system/Tnb.Systems/System/ModuleButtonService.cs +++ b/system/Tnb.Systems/System/ModuleButtonService.cs @@ -19,7 +19,7 @@ namespace JNPF.Systems; /// /// 功能按钮 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// [ApiDescriptionSettings(Tag = "System", Name = "ModuleButton", Order = 212)] diff --git a/system/Tnb.Systems/System/ModuleColumnService.cs b/system/Tnb.Systems/System/ModuleColumnService.cs index bd3a250e..e2f1f578 100644 --- a/system/Tnb.Systems/System/ModuleColumnService.cs +++ b/system/Tnb.Systems/System/ModuleColumnService.cs @@ -23,7 +23,7 @@ namespace JNPF.Systems; /// /// 功能列表 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// [ApiDescriptionSettings(Tag = "System", Name = "ModuleColumn", Order = 213)] diff --git a/system/Tnb.Systems/System/ModuleDataAuthorizeLinkService.cs b/system/Tnb.Systems/System/ModuleDataAuthorizeLinkService.cs index 2cb31625..1419490f 100644 --- a/system/Tnb.Systems/System/ModuleDataAuthorizeLinkService.cs +++ b/system/Tnb.Systems/System/ModuleDataAuthorizeLinkService.cs @@ -21,7 +21,7 @@ namespace JNPF.Systems; /// /// 数据权限连接管理 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// [ApiDescriptionSettings(Tag = "System", Name = "ModuleDataAuthorizeLink", Order = 214)] diff --git a/system/Tnb.Systems/System/ModuleDataAuthorizeSchemeService.cs b/system/Tnb.Systems/System/ModuleDataAuthorizeSchemeService.cs index b38d1292..04baafa2 100644 --- a/system/Tnb.Systems/System/ModuleDataAuthorizeSchemeService.cs +++ b/system/Tnb.Systems/System/ModuleDataAuthorizeSchemeService.cs @@ -17,7 +17,7 @@ namespace JNPF.Systems; /// /// 数据权限 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// [ApiDescriptionSettings(Tag = "System", Name = "ModuleDataAuthorizeScheme", Order = 214)] diff --git a/system/Tnb.Systems/System/ModuleDataAuthorizeService.cs b/system/Tnb.Systems/System/ModuleDataAuthorizeService.cs index 1d6cdea0..2c0c87ff 100644 --- a/system/Tnb.Systems/System/ModuleDataAuthorizeService.cs +++ b/system/Tnb.Systems/System/ModuleDataAuthorizeService.cs @@ -22,7 +22,7 @@ namespace JNPF.Systems; /// /// 数据权限 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// [ApiDescriptionSettings(Tag = "System", Name = "ModuleDataAuthorize", Order = 214)] diff --git a/system/Tnb.Systems/System/ModuleFormService.cs b/system/Tnb.Systems/System/ModuleFormService.cs index bdf22970..6d297d92 100644 --- a/system/Tnb.Systems/System/ModuleFormService.cs +++ b/system/Tnb.Systems/System/ModuleFormService.cs @@ -23,7 +23,7 @@ namespace JNPF.Systems; /// /// 功能表单. /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// [ApiDescriptionSettings(Tag = "System", Name = "ModuleForm", Order = 212)] diff --git a/system/Tnb.Systems/System/ModuleService.cs b/system/Tnb.Systems/System/ModuleService.cs index 6689ee65..06904263 100644 --- a/system/Tnb.Systems/System/ModuleService.cs +++ b/system/Tnb.Systems/System/ModuleService.cs @@ -23,7 +23,7 @@ namespace JNPF.Systems; /// /// 菜单管理 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// [ApiDescriptionSettings(Tag = "System", Name = "Menu", Order = 212)] diff --git a/system/Tnb.Systems/System/MonitorService.cs b/system/Tnb.Systems/System/MonitorService.cs index f304fe7b..b3507db8 100644 --- a/system/Tnb.Systems/System/MonitorService.cs +++ b/system/Tnb.Systems/System/MonitorService.cs @@ -10,7 +10,7 @@ namespace JNPF.Systems; /// /// 系统监控 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// [ApiDescriptionSettings(Tag = "System", Name = "Monitor", Order = 215)] diff --git a/system/Tnb.Systems/System/PrintDevService.cs b/system/Tnb.Systems/System/PrintDevService.cs index 35c0f307..82c2599d 100644 --- a/system/Tnb.Systems/System/PrintDevService.cs +++ b/system/Tnb.Systems/System/PrintDevService.cs @@ -24,7 +24,7 @@ namespace JNPF.Systems; /// /// 打印模板配置 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// [ApiDescriptionSettings(Tag = "System", Name = "PrintDev", Order = 200)] diff --git a/system/Tnb.Systems/System/PrintLogService.cs b/system/Tnb.Systems/System/PrintLogService.cs index 45f27513..77cd9670 100644 --- a/system/Tnb.Systems/System/PrintLogService.cs +++ b/system/Tnb.Systems/System/PrintLogService.cs @@ -19,8 +19,6 @@ namespace JNPF.Systems.System; /// /// 打印模板日志 /// 版 本:V3.2 -/// 版 权:引迈信息技术有限公司(https://www.jnpfsoft.com) -/// 作 者:JNPF开发平台组 /// 日 期:2021-06-01. /// [ApiDescriptionSettings(Tag = "System", Name = "PrintLog", Order = 200)] diff --git a/system/Tnb.Systems/System/ProvinceService.cs b/system/Tnb.Systems/System/ProvinceService.cs index da0db5e5..9875889e 100644 --- a/system/Tnb.Systems/System/ProvinceService.cs +++ b/system/Tnb.Systems/System/ProvinceService.cs @@ -15,7 +15,7 @@ namespace JNPF.Systems.Core.Province; /// /// 行政区划 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// [ApiDescriptionSettings(Tag = "System", Name = "Area", Order = 206)] diff --git a/system/Tnb.Systems/System/SynThirdInfoService.cs b/system/Tnb.Systems/System/SynThirdInfoService.cs index 83086b37..c778392c 100644 --- a/system/Tnb.Systems/System/SynThirdInfoService.cs +++ b/system/Tnb.Systems/System/SynThirdInfoService.cs @@ -24,7 +24,7 @@ namespace JNPF.Systems.System; /// /// 第三方同步 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// [ApiDescriptionSettings(Tag = "System", Name = "SynThirdInfo", Order = 210)] diff --git a/system/Tnb.Systems/System/SysCacheService.cs b/system/Tnb.Systems/System/SysCacheService.cs index ed324a61..57e2f5b8 100644 --- a/system/Tnb.Systems/System/SysCacheService.cs +++ b/system/Tnb.Systems/System/SysCacheService.cs @@ -17,7 +17,7 @@ namespace JNPF.Systems; /// /// 缓存管理 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// [ApiDescriptionSettings(Tag = "System", Name = "CacheManage", Order = 100)] diff --git a/system/Tnb.Systems/System/SysConfigService.cs b/system/Tnb.Systems/System/SysConfigService.cs index 23c44693..3127b11b 100644 --- a/system/Tnb.Systems/System/SysConfigService.cs +++ b/system/Tnb.Systems/System/SysConfigService.cs @@ -20,7 +20,7 @@ namespace JNPF.Systems.System; /// /// 系统配置 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// [ApiDescriptionSettings(Tag = "System", Name = "SysConfig", Order = 211)] diff --git a/system/Tnb.Systems/System/SysLogService.cs b/system/Tnb.Systems/System/SysLogService.cs index 20d6453d..c00c702b 100644 --- a/system/Tnb.Systems/System/SysLogService.cs +++ b/system/Tnb.Systems/System/SysLogService.cs @@ -17,7 +17,7 @@ namespace JNPF.Systems; /// /// 系统日志 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// [ApiDescriptionSettings(Tag = "System", Name = "Log", Order = 211)] diff --git a/taskschedule/Tnb.TaskScheduler.Entitys/Entity/SnowId.cs b/taskschedule/Tnb.TaskScheduler.Entitys/Entity/SnowId.cs index ee306a88..44524b3a 100644 --- a/taskschedule/Tnb.TaskScheduler.Entitys/Entity/SnowId.cs +++ b/taskschedule/Tnb.TaskScheduler.Entitys/Entity/SnowId.cs @@ -7,7 +7,7 @@ namespace JNPF.TaskScheduler.Entitys.Entity; /// /// 定时任务 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01 . /// [SugarTable("snowid")] diff --git a/taskschedule/Tnb.TaskScheduler.Entitys/Entity/TimeTaskEntity.cs b/taskschedule/Tnb.TaskScheduler.Entitys/Entity/TimeTaskEntity.cs index 6528ad2f..766ddf29 100644 --- a/taskschedule/Tnb.TaskScheduler.Entitys/Entity/TimeTaskEntity.cs +++ b/taskschedule/Tnb.TaskScheduler.Entitys/Entity/TimeTaskEntity.cs @@ -6,7 +6,7 @@ namespace JNPF.TaskScheduler.Entitys; /// /// 定时任务 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01 . /// [SugarTable("base_timetask")] diff --git a/taskschedule/Tnb.TaskScheduler.Entitys/Entity/TimeTaskLogEntity.cs b/taskschedule/Tnb.TaskScheduler.Entitys/Entity/TimeTaskLogEntity.cs index 9f070550..f545f38b 100644 --- a/taskschedule/Tnb.TaskScheduler.Entitys/Entity/TimeTaskLogEntity.cs +++ b/taskschedule/Tnb.TaskScheduler.Entitys/Entity/TimeTaskLogEntity.cs @@ -7,7 +7,7 @@ namespace JNPF.TaskScheduler.Entitys; /// /// 定时任务日志 /// 版 本:V3.2 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01 . /// [SugarTable("BASE_TIMETASKLOG")] diff --git a/taskschedule/Tnb.TaskScheduler.Interfaces/ITimeTaskService.cs b/taskschedule/Tnb.TaskScheduler.Interfaces/ITimeTaskService.cs index e8559489..4e9f7fff 100644 --- a/taskschedule/Tnb.TaskScheduler.Interfaces/ITimeTaskService.cs +++ b/taskschedule/Tnb.TaskScheduler.Interfaces/ITimeTaskService.cs @@ -5,7 +5,7 @@ namespace JNPF.TaskScheduler.Interfaces.TaskScheduler; ///     /// 定时任务     /// 版 本:V3.2 -    /// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) +         /// 作 者:JNPF开发平台组     /// 日 期:2021-06-01 .     /// diff --git a/taskschedule/Tnb.TaskScheduler/Listener/QcTaskTimeWorker.cs b/taskschedule/Tnb.TaskScheduler/Listener/QcTaskTimeWorker.cs index 3b041b3c..dbea3b49 100644 --- a/taskschedule/Tnb.TaskScheduler/Listener/QcTaskTimeWorker.cs +++ b/taskschedule/Tnb.TaskScheduler/Listener/QcTaskTimeWorker.cs @@ -1,149 +1,149 @@ -using JNPF; -using JNPF.Common.Security; -using JNPF.Systems.Entitys.System; -using JNPF.TaskScheduler; -using JNPF.TaskScheduler.Entitys.Model; -using JNPF.TaskScheduler.Interfaces.TaskScheduler; -using SqlSugar; -using Tnb.ProductionMgr.Entities; -using Tnb.QcMgr.Entities; -using Tnb.QcMgr.Entities.Entity; - -namespace Tnb.TaskScheduler.Listener -{ - /// - /// 生成质检任务 - /// - public class QcTaskTimeWorker //u: ISpareTimeWorker - { - private ISqlSugarRepository repository => App.GetService>(); - private ITimeTaskService timeTaskService => App.GetService(); - [SpareTime("0 0 0 * * ?", "生成质检任务", ExecuteType = SpareTimeExecuteTypes.Serial, StartNow = false)] - public async void CreateTask(SpareTimer timer, long count) - { - try - { - var TimeTasks = await timeTaskService.GetTasks(); - var timeTaskEntity = TimeTasks.Where(p => p.Id == timer.WorkerName && p.EnabledMark == 1).FirstOrDefault(); - if (timeTaskEntity == null) - return; - ContentModel? comtentModel = timeTaskEntity.ExecuteContent.ToObject(); - var client = repository.CopyNew(); - var PlanH = await client.Queryable().Where(p => p.id == comtentModel.parameter.Where(p => p.field == "id").First().value).FirstAsync(); - var PlanDs = await client.Queryable().Where(p => p.mainid == PlanH.id).ToListAsync(); - if (PlanH == null || PlanDs.Count == 0) - return; - List strs = new List(); - strs.Add("26589795199765");//首检 - strs.Add("26589835919125");//生产检 - strs.Add("26590141686549");//巡检 - if (strs.Contains(PlanH.checktype)) - { - var PlanMaterials = await client.Queryable().Where(p => p.planid == PlanH.id).Select(p => p.materialid).ToListAsync(); - var PlanProcesss = await client.Queryable().Where(p => p.planid == PlanH.id).Select(p => p.processid).ToListAsync(); - var PlanWork = await client.Queryable().Where(p => p.planid == PlanH.id).Select(p => p.workid).ToListAsync(); - //物料工序工位不能同时为空 - if (PlanMaterials.Count == 0 && PlanProcesss.Count == 0 && PlanWork.Count == 0) - return; - var PrdMoTasks = await client.Queryable() - .WhereIF(PlanMaterials.Count > 0, p => PlanMaterials.Contains(p.material_id)) - .WhereIF(PlanProcesss.Count > 0, p => PlanProcesss.Contains(p.process_id)) - .WhereIF(PlanWork.Count > 0, p => PlanWork.Contains(p.workstation_id)) - .Where(p => p.mo_task_status == "InProgress")//进行中 - .ToListAsync(); - - var DictionaryType = await client.Queryable().Where(p => p.FullName == "质检状态").FirstAsync(); - var DictionaryData = await client.Queryable().Where(p => p.DictionaryTypeId == DictionaryType.Id && p.FullName == "待执行").FirstAsync(); - var time = DateTime.Now; - foreach (var PrdMoTask in PrdMoTasks) - { - - QcCheckExecH qcCheckExecH = new QcCheckExecH(); - qcCheckExecH.id = SnowflakeIdHelper.NextId(); - qcCheckExecH.checktype = PlanH.checktype; - qcCheckExecH.status = DictionaryData.Id; - qcCheckExecH.tasktime = time.ToString("yyyy-MM-dd HH:mm:ss"); - qcCheckExecH.materialid = PrdMoTask.material_id; - qcCheckExecH.processid = PrdMoTask.process_id; - qcCheckExecH.workid = PrdMoTask.workstation_id; - qcCheckExecH.create_time = time; - var ExecDs = new List(); - foreach (var PlanD in PlanDs) - { - QcCheckExecD QcCheckExecD = new QcCheckExecD(); - QcCheckExecD.mainid = qcCheckExecH.id; - QcCheckExecD.extype = PlanD.extype; - QcCheckExecD.excontent = PlanD.excontent; - QcCheckExecD.check = PlanD.check; - QcCheckExecD.errorcause = PlanD.errorcause; - QcCheckExecD.errorlevel = PlanD.errorlevel; - QcCheckExecD.remark = PlanD.remark; - QcCheckExecD.attachment = PlanD.attachment; - QcCheckExecD.isexec = PlanD.isexec; - QcCheckExecD.custom = PlanD.custom; - QcCheckExecD.typeid = PlanD.typeid; - QcCheckExecD.itemid = PlanD.itemid; - QcCheckExecD.create_time = time; - ExecDs.Add(QcCheckExecD); - } - await client.Insertable(qcCheckExecH).ExecuteCommandAsync(); - await client.Insertable(ExecDs).ExecuteCommandAsync(); - } - } - else - { - var PlanMaterials = await client.Queryable().Where(p => p.planid == PlanH.id).Select(p => p.materialid).ToListAsync(); - var DictionaryType = await client.Queryable().Where(p => p.FullName == "质检状态").FirstAsync(); - var DictionaryData = await client.Queryable().Where(p => p.DictionaryTypeId == DictionaryType.Id && p.FullName == "待执行").FirstAsync(); - var time = DateTime.Now; - foreach (var Material in PlanMaterials) - { - QcCheckExecH qcCheckExecH = new QcCheckExecH(); - qcCheckExecH.id = SnowflakeIdHelper.NextId(); - qcCheckExecH.checktype = PlanH.checktype; - qcCheckExecH.status = DictionaryData.Id; - qcCheckExecH.tasktime = time.ToString("yyyy-MM-dd HH:mm:ss"); - qcCheckExecH.materialid = Material; - qcCheckExecH.processid = ""; - qcCheckExecH.workid = ""; - qcCheckExecH.create_time = time; - var ExecDs = new List(); - foreach (var PlanD in PlanDs) - { - QcCheckExecD QcCheckExecD = new QcCheckExecD(); - QcCheckExecD.mainid = qcCheckExecH.id; - QcCheckExecD.extype = PlanD.extype; - QcCheckExecD.excontent = PlanD.excontent; - QcCheckExecD.check = PlanD.check; - QcCheckExecD.errorcause = PlanD.errorcause; - QcCheckExecD.errorlevel = PlanD.errorlevel; - QcCheckExecD.remark = PlanD.remark; - QcCheckExecD.attachment = PlanD.attachment; - QcCheckExecD.isexec = PlanD.isexec; - QcCheckExecD.custom = PlanD.custom; - QcCheckExecD.typeid = PlanD.typeid; - QcCheckExecD.itemid = PlanD.itemid; - QcCheckExecD.create_time = time; - ExecDs.Add(QcCheckExecD); - } - await client.Insertable(qcCheckExecH).ExecuteCommandAsync(); - await client.Insertable(ExecDs).ExecuteCommandAsync(); - } - - } - //只执行一次的 修改EnabledMark字段 - var InterfaceParameter = comtentModel.parameter.Where(p => p.field == "doonce").FirstOrDefault(); - if (InterfaceParameter != null && bool.Parse(InterfaceParameter.value)) - { - timeTaskEntity.EnabledMark = 0; - await client.Updateable(timeTaskEntity).ExecuteCommandAsync(); - SpareTime.Cancel(timeTaskEntity.Id); - } - } - catch (Exception) - { - } - - } - } -} +// using JNPF; +// using JNPF.Common.Security; +// using JNPF.Systems.Entitys.System; +// using JNPF.TaskScheduler; +// using JNPF.TaskScheduler.Entitys.Model; +// using JNPF.TaskScheduler.Interfaces.TaskScheduler; +// using SqlSugar; +// using Tnb.ProductionMgr.Entities; +// using Tnb.QcMgr.Entities; +// using Tnb.QcMgr.Entities.Entity; +// +// namespace Tnb.TaskScheduler.Listener +// { +// /// +// /// 生成质检任务 +// /// +// public class QcTaskTimeWorker //u: ISpareTimeWorker +// { +// private ISqlSugarRepository repository => App.GetService>(); +// private ITimeTaskService timeTaskService => App.GetService(); +// [SpareTime("0 0 0 * * ?", "生成质检任务", ExecuteType = SpareTimeExecuteTypes.Serial, StartNow = false)] +// public async void CreateTask(SpareTimer timer, long count) +// { +// try +// { +// var TimeTasks = await timeTaskService.GetTasks(); +// var timeTaskEntity = TimeTasks.Where(p => p.Id == timer.WorkerName && p.EnabledMark == 1).FirstOrDefault(); +// if (timeTaskEntity == null) +// return; +// ContentModel? comtentModel = timeTaskEntity.ExecuteContent.ToObject(); +// var client = repository.CopyNew(); +// var PlanH = await client.Queryable().Where(p => p.id == comtentModel.parameter.Where(p => p.field == "id").First().value).FirstAsync(); +// var PlanDs = await client.Queryable().Where(p => p.mainid == PlanH.id).ToListAsync(); +// if (PlanH == null || PlanDs.Count == 0) +// return; +// List strs = new List(); +// strs.Add("26589795199765");//首检 +// strs.Add("26589835919125");//生产检 +// strs.Add("26590141686549");//巡检 +// if (strs.Contains(PlanH.checktype)) +// { +// var PlanMaterials = await client.Queryable().Where(p => p.planid == PlanH.id).Select(p => p.materialid).ToListAsync(); +// var PlanProcesss = await client.Queryable().Where(p => p.planid == PlanH.id).Select(p => p.processid).ToListAsync(); +// var PlanWork = await client.Queryable().Where(p => p.planid == PlanH.id).Select(p => p.workid).ToListAsync(); +// //物料工序工位不能同时为空 +// if (PlanMaterials.Count == 0 && PlanProcesss.Count == 0 && PlanWork.Count == 0) +// return; +// var PrdMoTasks = await client.Queryable() +// .WhereIF(PlanMaterials.Count > 0, p => PlanMaterials.Contains(p.material_id)) +// .WhereIF(PlanProcesss.Count > 0, p => PlanProcesss.Contains(p.process_id)) +// .WhereIF(PlanWork.Count > 0, p => PlanWork.Contains(p.workstation_id)) +// .Where(p => p.mo_task_status == "InProgress")//进行中 +// .ToListAsync(); +// +// var DictionaryType = await client.Queryable().Where(p => p.FullName == "质检状态").FirstAsync(); +// var DictionaryData = await client.Queryable().Where(p => p.DictionaryTypeId == DictionaryType.Id && p.FullName == "待执行").FirstAsync(); +// var time = DateTime.Now; +// foreach (var PrdMoTask in PrdMoTasks) +// { +// +// QcCheckExecH qcCheckExecH = new QcCheckExecH(); +// qcCheckExecH.id = SnowflakeIdHelper.NextId(); +// qcCheckExecH.checktype = PlanH.checktype; +// qcCheckExecH.status = DictionaryData.Id; +// qcCheckExecH.tasktime = time.ToString("yyyy-MM-dd HH:mm:ss"); +// qcCheckExecH.materialid = PrdMoTask.material_id; +// qcCheckExecH.processid = PrdMoTask.process_id; +// qcCheckExecH.workid = PrdMoTask.workstation_id; +// qcCheckExecH.create_time = time; +// var ExecDs = new List(); +// foreach (var PlanD in PlanDs) +// { +// QcCheckExecD QcCheckExecD = new QcCheckExecD(); +// QcCheckExecD.mainid = qcCheckExecH.id; +// QcCheckExecD.extype = PlanD.extype; +// QcCheckExecD.excontent = PlanD.excontent; +// QcCheckExecD.check = PlanD.check; +// QcCheckExecD.errorcause = PlanD.errorcause; +// QcCheckExecD.errorlevel = PlanD.errorlevel; +// QcCheckExecD.remark = PlanD.remark; +// QcCheckExecD.attachment = PlanD.attachment; +// QcCheckExecD.isexec = PlanD.isexec; +// QcCheckExecD.custom = PlanD.custom; +// QcCheckExecD.typeid = PlanD.typeid; +// QcCheckExecD.itemid = PlanD.itemid; +// QcCheckExecD.create_time = time; +// ExecDs.Add(QcCheckExecD); +// } +// await client.Insertable(qcCheckExecH).ExecuteCommandAsync(); +// await client.Insertable(ExecDs).ExecuteCommandAsync(); +// } +// } +// else +// { +// var PlanMaterials = await client.Queryable().Where(p => p.planid == PlanH.id).Select(p => p.materialid).ToListAsync(); +// var DictionaryType = await client.Queryable().Where(p => p.FullName == "质检状态").FirstAsync(); +// var DictionaryData = await client.Queryable().Where(p => p.DictionaryTypeId == DictionaryType.Id && p.FullName == "待执行").FirstAsync(); +// var time = DateTime.Now; +// foreach (var Material in PlanMaterials) +// { +// QcCheckExecH qcCheckExecH = new QcCheckExecH(); +// qcCheckExecH.id = SnowflakeIdHelper.NextId(); +// qcCheckExecH.checktype = PlanH.checktype; +// qcCheckExecH.status = DictionaryData.Id; +// qcCheckExecH.tasktime = time.ToString("yyyy-MM-dd HH:mm:ss"); +// qcCheckExecH.materialid = Material; +// qcCheckExecH.processid = ""; +// qcCheckExecH.workid = ""; +// qcCheckExecH.create_time = time; +// var ExecDs = new List(); +// foreach (var PlanD in PlanDs) +// { +// QcCheckExecD QcCheckExecD = new QcCheckExecD(); +// QcCheckExecD.mainid = qcCheckExecH.id; +// QcCheckExecD.extype = PlanD.extype; +// QcCheckExecD.excontent = PlanD.excontent; +// QcCheckExecD.check = PlanD.check; +// QcCheckExecD.errorcause = PlanD.errorcause; +// QcCheckExecD.errorlevel = PlanD.errorlevel; +// QcCheckExecD.remark = PlanD.remark; +// QcCheckExecD.attachment = PlanD.attachment; +// QcCheckExecD.isexec = PlanD.isexec; +// QcCheckExecD.custom = PlanD.custom; +// QcCheckExecD.typeid = PlanD.typeid; +// QcCheckExecD.itemid = PlanD.itemid; +// QcCheckExecD.create_time = time; +// ExecDs.Add(QcCheckExecD); +// } +// await client.Insertable(qcCheckExecH).ExecuteCommandAsync(); +// await client.Insertable(ExecDs).ExecuteCommandAsync(); +// } +// +// } +// //只执行一次的 修改EnabledMark字段 +// var InterfaceParameter = comtentModel.parameter.Where(p => p.field == "doonce").FirstOrDefault(); +// if (InterfaceParameter != null && bool.Parse(InterfaceParameter.value)) +// { +// timeTaskEntity.EnabledMark = 0; +// await client.Updateable(timeTaskEntity).ExecuteCommandAsync(); +// SpareTime.Cancel(timeTaskEntity.Id); +// } +// } +// catch (Exception) +// { +// } +// +// } +// } +// } diff --git a/taskschedule/Tnb.TaskScheduler/Listener/RequestOneTimeWorker.cs b/taskschedule/Tnb.TaskScheduler/Listener/RequestOneTimeWorker.cs new file mode 100644 index 00000000..864eef5f --- /dev/null +++ b/taskschedule/Tnb.TaskScheduler/Listener/RequestOneTimeWorker.cs @@ -0,0 +1,46 @@ +using JNPF; +using JNPF.Extras.CollectiveOAuth.Utils; +using JNPF.Logging; +using JNPF.Systems.Entitys.System; +using JNPF.TaskScheduler; +using SqlSugar; +using Tnb.BasicData.Entities; + +namespace Tnb.TaskScheduler.Listener +{ + public class RequestJavaOneTimeWorker : ISpareTimeWorker + { + private ISqlSugarRepository _repository => App.GetService>(); + + [SpareTime("* * * * * ?", "自动生成待检出库", ExecuteType = SpareTimeExecuteTypes.Serial, StartNow = false, DoOnce = true)] + public async void RequestOne(SpareTimer timer, long count) + { + // Log.Information("----------------------开始生成特种设备检验计划----------------------"); + + try + { + Log.Information($"开始调用自动生成待检出库:"); + var db = _repository.CopyNew(); + TimeTaskEntity timeTaskEntity = await db.Queryable().SingleAsync(x => x.Id == timer.WorkerName); + string url = timeTaskEntity.Description; + if (url != null && !string.IsNullOrEmpty(url)) + { + Dictionary header = new() + { + //["Authorization"] = App.HttpContext!=null ? App.HttpContext.Request.Headers["Authorization"] : "" + }; + string sendResult = HttpUtils.RequestPost(url, "", header); + Log.Information($"开始调用j自动生成待检出库:{url}结束"); + } + } + catch (Exception e) + { + Console.WriteLine(e.Message); + Log.Error(e.Message); + } + + + // Log.Information("----------------------结束生成特种设备检验计划----------------------"); + } + } +} \ No newline at end of file diff --git a/taskschedule/Tnb.TaskScheduler/Listener/RequestThreeTimeWorker.cs b/taskschedule/Tnb.TaskScheduler/Listener/RequestThreeTimeWorker.cs new file mode 100644 index 00000000..323d4cf7 --- /dev/null +++ b/taskschedule/Tnb.TaskScheduler/Listener/RequestThreeTimeWorker.cs @@ -0,0 +1,45 @@ +using JNPF; +using JNPF.Extras.CollectiveOAuth.Utils; +using JNPF.Logging; +using JNPF.Systems.Entitys.System; +using JNPF.TaskScheduler; +using SqlSugar; +using Tnb.BasicData.Entities; + +namespace Tnb.TaskScheduler.Listener +{ + public class RequestJavaThreeTimeWorker : ISpareTimeWorker + { + private ISqlSugarRepository _repository => App.GetService>(); + + [SpareTime("* * * * * ?", "定时任务3", ExecuteType = SpareTimeExecuteTypes.Serial, StartNow = false, DoOnce = true)] + public async void RequestThree(SpareTimer timer, long count) + { + // Log.Information("----------------------开始生成特种设备检验计划----------------------"); + + try + { + var db = _repository.CopyNew(); + TimeTaskEntity timeTaskEntity = await db.Queryable().SingleAsync(x => x.Id == timer.WorkerName); + string url = timeTaskEntity.Description; + if (url != null && !string.IsNullOrEmpty(url)) + { + Dictionary header = new() + { + //["Authorization"] = App.HttpContext!=null ? App.HttpContext.Request.Headers["Authorization"] : "" + }; + string sendResult = HttpUtils.RequestPost(url, "", header); + Log.Error($"开始调用java接口3:{url}"); + } + } + catch (Exception e) + { + Console.WriteLine(e.Message); + Log.Error(e.Message); + } + + + // Log.Information("----------------------结束生成特种设备检验计划----------------------"); + } + } +} \ No newline at end of file diff --git a/taskschedule/Tnb.TaskScheduler/Listener/RequestTwoTimeWorker.cs b/taskschedule/Tnb.TaskScheduler/Listener/RequestTwoTimeWorker.cs new file mode 100644 index 00000000..9cb3c289 --- /dev/null +++ b/taskschedule/Tnb.TaskScheduler/Listener/RequestTwoTimeWorker.cs @@ -0,0 +1,45 @@ +using JNPF; +using JNPF.Extras.CollectiveOAuth.Utils; +using JNPF.Logging; +using JNPF.Systems.Entitys.System; +using JNPF.TaskScheduler; +using SqlSugar; +using Tnb.BasicData.Entities; + +namespace Tnb.TaskScheduler.Listener +{ + public class RequestJavaTwoTimeWorker : ISpareTimeWorker + { + private ISqlSugarRepository _repository => App.GetService>(); + + [SpareTime("* * * * * ?", "定时任务2", ExecuteType = SpareTimeExecuteTypes.Serial, StartNow = false, DoOnce = true)] + public async void RequestTwo(SpareTimer timer, long count) + { + // Log.Information("----------------------开始生成特种设备检验计划----------------------"); + + try + { + var db = _repository.CopyNew(); + TimeTaskEntity timeTaskEntity = await db.Queryable().SingleAsync(x => x.Id == timer.WorkerName); + string url = timeTaskEntity.Description; + if (url != null && !string.IsNullOrEmpty(url)) + { + Dictionary header = new() + { + //["Authorization"] = App.HttpContext!=null ? App.HttpContext.Request.Headers["Authorization"] : "" + }; + string sendResult = HttpUtils.RequestPost(url, "", header); + Log.Error($"开始调用java接口2:{url}"); + } + } + catch (Exception e) + { + Console.WriteLine(e.Message); + Log.Error(e.Message); + } + + + // Log.Information("----------------------结束生成特种设备检验计划----------------------"); + } + } +} \ No newline at end of file diff --git a/taskschedule/Tnb.TaskScheduler/TimeTaskService.cs b/taskschedule/Tnb.TaskScheduler/TimeTaskService.cs index 3261e1ed..e0c662eb 100644 --- a/taskschedule/Tnb.TaskScheduler/TimeTaskService.cs +++ b/taskschedule/Tnb.TaskScheduler/TimeTaskService.cs @@ -27,7 +27,7 @@ namespace JNPF.TaskScheduler; /// /// 定时任务 /// 版 本:V3.4.1 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2021-06-01. /// [ApiDescriptionSettings(Tag = "TaskScheduler", Name = "scheduletask", Order = 220)] diff --git a/taskschedule/Tnb.TaskScheduler/Tnb.TaskScheduler.csproj b/taskschedule/Tnb.TaskScheduler/Tnb.TaskScheduler.csproj index 64004e32..e77fe966 100644 --- a/taskschedule/Tnb.TaskScheduler/Tnb.TaskScheduler.csproj +++ b/taskschedule/Tnb.TaskScheduler/Tnb.TaskScheduler.csproj @@ -15,7 +15,6 @@ - diff --git a/tnb.server.iml b/tnb.server.iml new file mode 100644 index 00000000..8021953e --- /dev/null +++ b/tnb.server.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/visualdev/Tnb.Vengine/AppService/BaseAppService.cs b/visualdev/Tnb.Vengine/AppService/BaseAppService.cs index 1f1ddfab..5ee71c99 100644 --- a/visualdev/Tnb.Vengine/AppService/BaseAppService.cs +++ b/visualdev/Tnb.Vengine/AppService/BaseAppService.cs @@ -1,8 +1,4 @@ -///////////////////////////////////////////////////////////////////////////////// -// 宁波拓通e智造平台 ToTong Next Builder // -// https://git.tuotong-tech.com/tnb/tnb.server // -///////////////////////////////////////////////////////////////////////////////// - + using JNPF; using JNPF.DependencyInjection; using JNPF.DynamicApiController; diff --git a/visualdev/Tnb.Vengine/AppService/IVengineAppService.cs b/visualdev/Tnb.Vengine/AppService/IVengineAppService.cs index 62b22eef..9ec9e7c1 100644 --- a/visualdev/Tnb.Vengine/AppService/IVengineAppService.cs +++ b/visualdev/Tnb.Vengine/AppService/IVengineAppService.cs @@ -1,8 +1,4 @@ -///////////////////////////////////////////////////////////////////////////////// -// 宁波拓通e智造平台 ToTong Next Builder // -// https://git.tuotong-tech.com/tnb/tnb-server // -///////////////////////////////////////////////////////////////////////////////// - + using JNPF.DependencyInjection; namespace Tnb.Vengine.AppService; diff --git a/visualdev/Tnb.Vengine/AppService/IVmodelAppService.cs b/visualdev/Tnb.Vengine/AppService/IVmodelAppService.cs index b677945d..a1ad0a75 100644 --- a/visualdev/Tnb.Vengine/AppService/IVmodelAppService.cs +++ b/visualdev/Tnb.Vengine/AppService/IVmodelAppService.cs @@ -1,8 +1,4 @@ -///////////////////////////////////////////////////////////////////////////////// -// 宁波拓通e智造平台 ToTong Next Builder // -// https://git.tuotong-tech.com/tnb/tnb-server // -///////////////////////////////////////////////////////////////////////////////// - + using JNPF.DependencyInjection; namespace Tnb.Vengine.AppService; diff --git a/visualdev/Tnb.Vengine/AppService/IVmodelPageAppService.cs b/visualdev/Tnb.Vengine/AppService/IVmodelPageAppService.cs index dd916bd4..223ce1e6 100644 --- a/visualdev/Tnb.Vengine/AppService/IVmodelPageAppService.cs +++ b/visualdev/Tnb.Vengine/AppService/IVmodelPageAppService.cs @@ -1,8 +1,4 @@ -///////////////////////////////////////////////////////////////////////////////// -// 宁波拓通e智造平台 ToTong Next Builder // -// https://git.tuotong-tech.com/tnb/tnb-server // -///////////////////////////////////////////////////////////////////////////////// - + using JNPF.DependencyInjection; namespace Tnb.Vengine.AppService; diff --git a/visualdev/Tnb.Vengine/AppService/VengineAppService.cs b/visualdev/Tnb.Vengine/AppService/VengineAppService.cs index 56003c72..11b2fda0 100644 --- a/visualdev/Tnb.Vengine/AppService/VengineAppService.cs +++ b/visualdev/Tnb.Vengine/AppService/VengineAppService.cs @@ -1,8 +1,4 @@ -///////////////////////////////////////////////////////////////////////////////// -// 宁波拓通e智造平台 ToTong Next Builder // -// https://git.tuotong-tech.com/tnb/tnb-server // -///////////////////////////////////////////////////////////////////////////////// - + using JNPF; using JNPF.Common.Security; using Mapster; diff --git a/visualdev/Tnb.Vengine/AppService/VengineAppServiceT.cs b/visualdev/Tnb.Vengine/AppService/VengineAppServiceT.cs index ddcbb15d..dbc333a3 100644 --- a/visualdev/Tnb.Vengine/AppService/VengineAppServiceT.cs +++ b/visualdev/Tnb.Vengine/AppService/VengineAppServiceT.cs @@ -1,8 +1,4 @@ -///////////////////////////////////////////////////////////////////////////////// -// 宁波拓通e智造平台 ToTong Next Builder // -// https://git.tuotong-tech.com/tnb/tnb-server // -///////////////////////////////////////////////////////////////////////////////// - + using System.Reflection; using System.Security.Cryptography; using Aop.Api.Domain; diff --git a/visualdev/Tnb.Vengine/AppService/VmodelAppService.cs b/visualdev/Tnb.Vengine/AppService/VmodelAppService.cs index 886507cf..2031a470 100644 --- a/visualdev/Tnb.Vengine/AppService/VmodelAppService.cs +++ b/visualdev/Tnb.Vengine/AppService/VmodelAppService.cs @@ -1,8 +1,4 @@ -///////////////////////////////////////////////////////////////////////////////// -// 宁波拓通e智造平台 ToTong Next Builder // -// https://git.tuotong-tech.com/tnb/tnb-server // -///////////////////////////////////////////////////////////////////////////////// - + using JNPF; using JNPF.Common.Core.Manager; using JNPF.Common.Extension; diff --git a/visualdev/Tnb.Vengine/AppService/VmodelDto.cs b/visualdev/Tnb.Vengine/AppService/VmodelDto.cs index c3d22d99..52a72b06 100644 --- a/visualdev/Tnb.Vengine/AppService/VmodelDto.cs +++ b/visualdev/Tnb.Vengine/AppService/VmodelDto.cs @@ -1,7 +1,3 @@ -///////////////////////////////////////////////////////////////////////////////// -// 宁波拓通e智造平台 ToTong Next Builder // -// https://git.tuotong-tech.com/tnb/tnb.server // -///////////////////////////////////////////////////////////////////////////////// using Mapster; using Newtonsoft.Json; diff --git a/visualdev/Tnb.Vengine/AppService/VmodelPageAppService.cs b/visualdev/Tnb.Vengine/AppService/VmodelPageAppService.cs index d0d2234f..706f8b93 100644 --- a/visualdev/Tnb.Vengine/AppService/VmodelPageAppService.cs +++ b/visualdev/Tnb.Vengine/AppService/VmodelPageAppService.cs @@ -1,8 +1,4 @@ -///////////////////////////////////////////////////////////////////////////////// -// 宁波拓通e智造平台 ToTong Next Builder // -// https://git.tuotong-tech.com/tnb/tnb-server // -///////////////////////////////////////////////////////////////////////////////// - + using System.Text; using JNPF.Common.Security; using Mapster; diff --git a/visualdev/Tnb.Vengine/Constants/DbConsts.cs b/visualdev/Tnb.Vengine/Constants/DbConsts.cs index 8599135e..94e5b182 100644 --- a/visualdev/Tnb.Vengine/Constants/DbConsts.cs +++ b/visualdev/Tnb.Vengine/Constants/DbConsts.cs @@ -1,8 +1,4 @@ -///////////////////////////////////////////////////////////////////////////////// -// 宁波拓通e智造平台 ToTong Next Builder // -// https://git.tuotong-tech.com/tnb/tnb.server // -///////////////////////////////////////////////////////////////////////////////// - + namespace Tnb.Vengine; public static class DbConsts diff --git a/visualdev/Tnb.Vengine/Constants/VmodelEnum.cs b/visualdev/Tnb.Vengine/Constants/VmodelEnum.cs index fdf26479..0ac3bad3 100644 --- a/visualdev/Tnb.Vengine/Constants/VmodelEnum.cs +++ b/visualdev/Tnb.Vengine/Constants/VmodelEnum.cs @@ -1,8 +1,4 @@ -///////////////////////////////////////////////////////////////////////////////// -// 宁波拓通e智造平台 ToTong Next Builder // -// https://git.tuotong-tech.com/tnb/tnb.server // -///////////////////////////////////////////////////////////////////////////////// - + using System.ComponentModel; namespace Tnb.Vengine; diff --git a/visualdev/Tnb.Vengine/Domain/VengineDto.cs b/visualdev/Tnb.Vengine/Domain/VengineDto.cs index 42536884..76fb1633 100644 --- a/visualdev/Tnb.Vengine/Domain/VengineDto.cs +++ b/visualdev/Tnb.Vengine/Domain/VengineDto.cs @@ -1,8 +1,4 @@ -///////////////////////////////////////////////////////////////////////////////// -// 宁波拓通e智造平台 ToTong Next Builder // -// https://git.tuotong-tech.com/tnb/tnb.server // -///////////////////////////////////////////////////////////////////////////////// - + using JNPF.Common.Security; using Mapster; using Microsoft.AspNetCore.Http; diff --git a/visualdev/Tnb.Vengine/Domain/VmBaseProp.cs b/visualdev/Tnb.Vengine/Domain/VmBaseProp.cs index 55986796..9a06308c 100644 --- a/visualdev/Tnb.Vengine/Domain/VmBaseProp.cs +++ b/visualdev/Tnb.Vengine/Domain/VmBaseProp.cs @@ -1,7 +1,3 @@ -///////////////////////////////////////////////////////////////////////////////// -// 宁波拓通e智造平台 ToTong Next Builder // -// https://git.tuotong-tech.com/tnb/tnb.server // -///////////////////////////////////////////////////////////////////////////////// using Newtonsoft.Json.Linq; diff --git a/visualdev/Tnb.Vengine/Domain/VmCalcProp.cs b/visualdev/Tnb.Vengine/Domain/VmCalcProp.cs index 7ac0c208..e548293e 100644 --- a/visualdev/Tnb.Vengine/Domain/VmCalcProp.cs +++ b/visualdev/Tnb.Vengine/Domain/VmCalcProp.cs @@ -1,7 +1,3 @@ -///////////////////////////////////////////////////////////////////////////////// -// 宁波拓通e智造平台 ToTong Next Builder // -// https://git.tuotong-tech.com/tnb/tnb.server // -///////////////////////////////////////////////////////////////////////////////// namespace Tnb.Vengine.Domain; diff --git a/visualdev/Tnb.Vengine/Domain/VmDbProp.cs b/visualdev/Tnb.Vengine/Domain/VmDbProp.cs index cb89b77c..f4687c18 100644 --- a/visualdev/Tnb.Vengine/Domain/VmDbProp.cs +++ b/visualdev/Tnb.Vengine/Domain/VmDbProp.cs @@ -1,7 +1,3 @@ -///////////////////////////////////////////////////////////////////////////////// -// 宁波拓通e智造平台 ToTong Next Builder // -// https://git.tuotong-tech.com/tnb/tnb.server // -///////////////////////////////////////////////////////////////////////////////// using JNPF.Common.Extension; using Newtonsoft.Json; diff --git a/visualdev/Tnb.Vengine/Domain/VmNavProp.cs b/visualdev/Tnb.Vengine/Domain/VmNavProp.cs index 4f7d08c9..e820b17c 100644 --- a/visualdev/Tnb.Vengine/Domain/VmNavProp.cs +++ b/visualdev/Tnb.Vengine/Domain/VmNavProp.cs @@ -1,7 +1,3 @@ -///////////////////////////////////////////////////////////////////////////////// -// 宁波拓通e智造平台 ToTong Next Builder // -// https://git.tuotong-tech.com/tnb/tnb.server // -///////////////////////////////////////////////////////////////////////////////// using Newtonsoft.Json; diff --git a/visualdev/Tnb.Vengine/Domain/Vmodel.cs b/visualdev/Tnb.Vengine/Domain/Vmodel.cs index 05c05155..df630e9c 100644 --- a/visualdev/Tnb.Vengine/Domain/Vmodel.cs +++ b/visualdev/Tnb.Vengine/Domain/Vmodel.cs @@ -1,7 +1,3 @@ -///////////////////////////////////////////////////////////////////////////////// -// 宁波拓通e智造平台 ToTong Next Builder // -// https://git.tuotong-tech.com/tnb/tnb.server // -///////////////////////////////////////////////////////////////////////////////// using System.ComponentModel; using System.ComponentModel.DataAnnotations; diff --git a/visualdev/Tnb.Vengine/Domain/VmodelLink.cs b/visualdev/Tnb.Vengine/Domain/VmodelLink.cs index ce51cf3e..6b539eeb 100644 --- a/visualdev/Tnb.Vengine/Domain/VmodelLink.cs +++ b/visualdev/Tnb.Vengine/Domain/VmodelLink.cs @@ -1,7 +1,3 @@ -///////////////////////////////////////////////////////////////////////////////// -// 宁波拓通e智造平台 ToTong Next Builder // -// https://git.tuotong-tech.com/tnb/tnb.server // -///////////////////////////////////////////////////////////////////////////////// using JNPF.Common.Contracts; using SqlSugar; diff --git a/visualdev/Tnb.Vengine/Domain/VmodelPage.cs b/visualdev/Tnb.Vengine/Domain/VmodelPage.cs index e2354eae..df9dd97c 100644 --- a/visualdev/Tnb.Vengine/Domain/VmodelPage.cs +++ b/visualdev/Tnb.Vengine/Domain/VmodelPage.cs @@ -1,7 +1,3 @@ -///////////////////////////////////////////////////////////////////////////////// -// 宁波拓通e智造平台 ToTong Next Builder // -// https://git.tuotong-tech.com/tnb/tnb.server // -///////////////////////////////////////////////////////////////////////////////// using JNPF.Common.Contracts; using Newtonsoft.Json.Linq; diff --git a/visualdev/Tnb.Vengine/Mapper/VmodelMapper.cs b/visualdev/Tnb.Vengine/Mapper/VmodelMapper.cs index fe8cd4df..a2cadc5e 100644 --- a/visualdev/Tnb.Vengine/Mapper/VmodelMapper.cs +++ b/visualdev/Tnb.Vengine/Mapper/VmodelMapper.cs @@ -1,8 +1,4 @@ -///////////////////////////////////////////////////////////////////////////////// -// 宁波拓通e智造平台 ToTong Next Builder // -// https://git.tuotong-tech.com/tnb/tnb.server // -///////////////////////////////////////////////////////////////////////////////// - + using JNPF.Common.Security; using Mapster; using SqlSugar; diff --git a/visualdev/Tnb.VisualDev.Engine/Model/EntityFieldModel.cs b/visualdev/Tnb.VisualDev.Engine/Model/EntityFieldModel.cs index 0bcc7749..175c489a 100644 --- a/visualdev/Tnb.VisualDev.Engine/Model/EntityFieldModel.cs +++ b/visualdev/Tnb.VisualDev.Engine/Model/EntityFieldModel.cs @@ -5,8 +5,6 @@ namespace JNPF.VisualDev.Engine; /// /// 实体字段模型 /// 版 本:V3.0.0 -/// 版 权:引迈信息技术有限公司(https://www.jnpfsoft.com) -/// 作 者:JNPF开发平台组. /// [SuppressSniffer] public class EntityFieldModel diff --git a/visualdev/Tnb.VisualDev.Entitys/Entity/EmailReceiveEntity.cs b/visualdev/Tnb.VisualDev.Entitys/Entity/EmailReceiveEntity.cs index ab28635e..a99a4080 100644 --- a/visualdev/Tnb.VisualDev.Entitys/Entity/EmailReceiveEntity.cs +++ b/visualdev/Tnb.VisualDev.Entitys/Entity/EmailReceiveEntity.cs @@ -6,8 +6,6 @@ namespace JNPF.VisualDev.Entitys; /// /// 邮件接收 /// 版 本:V3.2 -/// 版 权:引迈信息技术有限公司(https://www.jnpfsoft.com) -/// 作 者:JNPF开发平台组 /// 日 期:2021-06-01. /// [SugarTable("EXT_EMAILRECEIVE")] diff --git a/visualdev/Tnb.VisualDev.Entitys/Entity/VisualDevModelDataEntity.cs b/visualdev/Tnb.VisualDev.Entitys/Entity/VisualDevModelDataEntity.cs index 19083e0a..1846125a 100644 --- a/visualdev/Tnb.VisualDev.Entitys/Entity/VisualDevModelDataEntity.cs +++ b/visualdev/Tnb.VisualDev.Entitys/Entity/VisualDevModelDataEntity.cs @@ -7,7 +7,7 @@ namespace JNPF.VisualDev.Entitys; /// /// 可视化开发功能实体 /// 版 本:V2.6.200612 -/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com) + /// 日 期:2020-10-28. /// [SugarTable("BASE_VISUALDEV_MODELDATA")] diff --git a/visualdev/Tnb.VisualDev/VisualDevModelDataService.cs b/visualdev/Tnb.VisualDev/VisualDevModelDataService.cs index c80c4268..7bee90d2 100644 --- a/visualdev/Tnb.VisualDev/VisualDevModelDataService.cs +++ b/visualdev/Tnb.VisualDev/VisualDevModelDataService.cs @@ -541,7 +541,7 @@ namespace JNPF.VisualDev dicItem.Add(item.__vModel__, "系统自动生成"); break; case JnpfKeyConst.COMSELECT: - dicItem.Add(item.__vModel__, item.multiple ? "例:拓通智联/产品部,拓通智联/技术部" : "例:拓通智联/技术部"); + dicItem.Add(item.__vModel__, item.multiple ? "例:卡奥斯/产品部,卡奥斯/技术部" : "例:卡奥斯/技术部"); break; case JnpfKeyConst.DEPSELECT: dicItem.Add(item.__vModel__, item.multiple ? "例:产品部/部门编码,技术部/部门编码" : "例:技术部/部门编码"); @@ -550,7 +550,7 @@ namespace JNPF.VisualDev dicItem.Add(item.__vModel__, item.multiple ? "例:技术经理/岗位编码,技术员/岗位编码" : "例:技术员/岗位编码"); break; case JnpfKeyConst.USERSSELECT: - dicItem.Add(item.__vModel__, item.selectType.Equals("all") ? "例:拓通智联/产品部,产品部/部门编码,技术经理/岗位编码,研发人员/角色编码,A分组/分组编码,张三/账号" : "例:李四/账号"); + dicItem.Add(item.__vModel__, item.selectType.Equals("all") ? "例:卡奥斯/产品部,产品部/部门编码,技术经理/岗位编码,研发人员/角色编码,A分组/分组编码,张三/账号" : "例:李四/账号"); break; case JnpfKeyConst.USERSELECT: dicItem.Add(item.__vModel__, item.multiple ? "例:张三/账号,李四/账号" : "例:张三/账号");