合并
This commit is contained in:
@@ -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]
|
||||
|
||||
@@ -1,370 +0,0 @@
|
||||
namespace Tnb.BasicData.Entities.Dto
|
||||
{
|
||||
public class ErpBasMaterialInput
|
||||
{
|
||||
public ErpBasMaterial bas_material { get; set; }
|
||||
public List<ErpBasMaterialUnit> bas_material_units { get; set; } = new List<ErpBasMaterialUnit>();
|
||||
|
||||
// public List<ErpBasMaterialIntoFactorySpecifications> bas_material_into_factory_specificationses { get; set; } = new List<ErpBasMaterialIntoFactorySpecifications>();
|
||||
//
|
||||
// public List<ErpBasSubstitutionMaterial> bas_substitution_materials { get; set; } = new List<ErpBasSubstitutionMaterial>();
|
||||
//
|
||||
// public List<ErpBasMaterialSendWarehouse> bas_material_send_warehouses { get; set; } = new List<ErpBasMaterialSendWarehouse>();
|
||||
//
|
||||
// public List<ErpBasMaterialInboundWh> bas_material_inbound_whs { get; set; } = new List<ErpBasMaterialInboundWh>();
|
||||
}
|
||||
|
||||
public class ErpBasMaterial
|
||||
{
|
||||
/// <summary>
|
||||
/// 物料代码
|
||||
/// </summary>
|
||||
public string code { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 物料名称
|
||||
/// </summary>
|
||||
public string name { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 物料分类ID
|
||||
/// </summary>
|
||||
public string category_id { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 单位ID
|
||||
/// </summary>
|
||||
public string unit_id { get; set; } = string.Empty;
|
||||
|
||||
// /// <summary>
|
||||
// /// 单价
|
||||
// /// </summary>
|
||||
// public decimal? cost { get; set; }
|
||||
//
|
||||
// /// <summary>
|
||||
// /// 毛重
|
||||
// /// </summary>
|
||||
// public decimal? grossweight { get; set; }
|
||||
//
|
||||
// /// <summary>
|
||||
// /// 净重
|
||||
// /// </summary>
|
||||
// public decimal? netweight { get; set; }
|
||||
//
|
||||
// /// <summary>
|
||||
// /// 长
|
||||
// /// </summary>
|
||||
// public decimal? length { get; set; }
|
||||
//
|
||||
// /// <summary>
|
||||
// /// 宽
|
||||
// /// </summary>
|
||||
// public decimal? width { get; set; }
|
||||
//
|
||||
// /// <summary>
|
||||
// /// 高
|
||||
// /// </summary>
|
||||
// public decimal? high { get; set; }
|
||||
//
|
||||
// /// <summary>
|
||||
// /// 体积
|
||||
// /// </summary>
|
||||
// public decimal? volumn { get; set; }
|
||||
//
|
||||
// /// <summary>
|
||||
// /// 是否免检
|
||||
// /// </summary>
|
||||
// public int? isexemption { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 安全库存
|
||||
/// </summary>
|
||||
public decimal? safeqty { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 保质期
|
||||
/// </summary>
|
||||
public int? qualityperiod { get; set; }
|
||||
|
||||
// /// <summary>
|
||||
// /// 是否过期允许出库
|
||||
// /// </summary>
|
||||
// public string? expireout { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 最小包装
|
||||
/// </summary>
|
||||
public decimal? minpacking { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否先进先出管控
|
||||
/// </summary>
|
||||
public string? fifo { get; set; }
|
||||
|
||||
// /// <summary>
|
||||
// /// 先进先出间隔天数,批次间隔天数
|
||||
// /// </summary>
|
||||
// public int? fifo_interval_days { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料规格型号
|
||||
/// </summary>
|
||||
public string? material_standard { get; set; }
|
||||
|
||||
// /// <summary>
|
||||
// /// 海关编码
|
||||
// /// </summary>
|
||||
// public string? fhscode { get; set; }
|
||||
|
||||
// /// <summary>
|
||||
// /// 附属性
|
||||
// /// </summary>
|
||||
// public string? attribute { get; set; }
|
||||
|
||||
// /// <summary>
|
||||
// /// 管控类型: 批管控:Lot 单管控:KeyParts 非管控:NoControl
|
||||
// /// </summary>
|
||||
// public string? controltype { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string? remark { get; set; }
|
||||
|
||||
// /// <summary>
|
||||
// /// 创建用户
|
||||
// /// </summary>
|
||||
// public string? create_id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建用户
|
||||
/// </summary>
|
||||
public string? create_count { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
public DateTime? create_time { get; set; }
|
||||
|
||||
// /// <summary>
|
||||
// /// 修改用户
|
||||
// /// </summary>
|
||||
// public string? modify_id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 修改用户
|
||||
/// </summary>
|
||||
public string? modify_count { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 修改时间
|
||||
/// </summary>
|
||||
public DateTime? modify_time { get; set; }
|
||||
|
||||
// /// <summary>
|
||||
// /// 扩展字段
|
||||
// /// </summary>
|
||||
// public string? extras { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 状态
|
||||
/// </summary>
|
||||
public string? state { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料属性
|
||||
/// </summary>
|
||||
public string? material_property { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 标签
|
||||
/// </summary>
|
||||
public string? label { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 描述
|
||||
/// </summary>
|
||||
public string? descrip { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 批次管理
|
||||
/// </summary>
|
||||
public int? is_batch_enabled { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 标签管理
|
||||
/// </summary>
|
||||
public int? is_label_enabled { get; set; }
|
||||
|
||||
// /// <summary>
|
||||
// /// 附件
|
||||
// /// </summary>
|
||||
// public string? attachment { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 先进先出 0否 1是
|
||||
/// </summary>
|
||||
public int? first_in_out { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 存储有效期(天)
|
||||
/// </summary>
|
||||
public int? storage_valid_day { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 预警提前期(天)
|
||||
/// </summary>
|
||||
public int? early_warn_day { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 安全库存
|
||||
/// </summary>
|
||||
public int? safe_stock { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 安全库存包含状态
|
||||
/// </summary>
|
||||
public string? safe_stock_stauts { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 发料仓库id
|
||||
/// </summary>
|
||||
public string? send_warehouse_id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 入厂单位id
|
||||
/// </summary>
|
||||
public string? into_factory_unit_id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 投料单位
|
||||
/// </summary>
|
||||
public string? material_in_unit_id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 产出单位
|
||||
/// </summary>
|
||||
public string? material_out_unit_id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 请料方式 1按计划排程请料 2自行管控
|
||||
/// </summary>
|
||||
public string? material_request_method { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否包含入库数
|
||||
/// </summary>
|
||||
public int? is_contain_into_num { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否创建子工单
|
||||
/// </summary>
|
||||
public string? is_create_sub_work_order { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 保质期
|
||||
/// </summary>
|
||||
public int? quality_guarantee_period { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// DI编码
|
||||
/// </summary>
|
||||
public string? di { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class ErpBasMaterialUnit
|
||||
{
|
||||
/// <summary>
|
||||
/// 主单位数量
|
||||
/// </summary>
|
||||
public string? number_of_primary_unit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 辅助单位数量
|
||||
/// </summary>
|
||||
public string? number_of_auxiliary_unit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 辅助单位
|
||||
/// </summary>
|
||||
public string auxiliary_unit_id { get; set; } = string.Empty;
|
||||
|
||||
}
|
||||
|
||||
public class ErpBasMaterialIntoFactorySpecifications
|
||||
{
|
||||
/// <summary>
|
||||
/// 单位id
|
||||
/// </summary>
|
||||
public string unit_id { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 数量
|
||||
/// </summary>
|
||||
public decimal num { get; set; }
|
||||
}
|
||||
|
||||
public class ErpBasSubstitutionMaterial
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 替代料编号
|
||||
/// </summary>
|
||||
public string sub_material_code { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 替代比例,如1(一个物料可以用一个替代料代替)
|
||||
/// </summary>
|
||||
public decimal proportion { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class ErpBasMaterialSendWarehouse
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 仓库编号
|
||||
/// </summary>
|
||||
public string? wh_code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 最大库存
|
||||
/// </summary>
|
||||
public int? max_stock { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 最小库存
|
||||
/// </summary>
|
||||
public int? min_stock { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 安全库存
|
||||
/// </summary>
|
||||
public int? safe_stock { get; set; }
|
||||
}
|
||||
|
||||
public class ErpBasMaterialInboundWh
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 仓库编号
|
||||
/// </summary>
|
||||
public string? wh_code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 最大库存
|
||||
/// </summary>
|
||||
public int? max_stock { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 最小库存
|
||||
/// </summary>
|
||||
public int? min_stock { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 安全库存
|
||||
/// </summary>
|
||||
public int? safe_stock { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -125,5 +125,5 @@ public partial class BasLocation : BaseEntity<string>
|
||||
/// <summary>
|
||||
/// 是否超配(1:不超配 2:超配)
|
||||
/// </summary>
|
||||
public string is_overmatch { get; set; } = "1";
|
||||
public string is_overmatch { get; set; }
|
||||
}
|
||||
|
||||
@@ -264,9 +264,4 @@ public partial class BasMaterial : BaseEntity<string>
|
||||
/// </summary>
|
||||
public string? di { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 删除标志
|
||||
/// </summary>
|
||||
public int? deleted { get; set; }
|
||||
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ using SqlSugar;
|
||||
namespace Tnb.BasicData.Entities;
|
||||
|
||||
/// <summary>
|
||||
/// 物料入厂规格
|
||||
/// 物料入场规格
|
||||
/// </summary>
|
||||
[SugarTable("bas_material_into_factory_specifications")]
|
||||
public partial class BasMaterialIntoFactorySpecifications : BaseEntity<string>
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 物料新增修改接口
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<dynamic> 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<bool> result = await db.Ado.UseTranAsync(async () =>
|
||||
{
|
||||
BasMaterial basMaterial = input.bas_material.Adapt<BasMaterial>();
|
||||
if (!await db.Queryable<BasMaterial>().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<UserEntity>().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<UserEntity>().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<BasMaterialUnit> basMaterialUnits = new List<BasMaterialUnit>();
|
||||
// List<BasMaterialIntoFactorySpecifications> basMaterialIntoFactorySpecificationsList = new List<BasMaterialIntoFactorySpecifications>();
|
||||
// List<BasSubstitutionMaterial> basSubstitutionMaterials = new List<BasSubstitutionMaterial>();
|
||||
// List<BasMaterialSendWarehouse> basMaterialSendWarehouses = new List<BasMaterialSendWarehouse>();
|
||||
// List<BasMaterialInboundWh> basMaterialInboundWhs = new List<BasMaterialInboundWh>();
|
||||
|
||||
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>();
|
||||
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>();
|
||||
// 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>();
|
||||
// basSubstitutionMaterial.id = SnowflakeIdHelper.NextId();
|
||||
// basSubstitutionMaterial.material_id = basMaterial.id;
|
||||
// BasMaterial subBasMaterial = await db.Queryable<BasMaterial>().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>();
|
||||
// basMaterialSendWarehouse.id = SnowflakeIdHelper.NextId();
|
||||
// basMaterialSendWarehouse.material_id = basMaterial.id;
|
||||
// BasWarehouse basWarehouse = await db.Queryable<BasWarehouse>().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>();
|
||||
// basMaterialInboundWh.id = SnowflakeIdHelper.NextId();
|
||||
// basMaterialInboundWh.material_id = basMaterial.id;
|
||||
// BasWarehouse basWarehouse = await db.Queryable<BasWarehouse>().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<BasMaterial>().AnyAsync(x => x.code == input.bas_material.code))
|
||||
{
|
||||
await db.Insertable<BasMaterial>(basMaterial).ExecuteCommandAsync();
|
||||
}
|
||||
else
|
||||
{
|
||||
await db.Updateable<BasMaterial>(basMaterial).ExecuteCommandAsync();
|
||||
}
|
||||
|
||||
// var x= await db.Storageable(basMaterial).ToStorageAsync();
|
||||
// await x.AsInsertable.ExecuteCommandAsync();//不存在插入
|
||||
// await x.AsUpdateable.ExecuteCommandAsync();//存在更新
|
||||
|
||||
if (basMaterialUnits.Count > 0)
|
||||
{
|
||||
await db.Deleteable<BasMaterialUnit>().Where(x=>x.material_id==basMaterial.id).ExecuteCommandAsync();
|
||||
await db.Insertable<BasMaterialUnit>(basMaterialUnits).ExecuteCommandAsync();
|
||||
}
|
||||
|
||||
// if (basMaterialIntoFactorySpecificationsList.Count > 0)
|
||||
// {
|
||||
// await db.Deleteable<BasMaterialIntoFactorySpecifications>().Where(x=>x.material_id==basMaterial.id).ExecuteCommandAsync();
|
||||
// await db.Insertable<BasMaterialIntoFactorySpecifications>(basMaterialIntoFactorySpecificationsList).ExecuteCommandAsync();
|
||||
// }
|
||||
//
|
||||
// if (basSubstitutionMaterials.Count > 0)
|
||||
// {
|
||||
// await db.Deleteable<BasSubstitutionMaterial>().Where(x=>x.material_id==basMaterial.id).ExecuteCommandAsync();
|
||||
// await db.Insertable<BasSubstitutionMaterial>(basSubstitutionMaterials).ExecuteCommandAsync();
|
||||
// }
|
||||
//
|
||||
// if (basMaterialSendWarehouses.Count > 0)
|
||||
// {
|
||||
// await db.Deleteable<BasMaterialSendWarehouse>().Where(x=>x.material_id==basMaterial.id).ExecuteCommandAsync();
|
||||
// await db.Insertable<BasMaterialSendWarehouse>(basMaterialSendWarehouses).ExecuteCommandAsync();
|
||||
// }
|
||||
//
|
||||
// if (basMaterialInboundWhs.Count > 0)
|
||||
// {
|
||||
// await db.Deleteable<BasMaterialInboundWh>().Where(x=>x.material_id==basMaterial.id).ExecuteCommandAsync();
|
||||
// await db.Insertable<BasMaterialInboundWh>(basMaterialInboundWhs).ExecuteCommandAsync();
|
||||
// }
|
||||
|
||||
});
|
||||
return !result.IsSuccess ? throw Oops.Oh(result.ErrorMessage) : "保存成功";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -15,4 +15,12 @@
|
||||
<ProjectReference Include="..\Tnb.BasicData.Interfaces\Tnb.BasicData.Interfaces.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="nacos-sdk-csharp" Version="1.3.5" />
|
||||
<PackageReference Include="nacos-sdk-csharp.AspNetCore" Version="1.3.5" />
|
||||
<PackageReference Include="nacos-sdk-csharp.Extensions.Configuration" Version="1.3.5" />
|
||||
<PackageReference Include="nacos-sdk-csharp.IniParser" Version="1.3.5" />
|
||||
<PackageReference Include="nacos-sdk-csharp.YamlParser" Version="1.3.5" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
54
BasicData/Tnb.BasicData/ValuesController.cs
Normal file
54
BasicData/Tnb.BasicData/ValuesController.cs
Normal file
@@ -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<string> 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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -5,7 +5,7 @@ using SqlSugar;
|
||||
namespace Tnb.ProductionMgr.Entities;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// 自检报废记录表
|
||||
/// </summary>
|
||||
[SugarTable("prd_mo_task_defect_record")]
|
||||
public partial class PrdMoTaskDefectRecord : BaseEntity<string>
|
||||
|
||||
@@ -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
|
||||
@@ -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<PrdMoTask>().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)
|
||||
@@ -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<PrdMoTask>()
|
||||
@@ -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<PerProcessStandardsH>()
|
||||
.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<PerProcessStandardsH>()
|
||||
// .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<ToolMolds>().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<PrdMoTask>()
|
||||
.SetColumns(x => x.plan_end_date == cal_plan_end_date)
|
||||
.Where(x => x.id == input.mo_task_id).ExecuteCommandAsync();
|
||||
}
|
||||
}
|
||||
// ToolMolds toolMolds = await db.Queryable<ToolMolds>().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<PrdMoTask>()
|
||||
// .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))
|
||||
@@ -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<PrdMoTask>().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<PerProcessStandardsH>()
|
||||
.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<ToolMolds>().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<PrdMoTask>()
|
||||
.SetColumns(x => x.plan_end_date == cal_plan_end_date)
|
||||
.Where(x => x.id == input.mo_task_id).ExecuteCommandAsync();
|
||||
}
|
||||
}
|
||||
// PerProcessStandardsH processStandardsH = await db.Queryable<PerProcessStandardsH>()
|
||||
// .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<ToolMolds>().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<PrdMoTask>()
|
||||
// .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
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="AppFriendlyException"></exception>
|
||||
[HttpPost]
|
||||
public async Task<dynamic> GetEstimatedEndTime(CountEstimatedEndTimeInput input)
|
||||
{
|
||||
ISqlSugarClient db = _repository.AsSugarClient();
|
||||
if (input.type == 1)
|
||||
{
|
||||
PerProcessStandardsH processStandardsH = await db.Queryable<PerProcessStandardsH>()
|
||||
.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<ToolMolds>().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<BasStandardTime> list = await db.Queryable<BasMbomProcess>()
|
||||
.LeftJoin<BasStandardTime>((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<dynamic> GetEstimatedEndTime(CountEstimatedEndTimeInput input)
|
||||
// {
|
||||
// ISqlSugarClient db = _repository.AsSugarClient();
|
||||
// if (input.type == 1)
|
||||
// {
|
||||
// PerProcessStandardsH processStandardsH = await db.Queryable<PerProcessStandardsH>()
|
||||
// .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<ToolMolds>().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<BasStandardTime> list = await db.Queryable<BasMbomProcess>()
|
||||
// .LeftJoin<BasStandardTime>((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");
|
||||
// }
|
||||
//
|
||||
// }
|
||||
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -379,132 +379,5 @@ namespace Tnb.ProductionMgr
|
||||
throw Oops.Bah(e.Message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[HttpPost]
|
||||
public async Task<dynamic> MaterialOutstockTest(MaterialOutstockInput materialOutstockInput)
|
||||
{
|
||||
try
|
||||
{
|
||||
var db = _repository.AsSugarClient();
|
||||
string warehouse_id = "1";//一楼原材料仓
|
||||
|
||||
MESCreateOutstockInput input = new MESCreateOutstockInput();
|
||||
input.outstock = new MESWmsOutstockHInput();
|
||||
input.outstockDs = new List<MESWmsOutstockDInput>();
|
||||
|
||||
BasLocation location = await db.Queryable<BasLocation>().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<string> materialIds = materialOutstockInput.details.Select(x => x.material_id).ToList();
|
||||
List<BasMaterial> basMaterials = await db.Queryable<BasMaterial>().Where(x => materialIds.Contains(x.id)).ToListAsync();
|
||||
Dictionary<string, object> unitIdDic = await db.Queryable<BasMaterial>()
|
||||
.LeftJoin<DictionaryTypeEntity>((a, b) => b.EnCode == DictConst.MeasurementUnit)
|
||||
.LeftJoin<DictionaryDataEntity>((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<string, object> header = new Dictionary<string, object>()
|
||||
{
|
||||
["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<AuthResponse>(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<PrdOutstockD> prdOutstockDs = new List<PrdOutstockD>();
|
||||
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<bool> result = await _repository.AsSugarClient().Ado.UseTranAsync(async () =>
|
||||
{
|
||||
await _repository.InsertAsync(prdOutstockH);
|
||||
if (prdOutstockDs.Count > 0)
|
||||
{
|
||||
await db.Insertable<PrdOutstockD>(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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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<PADPackageTaskPageOutput>.SqlSugarPageResult(result);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// pda端根据工位获取任务单列表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<dynamic> GetPadPrdMoTaskList(PrdMoTaskListOutput input)
|
||||
{
|
||||
if (string.IsNullOrEmpty(input.stationId))
|
||||
{
|
||||
return new
|
||||
{
|
||||
pagination = new PageResult(),
|
||||
list = Array.Empty<string>()
|
||||
};
|
||||
}
|
||||
|
||||
Dictionary<string, object> queryJson = string.IsNullOrEmpty(input.queryJson) ? new Dictionary<string, object>() : input.queryJson.ToObject<Dictionary<string, object>>();
|
||||
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<string> 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<PADPackageTaskPageOutput> result = await _db.Queryable<PrdMoTask>()
|
||||
.LeftJoin<BasMaterial>((a, b) => a.material_id == b.id)
|
||||
.LeftJoin<BasProcess>((a, b, c) => a.process_id == c.id)
|
||||
.LeftJoin<OrganizeEntity>((a, b, c, d) => a.workline_id == d.Id)
|
||||
.LeftJoin<DictionaryDataEntity>((a, b, c, d, e) => e.DictionaryTypeId == DictConst.PrdTaskStatusTypeId && a.mo_task_status == e.EnCode)
|
||||
.LeftJoin<EqpEquipment>((a, b, c, d, e, f) => a.eqp_id == f.id)
|
||||
.LeftJoin<ToolMolds>((a, b, c, d, e, f, g) => a.mold_id == g.id)
|
||||
.LeftJoin<PerProcessStandardsH>((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<BasStandardTime>((a, b, c, d, e, f, g, h, i) => a.process_id == i.process_id && i.enabled == 1)
|
||||
.LeftJoin<PrdMo>((a, b, c, d, e, f, g, h, i, j) => a.mo_id == j.id)
|
||||
.LeftJoin<BasMaterialUnit>((a, b, c, d, e, f, g, h, i, j, k) => a.material_id == k.material_id && k.auxiliary_unit_id == "kg")
|
||||
.LeftJoin<EqpDaq>((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<PADPackageTaskPageOutput>.SqlSugarPageResult(result);
|
||||
|
||||
}
|
||||
// /// <summary>
|
||||
// /// pda端根据工位获取任务单列表
|
||||
// /// </summary>
|
||||
// /// <returns></returns>
|
||||
// [HttpPost]
|
||||
// public async Task<dynamic> GetPadPrdMoTaskList(PrdMoTaskListOutput input)
|
||||
// {
|
||||
// if (string.IsNullOrEmpty(input.stationId))
|
||||
// {
|
||||
// return new
|
||||
// {
|
||||
// pagination = new PageResult(),
|
||||
// list = Array.Empty<string>()
|
||||
// };
|
||||
// }
|
||||
//
|
||||
// Dictionary<string, object> queryJson = string.IsNullOrEmpty(input.queryJson) ? new Dictionary<string, object>() : input.queryJson.ToObject<Dictionary<string, object>>();
|
||||
// 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<string> 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<PADPackageTaskPageOutput> result = await _db.Queryable<PrdMoTask>()
|
||||
// .LeftJoin<BasMaterial>((a, b) => a.material_id == b.id)
|
||||
// .LeftJoin<BasProcess>((a, b, c) => a.process_id == c.id)
|
||||
// .LeftJoin<OrganizeEntity>((a, b, c, d) => a.workline_id == d.Id)
|
||||
// .LeftJoin<DictionaryDataEntity>((a, b, c, d, e) => e.DictionaryTypeId == DictConst.PrdTaskStatusTypeId && a.mo_task_status == e.EnCode)
|
||||
// .LeftJoin<EqpEquipment>((a, b, c, d, e, f) => a.eqp_id == f.id)
|
||||
// .LeftJoin<ToolMolds>((a, b, c, d, e, f, g) => a.mold_id == g.id)
|
||||
// .LeftJoin<PerProcessStandardsH>((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<BasStandardTime>((a, b, c, d, e, f, g, h, i) => a.process_id == i.process_id && i.enabled == 1)
|
||||
// .LeftJoin<PrdMo>((a, b, c, d, e, f, g, h, i, j) => a.mo_id == j.id)
|
||||
// .LeftJoin<BasMaterialUnit>((a, b, c, d, e, f, g, h, i, j, k) => a.material_id == k.material_id && k.auxiliary_unit_id == "kg")
|
||||
// .LeftJoin<EqpDaq>((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<PADPackageTaskPageOutput>.SqlSugarPageResult(result);
|
||||
//
|
||||
// }
|
||||
|
||||
/// <summary>
|
||||
/// 上模校验
|
||||
|
||||
@@ -1,31 +1,14 @@
|
||||
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
|
||||
{
|
||||
@@ -33,20 +16,14 @@ namespace Tnb.ProductionMgr
|
||||
public class RedisBackGround : IHostedService, IDisposable
|
||||
{
|
||||
private Timer? Readtimer;
|
||||
private Timer? CheckGettimer;
|
||||
private Timer? Scantimer;
|
||||
private Timer? SSXcodetimer;
|
||||
private readonly RedisData _redisData;
|
||||
private readonly IPrdInstockService _prdInstockService;
|
||||
private readonly ISqlSugarRepository<RedisReadConfig> _repository;
|
||||
private readonly IWmsPDAScanInStockService _wmsPDAScanInStock;
|
||||
private readonly ElevatorControlConfiguration _eleCtlCfg = App.Configuration.Build<ElevatorControlConfiguration>();
|
||||
public RedisBackGround(RedisData redisData, IPrdInstockService prdInstockService, ISqlSugarRepository<RedisReadConfig> repository, IWmsPDAScanInStockService wmsPDAScanInStock)
|
||||
public RedisBackGround(RedisData redisData, IPrdInstockService prdInstockService, ISqlSugarRepository<RedisReadConfig> repository)
|
||||
{
|
||||
_redisData = redisData;
|
||||
_prdInstockService = prdInstockService;
|
||||
_repository = repository;
|
||||
_wmsPDAScanInStock = wmsPDAScanInStock;
|
||||
}
|
||||
//获取redis数据
|
||||
private void GetRedisData(object state)
|
||||
@@ -124,258 +101,126 @@ namespace Tnb.ProductionMgr
|
||||
break;
|
||||
}
|
||||
}
|
||||
//ctu取货
|
||||
private void CheckGet(object state)
|
||||
{
|
||||
Dictionary<string, string[]> getdic = new Dictionary<string, string[]>();
|
||||
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)
|
||||
//获取注塑装箱状态
|
||||
private void GetZSPackStatus(object state)
|
||||
{
|
||||
try
|
||||
{
|
||||
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<JObject>(data);
|
||||
bool result = res != null && res["Value"] != null ? res.Value<bool>("Value") : false;
|
||||
if (result)
|
||||
string[] strs = new string[1] { "TY4C-ZHUSU1" };
|
||||
string sign = "agvMode";
|
||||
foreach (string s in strs)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(strs[2]))
|
||||
Dictionary<string, string> dic = _redisData.HGetAll(s).Result;
|
||||
foreach (KeyValuePair<string, string> kv in dic)
|
||||
{
|
||||
string codedata = _redisData.GetHash(strs[0], strs[2]).Result;
|
||||
JObject? coderes = JsonConvert.DeserializeObject<JObject>(codedata);
|
||||
string coderesult = coderes != null && coderes["Value"] != null ? coderes.Value<string>("Value")! : "";
|
||||
coderesult = coderesult.Replace("\r", "");
|
||||
var DistaskH = _repository.AsSugarClient().Queryable<WmsDistaskH>().Where(p => p.carry_code == coderesult && p.status == WmsWareHouseConst.TASK_BILL_STATUS_YXD_ID && string.IsNullOrEmpty(p.extras)).First();
|
||||
if (DistaskH != null)
|
||||
if (!kv.Key.Contains(sign))
|
||||
{
|
||||
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();
|
||||
}
|
||||
}
|
||||
else {
|
||||
var DistaskH = _repository.AsSugarClient().Queryable<WmsDistaskH>().Where(p => p.startlocation_code == key && 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 = 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static readonly Dictionary<LogLevel, string> s_logLevelMap = new()
|
||||
{
|
||||
[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) =>
|
||||
{
|
||||
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<string, string[]> getdic = new Dictionary<string, string[]>();
|
||||
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
|
||||
{
|
||||
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<JObject>(data);
|
||||
|
||||
|
||||
bool result = res != null && res["Value"] != null ? res.Value<bool>("Value") : false;
|
||||
if (result)
|
||||
{
|
||||
Logger.LogInformation($"八工位扫到码发送入库请求:{res}");
|
||||
|
||||
|
||||
Dictionary<string, string> dicCommand = new(StringComparer.OrdinalIgnoreCase)
|
||||
{
|
||||
["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<JObject>(codedata);
|
||||
string coderesult = coderes != null && coderes["Value"] != null ? coderes.Value<string>("Value")! : "";
|
||||
WmsCarryH? carry = _repository.AsSugarClient().Queryable<WmsCarryH>().Single(it => it.carry_code == coderesult);
|
||||
if (carry != null)
|
||||
{
|
||||
if (_repository.AsSugarClient().Queryable<WmsPretaskH>().Where(p => p.carry_id == carry.id && p.status != WmsWareHouseConst.TASK_BILL_STATUS_COMPLE_ID ).Any())
|
||||
continue;
|
||||
var WmsCarryCode = _repository.AsSugarClient().Queryable<WmsCarryCode>().Single(it => it.carry_id == carry.id);
|
||||
if (WmsCarryCode != null)
|
||||
}
|
||||
JObject? res = JsonConvert.DeserializeObject<JObject>(kv.Value);
|
||||
if (res != null && res["Value"] != null)
|
||||
{
|
||||
VisualDevModelDataCrInput input = new VisualDevModelDataCrInput();
|
||||
input.data = new Dictionary<string, object>();
|
||||
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();
|
||||
if (int.Parse(res["Value"]!.ToString()) is not ((int)Eagvmode.无请求) and not ((int)Eagvmode.收到请求))
|
||||
{
|
||||
InstockInput instockInput = new()
|
||||
{
|
||||
equip_code = res["DevName"]!.ToString(),
|
||||
label_code = res["TagName"]!.ToString()
|
||||
};
|
||||
_prdInstockService.InstockTypeOne(instockInput);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void SSXcode(object state)
|
||||
{
|
||||
Dictionary<string, string[]> dic = new Dictionary<string, string[]>();
|
||||
//有问题
|
||||
dic.Add("东面提升机输送线", new string[] { "下升降机判断请求", "下升降机判断条码", "下升降机判断完毕", "下升降机判断结果" });
|
||||
Dictionary<string, int> putdic = new Dictionary<string, int>();
|
||||
putdic.Add("SSX-111-011", 11);
|
||||
putdic.Add("SSX-111-012", 12);
|
||||
foreach (var key in dic.Keys)
|
||||
//获取挤出装箱状态
|
||||
private void GetJCPackStatus(object state)
|
||||
{
|
||||
try
|
||||
{
|
||||
var strs = dic.Where(p => p.Key == key).First().Value;
|
||||
string dataflag = _redisData.GetHash(key, strs[0]).Result;
|
||||
JObject? resflag = JsonConvert.DeserializeObject<JObject>(dataflag);
|
||||
bool re = resflag != null && resflag["Value"] != null ? resflag.Value<bool>("Value") : false;
|
||||
if (!re)
|
||||
string[] strs = new string[1] { "TY4C-SHUSONG-JC" };
|
||||
string sign = "AGVFullCall";
|
||||
foreach (string s in strs)
|
||||
{
|
||||
Dictionary<string, string> dic = _redisData.HGetAll(s).Result;
|
||||
foreach (KeyValuePair<string, string> kv in dic)
|
||||
{
|
||||
if (!kv.Key.Contains(sign))
|
||||
{
|
||||
continue;
|
||||
string data = _redisData.GetHash(key, strs[1]).Result;
|
||||
JObject? res = JsonConvert.DeserializeObject<JObject>(data);
|
||||
string? result = res != null && res["Value"] != null ? res.Value<string>("Value") : "";
|
||||
if (!string.IsNullOrEmpty(result))
|
||||
{
|
||||
if (result.Length < 5)
|
||||
{
|
||||
result = "LX" + result.Replace("\r", "");
|
||||
}
|
||||
var DistaskH = _repository.AsSugarClient().Queryable<WmsDistaskH>().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<JObject>(kv.Value);
|
||||
if (res != null && res["Value"] != null)
|
||||
{
|
||||
Dictionary<string, string> dicCommand2 = new(StringComparer.OrdinalIgnoreCase)
|
||||
if (res.Value<bool>("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",
|
||||
InstockInput instockInput = new()
|
||||
{
|
||||
equip_code = res["DevName"]!.ToString(),
|
||||
label_code = res["TagName"]!.ToString()
|
||||
};
|
||||
HttpClientHelper.GetRequestAsync(_eleCtlCfg.WriteTagUrl, dicCommand2).Wait();
|
||||
Dictionary<string, string> dicCommand = new(StringComparer.OrdinalIgnoreCase)
|
||||
{
|
||||
["DevName"] = key,
|
||||
["token"] = _eleCtlCfg.token,
|
||||
["TagName"] = strs[2],
|
||||
["Value"] = "true",
|
||||
};
|
||||
HttpClientHelper.GetRequestAsync(_eleCtlCfg.WriteTagUrl, dicCommand).Wait();
|
||||
_prdInstockService.InstockTypeOne(instockInput);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Dictionary<string, string> dicCommand2 = new(StringComparer.OrdinalIgnoreCase)
|
||||
{
|
||||
["DevName"] = key,
|
||||
["token"] = _eleCtlCfg.token,
|
||||
["TagName"] = strs[3],
|
||||
["Value"] = "13",
|
||||
};
|
||||
HttpClientHelper.GetRequestAsync(_eleCtlCfg.WriteTagUrl, dicCommand2).Wait();
|
||||
Dictionary<string, string> dicCommand = new(StringComparer.OrdinalIgnoreCase)
|
||||
{
|
||||
["DevName"] = key,
|
||||
["token"] = _eleCtlCfg.token,
|
||||
["TagName"] = strs[2],
|
||||
["Value"] = "true",
|
||||
};
|
||||
HttpClientHelper.GetRequestAsync(_eleCtlCfg.WriteTagUrl, dicCommand).Wait();
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
//获取限位状态
|
||||
private void GetLimitStatus(object state)
|
||||
{
|
||||
/*
|
||||
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
|
||||
{
|
||||
string[] strs = new string[1] { "TY4C-WAIBAO" };
|
||||
string sign = "AGVCall";
|
||||
foreach (string s in strs)
|
||||
{
|
||||
Dictionary<string, string> dic = _redisData.HGetAll(s).Result;
|
||||
foreach (KeyValuePair<string, string> kv in dic)
|
||||
{
|
||||
if (!kv.Key.Contains(sign))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
JObject? res = JsonConvert.DeserializeObject<JObject>(kv.Value);
|
||||
if (res != null && res["Value"] != null)
|
||||
{
|
||||
if (res.Value<bool>("Value"))
|
||||
{
|
||||
InstockInput instockInput = new()
|
||||
{
|
||||
equip_code = res["DevName"]!.ToString(),
|
||||
label_code = res["TagName"]!.ToString()
|
||||
};
|
||||
_prdInstockService.InstockOutPack(instockInput);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
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)
|
||||
|
||||
@@ -12,11 +12,9 @@
|
||||
<ProjectReference Include="..\..\BasicData\Tnb.BasicData.Interfaces\Tnb.BasicData.Interfaces.csproj" />
|
||||
<ProjectReference Include="..\..\EquipMgr\Tnb.EquipMgr.Interfaces\Tnb.EquipMgr.Interfaces.csproj" />
|
||||
<ProjectReference Include="..\..\message\Tnb.Message\Tnb.Message.csproj" />
|
||||
<ProjectReference Include="..\..\PerMgr\Tnb.PerMgr.Entities\Tnb.PerMgr.Entities.csproj" />
|
||||
<ProjectReference Include="..\..\QcMgr\Tnb.QcMgr.Interfaces\Tnb.QcMgr.Interfaces.csproj" />
|
||||
<ProjectReference Include="..\..\taskschedule\Tnb.TaskScheduler\Tnb.TaskScheduler.csproj" />
|
||||
<ProjectReference Include="..\..\visualdev\Tnb.VisualDev.Engine\Tnb.VisualDev.Engine.csproj" />
|
||||
<ProjectReference Include="..\..\WarehouseMgr\Tnb.WarehouseMgr.Interfaces\Tnb.WarehouseMgr.Interfaces.csproj" />
|
||||
<ProjectReference Include="..\..\WarehouseMgr\Tnb.WarehouseMgr.Entities\Tnb.WarehouseMgr.Entities.csproj" />
|
||||
<ProjectReference Include="..\Tnb.ProductionMgr.Interfaces\Tnb.ProductionMgr.Interfaces.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@@ -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<TService> : BaseWareHouseService
|
||||
{
|
||||
protected static Dictionary<string, object> s_elevatorMap = new();
|
||||
|
||||
private static readonly Lazy<Task> initializationTask;
|
||||
private static SqlSugarScope context;
|
||||
private readonly ISqlSugarClient _db;
|
||||
public static Dictionary<string, int> s_eleUseStatusDic = new();
|
||||
public static Dictionary<string, int> s_loadedStatusDic = new();
|
||||
|
||||
static DevServBase()
|
||||
{
|
||||
//initializationTask = new Lazy<Task>(InitializeAsync);
|
||||
_ = Task.Run(() => InitializeAsync());
|
||||
}
|
||||
|
||||
public DevServBase(ISqlSugarClient db)
|
||||
{
|
||||
_db = db;
|
||||
}
|
||||
|
||||
|
||||
private static async Task InitializeAsync()
|
||||
{
|
||||
|
||||
ConnectionStringsOptions connectionOpts = App.GetConfig<ConnectionStringsOptions>("ConnectionStrings", true);
|
||||
ConnectionConfig cfg = new()
|
||||
{
|
||||
ConfigId = connectionOpts.ConfigId,
|
||||
ConnectionString = connectionOpts.ConnectString,
|
||||
DbType = DbType.PostgreSQL,
|
||||
IsAutoCloseConnection = true,
|
||||
};
|
||||
context = new(cfg);
|
||||
|
||||
s_elevatorMap = await context.Queryable<WmsElevatorH>().ToDictionaryAsync(x => x.elevator_id, x => x.elevator_code);
|
||||
|
||||
}
|
||||
//public static Task InitializationTask => initializationTask.Value;
|
||||
|
||||
/// <summary>
|
||||
/// 获取电梯根据任务单号
|
||||
/// </summary>
|
||||
/// <param name="input">
|
||||
/// taskCode:子任务编号
|
||||
/// endlocation_id:目标库位ID
|
||||
/// </param>
|
||||
/// <returns></returns>
|
||||
|
||||
protected async Task<WmsElevatorH> FindElevatorFromPars(ElevagorInfoQuery input)
|
||||
{
|
||||
var whereExpable = Expressionable.Create<WmsElevatorH, WmsElevatorD, WmsDistaskH>()
|
||||
.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<WmsElevatorH>().InnerJoin<WmsElevatorD>((a, b) => a.id == b.bill_id)
|
||||
.InnerJoin<WmsDistaskH>((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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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设备接口提供程序服务类
|
||||
/// </summary>
|
||||
|
||||
public class DeviceProviderService : DevServBase<DeviceProviderService>
|
||||
public class DeviceProviderService : ServiceLoggerBase<DeviceProviderService>
|
||||
{
|
||||
private readonly ISqlSugarClient _db;
|
||||
private readonly IWareHouseService _wareHouseService;
|
||||
@@ -46,6 +45,7 @@ namespace Tnb.WarehouseMgr
|
||||
private readonly ElevatorControlConfiguration _eleCtlCfg = App.Configuration.Build<ElevatorControlConfiguration>();
|
||||
private readonly ILoggerFactory _loggerFactory;
|
||||
public static Dictionary<string, int> s_eleUseStatusDic = new();
|
||||
public static Dictionary<string, int> 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, "请重试!");
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取电梯根据任务单号
|
||||
/// </summary>
|
||||
/// <param name="input">
|
||||
/// taskCode:子任务编号
|
||||
/// endlocation_id:目标库位ID
|
||||
/// </param>
|
||||
/// <returns></returns>
|
||||
|
||||
protected async Task<WmsElevatorH> FindElevatorFromPars(ElevagorInfoQuery input)
|
||||
{
|
||||
var whereExpable = Expressionable.Create<WmsElevatorH, WmsElevatorD, WmsDistaskH>()
|
||||
.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<WmsElevatorH>().InnerJoin<WmsElevatorD>((a, b) => a.id == b.bill_id)
|
||||
.InnerJoin<WmsDistaskH>((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;
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 放货确认/申请放货
|
||||
/// </summary>
|
||||
|
||||
84
WarehouseMgr/Tnb.WarehouseMgr/ServiceLoggerBase`1.cs
Normal file
84
WarehouseMgr/Tnb.WarehouseMgr/ServiceLoggerBase`1.cs
Normal file
@@ -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<TService> : BaseWareHouseService
|
||||
{
|
||||
protected static Dictionary<string, object> s_elevatorMap = new();
|
||||
private static readonly Lazy<Task> initializationTask;
|
||||
|
||||
|
||||
static ServiceLoggerBase()
|
||||
{
|
||||
initializationTask = new Lazy<Task>(InitializeAsync);
|
||||
}
|
||||
|
||||
|
||||
|
||||
private static async Task InitializeAsync()
|
||||
{
|
||||
|
||||
ConnectionStringsOptions connectionOpts = App.GetConfig<ConnectionStringsOptions>("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<WmsElevatorH>().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<char> 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -18,6 +18,7 @@
|
||||
<ProjectReference Include="..\..\EquipMgr\Tnb.EquipMgr.Entities\Tnb.EquipMgr.Entities.csproj" />
|
||||
<ProjectReference Include="..\..\message\Tnb.Message.Interfaces\Tnb.Message.Interfaces.csproj" />
|
||||
<ProjectReference Include="..\..\ProductionMgr\Tnb.ProductionMgr.Interfaces\Tnb.ProductionMgr.Interfaces.csproj" />
|
||||
<!--<ProjectReference Include="..\..\ProductionMgr\Tnb.ProductionMgr.Interfaces\Tnb.ProductionMgr.Interfaces.csproj" />-->
|
||||
<ProjectReference Include="..\..\QcMgr\Tnb.QcMgr.Interfaces\Tnb.QcMgr.Interfaces.csproj" />
|
||||
<ProjectReference Include="..\..\visualdev\Tnb.VisualDev.Engine\Tnb.VisualDev.Engine.csproj" />
|
||||
<ProjectReference Include="..\Tnb.WarehouseMgr.Interfaces\Tnb.WarehouseMgr.Interfaces.csproj" />
|
||||
|
||||
@@ -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
|
||||
/// <summary>
|
||||
/// 库房业务类(出入库)
|
||||
/// </summary>
|
||||
public class WareHouseService : DevServBase<WareHouseService>, IWareHouseService
|
||||
public class WareHouseService : ServiceLoggerBase<WareHouseService>, IWareHouseService
|
||||
{
|
||||
private readonly ISqlSugarClient _db;
|
||||
private readonly IDictionaryDataService _dictionaryDataService;
|
||||
@@ -64,7 +63,7 @@ namespace Tnb.WarehouseMgr
|
||||
public WareHouseService(ISqlSugarRepository<WmsInstockH> 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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取电梯根据任务单号
|
||||
/// </summary>
|
||||
/// <param name="input">
|
||||
/// taskCode:子任务编号
|
||||
/// endlocation_id:目标库位ID
|
||||
/// </param>
|
||||
/// <returns></returns>
|
||||
|
||||
protected async Task<WmsElevatorH> FindElevatorFromPars(ElevagorInfoQuery input)
|
||||
{
|
||||
var whereExpable = Expressionable.Create<WmsElevatorH, WmsElevatorD, WmsDistaskH>()
|
||||
.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<WmsElevatorH>().InnerJoin<WmsElevatorD>((a, b) => a.id == b.bill_id)
|
||||
.InnerJoin<WmsDistaskH>((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
|
||||
/// <summary>
|
||||
/// 生成CTU任务执行
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace Tnb.WarehouseMgr
|
||||
/// 盘点任务
|
||||
/// </summary>
|
||||
[OverideVisualDev(ModuleConsts.MODULE_WMSCHECKTASK_ID)]
|
||||
public class WmsCheckTaskService : BaseWareHouseService
|
||||
public class WmsCheckTaskService : ServiceLoggerBase<WmsCheckTaskService>
|
||||
{
|
||||
private readonly ISqlSugarClient _db;
|
||||
private readonly IWareHouseService _warehouseService;
|
||||
|
||||
@@ -6,11 +6,11 @@ using Tnb.WarehouseMgr.Entities.Consts;
|
||||
namespace Tnb.WarehouseMgr
|
||||
{
|
||||
[OverideVisualDev(ModuleConsts.MODULE_WMSDISTASK_ID)]
|
||||
public class WmsDistaskService : TaskManagerDelBase<WmsDistaskH>
|
||||
public class WmsDistaskService : BaseWareHouseService
|
||||
{
|
||||
private readonly ISqlSugarClient _db;
|
||||
|
||||
public WmsDistaskService(ISqlSugarRepository<WmsDistaskH> repository):base(repository.AsSugarClient())
|
||||
public WmsDistaskService(ISqlSugarRepository<WmsDistaskH> repository)
|
||||
{
|
||||
_db = repository.AsSugarClient();
|
||||
OverideFuncs.DeleteAsync = Delete;
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace Tnb.WarehouseMgr
|
||||
/// </summary>
|
||||
[OverideVisualDev(ModuleConsts.MODULE_WMSOUTSTOCK_ID)]
|
||||
[ServiceModule(BizTypeId)]
|
||||
public class WmsOutStockService : DevServBase<WmsOutStockService>, IWmsOutStockService
|
||||
public class WmsOutStockService : ServiceLoggerBase<WmsOutStockService>, 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<dynamic> OutStockApplyFor(VisualDevModelDataCrInput input)
|
||||
@@ -711,7 +712,6 @@ namespace Tnb.WarehouseMgr
|
||||
List<WmsPointH> points = new List<WmsPointH>();
|
||||
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(),
|
||||
|
||||
@@ -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": {
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
@@ -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",
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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": ""
|
||||
}
|
||||
@@ -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秒
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"TestLocation": "CP-A08-47"
|
||||
}
|
||||
29
apihost/Tnb.API.Entry/Configurations/Nacos.json
Normal file
29
apihost/Tnb.API.Entry/Configurations/Nacos.json
Normal file
@@ -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": {}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"OSS": {
|
||||
"BucketName": "jnpfsoftoss",
|
||||
"BucketName": "cosmoplatoss",
|
||||
//文件存储类型(Invalid(本地),MinIo,Aliyun,QCloud,Qiniu)
|
||||
"Provider": "Invalid",
|
||||
"Endpoint": "192.168.0.60:9000",
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"Tenant": {
|
||||
"MultiTenancy": false,
|
||||
"MultiTenancyDBInterFace": "http://www.tuotong-tech.com/api/Saas/Tenant/DbContent/",
|
||||
"MultiTenancyDBInterFace": "",
|
||||
"MultiTenancyType": ""
|
||||
}
|
||||
}
|
||||
@@ -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) =>
|
||||
//{
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
|
||||
@@ -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<CacheOptions>();
|
||||
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<TimedTaskBackgroundService>();
|
||||
services.AddSingleton<BackgroundService, TimedTaskBackgroundService>(sp => new TimedTaskBackgroundService());
|
||||
//services.AddHostedService<TimedTaskBackgroundService>();
|
||||
//services.AddSingleton<BackgroundService, TimedTaskBackgroundService>(sp => new TimedTaskBackgroundService());
|
||||
//var bgSvc = App.GetRequiredService<BackgroundService>();
|
||||
//bgSvc.StartAsync(CancellationToken.None);
|
||||
services.AddHostedService<RedisBackGround>();
|
||||
//services.AddHostedService<RedisBackGround>();
|
||||
|
||||
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<bool>("IsStartTimeJob");
|
||||
if (isStartTimeJob)
|
||||
|
||||
@@ -44,9 +44,7 @@
|
||||
<ProjectReference Include="..\..\BasicData\Tnb.BasicData\Tnb.BasicData.csproj" />
|
||||
<ProjectReference Include="..\..\EquipMgr\Tnb.EquipMgr\Tnb.EquipMgr.csproj" />
|
||||
<ProjectReference Include="..\..\message\Tnb.Message\Tnb.Message.csproj" />
|
||||
<ProjectReference Include="..\..\PerMgr\Tnb.PerMgr\Tnb.PerMgr.csproj" />
|
||||
<ProjectReference Include="..\..\ProductionMgr\Tnb.ProductionMgr\Tnb.ProductionMgr.csproj" />
|
||||
<ProjectReference Include="..\..\QcMgr\Tnb.QcMgr\Tnb.QcMgr.csproj" />
|
||||
<ProjectReference Include="..\..\system\Tnb.OAuth\Tnb.OAuth.csproj" />
|
||||
<ProjectReference Include="..\..\system\Tnb.Systems\Tnb.Systems.csproj" />
|
||||
<ProjectReference Include="..\..\taskschedule\Tnb.TaskScheduler\Tnb.TaskScheduler.csproj" />
|
||||
|
||||
@@ -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个数
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -1,11 +1,5 @@
|
||||
////////////////////////////////////////////////////
|
||||
// 本文件由拓通低代码开发平台自动生成,请不要修改 //
|
||||
// ________ ___ ________ //
|
||||
// /__ __/ / \ /__ __/ //
|
||||
// / / / / / / //
|
||||
// / / / / / / //
|
||||
// /__/ \___/ /__/ //
|
||||
// //
|
||||
// 本文件由卡奥斯低代码开发平台自动生成,请不要修改 //
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
@using Tnb.Core;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -1,11 +1,5 @@
|
||||
////////////////////////////////////////////////////
|
||||
// 本文件由拓通低代码开发平台自动生成,请不要修改 //
|
||||
// ________ ___ ________ //
|
||||
// /__ __/ / \ /__ __/ //
|
||||
// / / / / / / //
|
||||
// / / / / / / //
|
||||
// /__/ \___/ /__/ //
|
||||
// //
|
||||
// 本文件由卡奥斯低代码开发平台自动生成,请不要修改 //
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
@using JNPF.Common.Extension;
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace JNPF.Apps.Entitys;
|
||||
/// <summary>
|
||||
/// App常用数据
|
||||
/// 版 本:V3.2
|
||||
/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com)
|
||||
|
||||
/// 日 期:2021-06-01.
|
||||
/// </summary>
|
||||
[SugarTable("BASE_APPDATA")]
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace JNPF.Apps.Interfaces;
|
||||
/// <summary>
|
||||
/// App常用数据
|
||||
/// 版 本:V3.2
|
||||
/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com)
|
||||
|
||||
/// 日 期:2021-06-01 .
|
||||
/// </summary>
|
||||
public interface IAppDataService
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace JNPF.Apps;
|
||||
/// <summary>
|
||||
/// App常用数据
|
||||
/// 版 本:V3.2
|
||||
/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com)
|
||||
|
||||
/// 日 期:2021-06-01 .
|
||||
/// </summary>
|
||||
[ApiDescriptionSettings(Tag = "App", Name = "Data", Order = 800)]
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace JNPF.Apps;
|
||||
/// <summary>
|
||||
/// App菜单
|
||||
/// 版 本:V3.2
|
||||
/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com)
|
||||
|
||||
/// 日 期:2021-06-01 .
|
||||
/// </summary>
|
||||
[ApiDescriptionSettings(Tag = "App", Name = "Menu", Order = 800)]
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace JNPF.Apps;
|
||||
/// <summary>
|
||||
/// App用户信息
|
||||
/// 版 本:V3.2
|
||||
/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com)
|
||||
|
||||
/// 日 期:2021-06-01.
|
||||
/// </summary>
|
||||
[ApiDescriptionSettings(Tag = "App", Name = "User", Order = 800)]
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace JNPF.Apps;
|
||||
/// <summary>
|
||||
/// App版本信息
|
||||
/// 版 本:V3.3
|
||||
/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com)
|
||||
|
||||
/// 日 期:2022-04-07.
|
||||
/// </summary>
|
||||
[ApiDescriptionSettings(Tag = "App", Name = "Version", Order = 806)]
|
||||
|
||||
@@ -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<VisualDevEntity>().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();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -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())
|
||||
}));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,3 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
// 宁波拓通e智造平台 ToTong Next Builder //
|
||||
// https://git.tuotong-tech.com/tnb/tnb.server //
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
using JNPF.Common.Contracts;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace JNPF.Common.Models
|
||||
/// <summary>
|
||||
/// 附件模型
|
||||
/// 版 本:V3.3.3
|
||||
/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com)
|
||||
|
||||
/// 作 者:JNPF开发平台组.
|
||||
/// </summary>
|
||||
[SuppressSniffer]
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace JNPF.Common.Models;
|
||||
/// <summary>
|
||||
/// 文件分片模型
|
||||
/// 版 本:V3.3.3
|
||||
/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com)
|
||||
|
||||
/// 作 者:JNPF开发平台组.
|
||||
/// </summary>
|
||||
[SuppressSniffer]
|
||||
|
||||
@@ -6,8 +6,6 @@ namespace JNPF.Common.Models.NPOI;
|
||||
/// <summary>
|
||||
/// Excel导出列名
|
||||
/// 版 本:V3.0.0
|
||||
/// 版 权:引迈信息技术有限公司(https://www.jnpfsoft.com)
|
||||
/// 作 者:JNPF开发平台组
|
||||
/// 日 期:2017.03.09.
|
||||
/// </summary>
|
||||
[SuppressSniffer]
|
||||
|
||||
@@ -6,8 +6,6 @@ namespace JNPF.Common.Models.NPOI;
|
||||
/// <summary>
|
||||
/// Excel导出配置
|
||||
/// 版 本:V3.0.0
|
||||
/// 版 权:引迈信息技术有限公司(https://www.jnpfsoft.com)
|
||||
/// 作 者:JNPF开发平台组
|
||||
/// 日 期:2017.03.09.
|
||||
/// </summary>
|
||||
[SuppressSniffer]
|
||||
|
||||
@@ -5,8 +5,6 @@ namespace JNPF.Common.Models.NPOI;
|
||||
/// <summary>
|
||||
/// Excel导出模板
|
||||
/// 版 本:V3.0.0
|
||||
/// 版 权:引迈信息技术有限公司(https://www.jnpfsoft.com)
|
||||
/// 作 者:JNPF开发平台组
|
||||
/// 日 期:2017.03.09.
|
||||
/// </summary>
|
||||
[SuppressSniffer]
|
||||
|
||||
@@ -5,8 +5,6 @@ namespace JNPF.Common.Models.User
|
||||
/// <summary>
|
||||
/// 登录者信息
|
||||
/// 版 本:V3.2.0
|
||||
/// 版 权:引迈信息技术有限公司(https://www.jnpfsoft.com)
|
||||
/// 作 者:JNPF开发平台组.
|
||||
/// </summary>
|
||||
[SuppressSniffer]
|
||||
public class UserInfoModel
|
||||
|
||||
@@ -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 ? "例:研发人员/角色编码,测试人员/角色编码" : "例:研发人员/角色编码");
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace JNPF.Common.Security;
|
||||
/// <summary>
|
||||
/// Excel导出操作类
|
||||
/// 版 本:V3.2.0
|
||||
/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com)
|
||||
|
||||
/// 日 期:2017.03.09.
|
||||
/// </summary>
|
||||
[SuppressSniffer]
|
||||
@@ -226,16 +226,16 @@ public class ExcelExportHelper<T>
|
||||
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<T>
|
||||
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<T>
|
||||
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 = "标题信息";
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace JNPF.Common.Helper
|
||||
/// <summary>
|
||||
/// Excel导入操作类
|
||||
/// 版 本:V3.2.0
|
||||
/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com)
|
||||
|
||||
/// 日 期:2017.03.12.
|
||||
/// </summary>
|
||||
[SuppressSniffer]
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace JNPF.Common.Security;
|
||||
/// <summary>
|
||||
/// FileHelper
|
||||
/// 版 本:V3.2.0
|
||||
/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com)
|
||||
|
||||
/// 作 者:JNPF开发平台组.
|
||||
/// </summary>
|
||||
[SuppressSniffer]
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace JNPF.Common.Security;
|
||||
/// <summary>
|
||||
/// JsonHelper
|
||||
/// 版 本:V3.4.2
|
||||
/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com)
|
||||
|
||||
/// 作 者:JNPF开发平台组.
|
||||
/// </summary>
|
||||
public static class JsonHelper
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace JNPF.Common.Security;
|
||||
/// <summary>
|
||||
/// 网络操作
|
||||
/// 版 本:V3.0.0
|
||||
/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com)
|
||||
|
||||
/// 作 者:JNPF开发平台组.
|
||||
/// </summary>
|
||||
[SuppressSniffer]
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace JNPF.Common.Security;
|
||||
/// <summary>
|
||||
/// 汉字转换拼音
|
||||
/// 版 本:V3.2.0
|
||||
/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com)
|
||||
|
||||
/// 作 者:JNPF开发平台组.
|
||||
/// </summary>
|
||||
[SuppressSniffer]
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace JNPF.Common.Security;
|
||||
/// <summary>
|
||||
/// 树形结构查询
|
||||
/// 版 本:V3.2.0
|
||||
/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com)
|
||||
|
||||
/// 作 者:JNPF开发平台组.
|
||||
/// </summary>
|
||||
[SuppressSniffer]
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
// 宁波拓通e智造平台 ToTong Next Builder //
|
||||
// https://git.tuotong-tech.com/tnb/tnb.server //
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace Mapster;
|
||||
|
||||
@@ -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) =>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<!--<VersionSuffix>$([System.DateTime]::Now.Year).$([System.DateTime]::Now.Month).$([System.DateTime]::Now.Day).$([System.DateTime]::Now.ToString(HHmm))</VersionSuffix>
|
||||
<AssemblyVersion>$(VersionSuffix)</AssemblyVersion>
|
||||
<Version>$(VersionSuffix)</Version>-->
|
||||
<Authors>ToTong</Authors>
|
||||
<Authors>cosmoplat</Authors>
|
||||
<Description>TNB 数据库访问器 SqlSugar 插件</Description>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<NoWarn>$(NoWarn);CS1591;</NoWarn>
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace JNPF.Message.Entitys.Dto.IM;
|
||||
/// <summary>
|
||||
/// 在线用户
|
||||
/// 版 本:V3.2.0
|
||||
/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com)
|
||||
|
||||
/// 日 期:2017.09.20.
|
||||
/// </summary>
|
||||
[SuppressSniffer]
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace JNPF.Message.Entitys;
|
||||
/// <summary>
|
||||
/// 在线聊天
|
||||
/// 版 本:V3.2
|
||||
/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com)
|
||||
|
||||
/// 日 期:2021-06-01.
|
||||
/// </summary>
|
||||
[SugarTable("BASE_IMCONTENT")]
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace JNPF.Message.Entitys.Entity;
|
||||
/// <summary>
|
||||
/// 消息账号配置
|
||||
/// 版 本:V3.2
|
||||
/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com)
|
||||
|
||||
/// 日 期:2021-06-01.
|
||||
/// </summary>
|
||||
[SugarTable("BASE_MESSAGE_ACCOUNT_CONFIG")]
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace JNPF.Message.Entitys.Entity;
|
||||
/// <summary>
|
||||
/// 消息字典配置
|
||||
/// 版 本:V3.2
|
||||
/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com)
|
||||
|
||||
/// 日 期:2021-06-01.
|
||||
/// </summary>
|
||||
[SugarTable("BASE_MESSAGE_DATA_TYPE")]
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace JNPF.Message.Entitys;
|
||||
/// <summary>
|
||||
/// 消息实例
|
||||
/// 版 本:V3.2
|
||||
/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com)
|
||||
|
||||
/// 日 期:2021-06-01.
|
||||
/// </summary>
|
||||
[SugarTable("BASE_MESSAGE")]
|
||||
|
||||
@@ -6,7 +6,6 @@ namespace JNPF.Message.Entitys.Entity;
|
||||
/// <summary>
|
||||
/// 消息监控
|
||||
/// 版 本:V3.2
|
||||
/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com)
|
||||
/// 日 期:2021-06-01.
|
||||
/// </summary>
|
||||
[SugarTable("BASE_MESSAGE_MONITOR")]
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace JNPF.Message.Entitys;
|
||||
/// <summary>
|
||||
/// 消息接收
|
||||
/// 版 本:V3.2
|
||||
/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com)
|
||||
|
||||
/// 日 期:2021-06-01.
|
||||
/// </summary>
|
||||
[SugarTable("BASE_MESSAGERECEIVE")]
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace JNPF.Message.Entitys.Entity;
|
||||
/// <summary>
|
||||
/// 消息发送配置
|
||||
/// 版 本:V3.2
|
||||
/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com)
|
||||
|
||||
/// 日 期:2021-06-01.
|
||||
/// </summary>
|
||||
[SugarTable("BASE_MESSAGE_SEND_CONFIG")]
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace JNPF.Message.Entitys.Entity;
|
||||
/// <summary>
|
||||
/// 消息发送记录配置
|
||||
/// 版 本:V3.2
|
||||
/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com)
|
||||
|
||||
/// 日 期:2021-06-01.
|
||||
/// </summary>
|
||||
[SugarTable("BASE_MESSAGE_SEND_RECORD")]
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace JNPF.Message.Entitys.Entity;
|
||||
/// <summary>
|
||||
/// 消息发送模板配置
|
||||
/// 版 本:V3.2
|
||||
/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com)
|
||||
|
||||
/// 日 期:2021-06-01.
|
||||
/// </summary>
|
||||
[SugarTable("BASE_MESSAGE_SEND_TEMPLATE")]
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace JNPF.Message.Entitys.Entity;
|
||||
/// <summary>
|
||||
/// 消息连接
|
||||
/// 版 本:V3.2
|
||||
/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com)
|
||||
|
||||
/// 日 期:2021-06-01.
|
||||
/// </summary>
|
||||
[SugarTable("BASE_MESSAGE_SHORT_LINK")]
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace JNPF.Message.Entitys.Entity;
|
||||
/// <summary>
|
||||
/// 短信变量
|
||||
/// 版 本:V3.2
|
||||
/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com)
|
||||
|
||||
/// 日 期:2021-06-01.
|
||||
/// </summary>
|
||||
[SugarTable("BASE_MESSAGE_SMS_FIELD")]
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace JNPF.Message.Entitys.Entity;
|
||||
/// <summary>
|
||||
/// 消息模板配置
|
||||
/// 版 本:V3.2
|
||||
/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com)
|
||||
|
||||
/// 日 期:2021-06-01.
|
||||
/// </summary>
|
||||
[SugarTable("BASE_MESSAGE_TEMPLATE_CONFIG")]
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace JNPF.Message.Entitys.Entity;
|
||||
/// <summary>
|
||||
/// 消息模板参数
|
||||
/// 版 本:V3.2
|
||||
/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com)
|
||||
|
||||
/// 日 期:2021-06-01.
|
||||
/// </summary>
|
||||
[SugarTable("BASE_MESSAGE_TEMPLATE_PARAM")]
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace JNPF.Message.Entitys.Entity;
|
||||
/// <summary>
|
||||
/// 微信公众号用户
|
||||
/// 版 本:V3.2
|
||||
/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com)
|
||||
|
||||
/// 日 期:2021-06-01.
|
||||
/// </summary>
|
||||
[SugarTable("BASE_MESSAGE_WECHAT_USER")]
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace JNPF.Message.Entitys.Entity;
|
||||
/// <summary>
|
||||
/// 个推用户表.
|
||||
/// 版 本:V3.2
|
||||
/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com)
|
||||
|
||||
/// 日 期:2021-06-01.
|
||||
/// </summary>
|
||||
[SugarTable("BASE_USER_DEVICE")]
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/// <summary>
|
||||
/// 系统消息
|
||||
/// 版 本:V3.2
|
||||
/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com)
|
||||
|
||||
/// 日 期:2021-06-01.
|
||||
/// </summary>
|
||||
public interface IMessageService
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace JNPF.Message.Interfaces.Message;
|
||||
/// <summary>
|
||||
/// 系统消息
|
||||
/// 版 本:V3.2
|
||||
/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com)
|
||||
|
||||
/// 日 期:2021-06-01.
|
||||
/// </summary>
|
||||
public interface IShortLinkService
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace JNPF.Message.Service;
|
||||
/// <summary>
|
||||
/// 消息账号
|
||||
/// 版 本:V3.2
|
||||
/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com)
|
||||
|
||||
/// 日 期:2021-06-01.
|
||||
/// </summary>
|
||||
[ApiDescriptionSettings(Tag = "Message", Name = "AccountConfig", Order = 240)]
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace JNPF.Message.Service;
|
||||
/// <summary>
|
||||
/// 消息账号
|
||||
/// 版 本:V3.2
|
||||
/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com)
|
||||
|
||||
/// 日 期:2021-06-01.
|
||||
/// </summary>
|
||||
[ApiDescriptionSettings(Tag = "Message", Name = "MessageDataType", Order = 240)]
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace JNPF.Message.Service;
|
||||
/// <summary>
|
||||
/// 消息监控
|
||||
/// 版 本:V3.2
|
||||
/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com)
|
||||
|
||||
/// 日 期:2021-06-01.
|
||||
/// </summary>
|
||||
[ApiDescriptionSettings(Tag = "Message", Name = "MessageMonitor", Order = 240)]
|
||||
|
||||
@@ -26,8 +26,6 @@ namespace JNPF.Message;
|
||||
/// <summary>
|
||||
/// 系统消息
|
||||
/// 版 本:V3.2
|
||||
/// 版 权:引迈信息技术有限公司(https://www.jnpfsoft.com)
|
||||
/// 作 者:JNPF开发平台组
|
||||
/// 日 期:2021-06-01.
|
||||
/// </summary>
|
||||
[ApiDescriptionSettings(Tag = "Message", Name = "message", Order = 240)]
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace JNPF.Message.Service;
|
||||
/// <summary>
|
||||
/// 消息监控
|
||||
/// 版 本:V3.2
|
||||
/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com)
|
||||
|
||||
/// 日 期:2021-06-01.
|
||||
/// </summary>
|
||||
[ApiDescriptionSettings(Tag = "Message", Name = "MessageTemplate", Order = 240)]
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace JNPF.Message.Service;
|
||||
/// <summary>
|
||||
/// 发送配置
|
||||
/// 版 本:V3.2
|
||||
/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com)
|
||||
|
||||
/// 日 期:2021-06-01.
|
||||
/// </summary>
|
||||
[ApiDescriptionSettings(Tag = "Message", Name = "SendMessage", Order = 240)]
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace JNPF.Message.Service;
|
||||
/// <summary>
|
||||
/// 公众号.
|
||||
/// 版 本:V3.2
|
||||
/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com)
|
||||
|
||||
/// 日 期:2021-06-01.
|
||||
/// </summary>
|
||||
[ApiDescriptionSettings(Tag = "Message", Name = "ShortLink", Order = 240)]
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace JNPF.Message.Service;
|
||||
/// <summary>
|
||||
/// 公众号.
|
||||
/// 版 本:V3.2
|
||||
/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com)
|
||||
|
||||
/// 日 期:2021-06-01.
|
||||
/// </summary>
|
||||
[ApiDescriptionSettings(Tag = "Message", Name = "WechatOpen", Order = 240)]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
@host=http://localhost:9231
|
||||
//@host=http://api.tuotong-tech.com
|
||||
//@host=http://api.cosmoplat-tech.com
|
||||
|
||||
### 用户登录
|
||||
# @name login
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace JNPF.Systems.Entitys.Permission;
|
||||
/// <summary>
|
||||
/// 模块列表权限
|
||||
/// 版 本:V3.3
|
||||
/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com)
|
||||
|
||||
/// 日 期:2022-03-15.
|
||||
/// </summary>
|
||||
[SugarTable("BASE_COLUMNSPURVIEW")]
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace JNPF.Systems.Entitys.Permission;
|
||||
/// <summary>
|
||||
/// 分级管理
|
||||
/// 版 本:V3.2.0
|
||||
/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com)
|
||||
|
||||
/// 日 期:2021.09.27.
|
||||
/// </summary>
|
||||
[SugarTable("BASE_ORGANIZEADMINISTRATOR")]
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace JNPF.Systems.Entitys.Permission;
|
||||
/// <summary>
|
||||
/// 机构管理
|
||||
/// 版 本:V3.0.0
|
||||
/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com)
|
||||
|
||||
/// 日 期:2017.09.20.
|
||||
/// </summary>
|
||||
[SugarTable("BASE_ORGANIZE")]
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace JNPF.Systems.Entitys.System;
|
||||
/// <summary>
|
||||
/// 高级查询方案
|
||||
/// 版 本:V3.4
|
||||
/// 版 权:拓通智联科技有限公司(http://www.tuotong-tech.com)
|
||||
|
||||
/// 日 期:2022-06-06.
|
||||
/// </summary>
|
||||
[SugarTable("BASE_ADVANCEDQUERYSCHEME")]
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user