新增生产工单排产功能接口
This commit is contained in:
7
Tnb.ProductionPlanMgr.Entitys/Class1.cs
Normal file
7
Tnb.ProductionPlanMgr.Entitys/Class1.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
namespace Tnb.ProductionPlanMgr.Entitys
|
||||
{
|
||||
public class Class1
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Tnb.ProductionPlanMgr.Entitys.Dto.WorkOrder
|
||||
{
|
||||
/// <summary>
|
||||
/// 生产工单下发输入参数
|
||||
/// </summary>
|
||||
public class WorkOrderIssueCrInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 生产工单Id列表
|
||||
/// </summary>
|
||||
public List<string> WorkOrderIds { get; set; }
|
||||
}
|
||||
}
|
||||
239
Tnb.ProductionPlanMgr.Entitys/Entity/PrdMoEntity.cs
Normal file
239
Tnb.ProductionPlanMgr.Entitys/Entity/PrdMoEntity.cs
Normal file
@@ -0,0 +1,239 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using SqlSugar;
|
||||
using Tnb.Common.Contracts;
|
||||
|
||||
namespace Tnb.ProductionPlanMgr.Entitys.Entity
|
||||
{
|
||||
/// <summary>
|
||||
/// MES生产工单
|
||||
///</summary>
|
||||
[SugarTable("prd_mo")]
|
||||
public class PrdMoEntity : BaseEntity<string>
|
||||
{
|
||||
/// <summary>
|
||||
/// 租户ID
|
||||
/// 默认值: NULL::character varying
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "tenant_id")]
|
||||
public string TenantId { get; set; }
|
||||
/// <summary>
|
||||
/// 所属组织ID
|
||||
/// 默认值: NULL::character varying
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "org_id")]
|
||||
public string OrgId { get; set; }
|
||||
/// <summary>
|
||||
/// 工单代码
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "mo_code")]
|
||||
public string MoCode { get; set; }
|
||||
/// <summary>
|
||||
/// 产品代码, BAS_MATERIA.MATERIALCODE BAS_ITEM.ITEMCODE
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "item_code")]
|
||||
public string ItemCode { get; set; }
|
||||
/// <summary>
|
||||
/// 产品附属信息
|
||||
/// 默认值: NULL::character varying
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "item_attribute")]
|
||||
public string ItemAttribute { get; set; }
|
||||
/// <summary>
|
||||
/// 工单类型:1-正常工单、2-返工工单、3-试制工单
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "mo_type")]
|
||||
public string MoType { get; set; }
|
||||
/// <summary>
|
||||
/// 生产状态 Initial: 初始, Confirm:确认 Release: 下发, Open: 生产中, Close: 关单, Pending: 暂停
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "mo_status")]
|
||||
public string MoStatus { get; set; }
|
||||
/// <summary>
|
||||
/// 生产数量
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "plan_qty")]
|
||||
public decimal PlanQty { get; set; }
|
||||
/// <summary>
|
||||
/// 已投入数量
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "input_qty")]
|
||||
public decimal? InputQty { get; set; }
|
||||
/// <summary>
|
||||
/// 已完工数量
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "complete_qty")]
|
||||
public decimal? CompleteQty { get; set; }
|
||||
/// <summary>
|
||||
/// 报废数量
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "scrap_qty")]
|
||||
public decimal? ScrapQty { get; set; }
|
||||
/// <summary>
|
||||
/// 计划开始时间
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "plan_start_date")]
|
||||
public DateTime PlanStartDate { get; set; }
|
||||
/// <summary>
|
||||
/// 计划结束时间
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "plan_end_date")]
|
||||
public DateTime PlanEndDate { get; set; }
|
||||
/// <summary>
|
||||
/// 实际开工日期
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "act_start_date")]
|
||||
public DateTime? ActStartDate { get; set; }
|
||||
/// <summary>
|
||||
/// 实际完工日期
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "act_end_date")]
|
||||
public DateTime? ActEndDate { get; set; }
|
||||
/// <summary>
|
||||
/// 生产部门ID
|
||||
/// 默认值: NULL::character varying
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "dept_id")]
|
||||
public string DeptId { get; set; }
|
||||
/// <summary>
|
||||
/// 客户代码
|
||||
/// 默认值: NULL::character varying
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "customer_code")]
|
||||
public string CustomerCode { get; set; }
|
||||
/// <summary>
|
||||
/// 订单号
|
||||
/// 默认值: NULL::character varying
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "order_no")]
|
||||
public string OrderNo { get; set; }
|
||||
/// <summary>
|
||||
/// 订单行号
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "order_seq")]
|
||||
public int? OrderSeq { get; set; }
|
||||
/// <summary>
|
||||
/// BOM版本
|
||||
/// 默认值: NULL::character varying
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "bom_version")]
|
||||
public string BomVersion { get; set; }
|
||||
/// <summary>
|
||||
/// 关联比例
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "relation_ratio")]
|
||||
public decimal? RelationRatio { get; set; }
|
||||
/// <summary>
|
||||
/// 下发人员ID
|
||||
/// 默认值: NULL::character varying
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "mo_down_user_id")]
|
||||
public string MoDownUserId { get; set; }
|
||||
/// <summary>
|
||||
/// 下发人员名称
|
||||
/// 默认值: NULL::character varying
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "mo_down_user_name")]
|
||||
public string MoDownUserName { get; set; }
|
||||
/// <summary>
|
||||
/// 下发日期
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "mo_down_date")]
|
||||
public DateTime? MoDownDate { get; set; }
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// 默认值: NULL::character varying
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "remark")]
|
||||
public string Remark { get; set; }
|
||||
/// <summary>
|
||||
/// 工作中心代码
|
||||
/// 默认值: NULL::character varying
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "work_center_code")]
|
||||
public string WorkCenterCode { get; set; }
|
||||
/// <summary>
|
||||
/// 主工单代码
|
||||
/// 默认值: NULL::character varying
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "parent_mo_code")]
|
||||
public string ParentMoCode { get; set; }
|
||||
/// <summary>
|
||||
/// 排程开始时间
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "seduling_start_date")]
|
||||
public DateTime? SedulingStartDate { get; set; }
|
||||
/// <summary>
|
||||
/// 排程结束时间
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "seduling_end_date")]
|
||||
public DateTime? SedulingEndDate { get; set; }
|
||||
/// <summary>
|
||||
/// 是否生派工单
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "is_create_dispatch")]
|
||||
public int? IsCreateDispatch { get; set; }
|
||||
/// <summary>
|
||||
/// 子工单序号(1开始,最大+1,不强制连续)
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "seq")]
|
||||
public int? Seq { get; set; }
|
||||
/// <summary>
|
||||
/// 数据来源 10-计划,20-插入,30-导入
|
||||
/// 默认值: NULL::character varying
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "data_sources")]
|
||||
public string DataSources { get; set; }
|
||||
/// <summary>
|
||||
/// 产线代码
|
||||
/// 默认值: NULL::character varying
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "production_linecode")]
|
||||
public string ProductionLinecode { get; set; }
|
||||
/// <summary>
|
||||
/// ismerge
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "is_merge")]
|
||||
public int? IsMerge { get; set; }
|
||||
/// <summary>
|
||||
/// 组合工单
|
||||
/// 默认值: NULL::character varying
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "combine_mo_code")]
|
||||
public string CombineMoCode { get; set; }
|
||||
/// <summary>
|
||||
/// 时间戳
|
||||
/// 默认值: NULL::character varying
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "time_stamp")]
|
||||
public string TimeStamp { get; set; }
|
||||
/// <summary>
|
||||
/// 创建用户
|
||||
/// 默认值: NULL::character varying
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "create_id")]
|
||||
public string CreateId { get; set; }
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "create_time")]
|
||||
public DateTime? CreateTime { get; set; }
|
||||
/// <summary>
|
||||
/// 修改用户
|
||||
/// 默认值: NULL::character varying
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "modify_id")]
|
||||
public string ModifyId { get; set; }
|
||||
/// <summary>
|
||||
/// 修改时间
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "modify_time")]
|
||||
public DateTime? ModifyTime { get; set; }
|
||||
/// <summary>
|
||||
/// 扩展字段
|
||||
///</summary>
|
||||
[SugarColumn(ColumnName = "extras")]
|
||||
public string Extras { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<GenerateDocumentationFile>True</GenerateDocumentationFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\common\Tnb.Common\Tnb.Common.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
12
Tnb.ProductionPlanMgr.Interfaces/IWorkOrderCreateService.cs
Normal file
12
Tnb.ProductionPlanMgr.Interfaces/IWorkOrderCreateService.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using Tnb.ProductionPlanMgr.Entitys.Dto.WorkOrder;
|
||||
|
||||
namespace Tnb.ProductionPlanMgr.Interfaces
|
||||
{
|
||||
/// <summary>
|
||||
/// 工单生成
|
||||
/// </summary>
|
||||
public interface IWorkOrderCreateService
|
||||
{
|
||||
Task<dynamic> WorkOrderIssue(WorkOrderIssueCrInput input);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<GenerateDocumentationFile>True</GenerateDocumentationFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Tnb.ProductionPlanMgr.Entitys\Tnb.ProductionPlanMgr.Entitys.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
17
Tnb.ProductionPlanMgr/Tnb.ProductionPlanMgr.csproj
Normal file
17
Tnb.ProductionPlanMgr/Tnb.ProductionPlanMgr.csproj
Normal file
@@ -0,0 +1,17 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<GenerateDocumentationFile>True</GenerateDocumentationFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\common\Tnb.Common.Core\Tnb.Common.Core.csproj" />
|
||||
<ProjectReference Include="..\common\Tnb.Common\Tnb.Common.csproj" />
|
||||
<ProjectReference Include="..\Tnb.ProductionPlanMgr.Entitys\Tnb.ProductionPlanMgr.Entitys.csproj" />
|
||||
<ProjectReference Include="..\Tnb.ProductionPlanMgr.Interfaces\Tnb.ProductionPlanMgr.Interfaces.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
50
Tnb.ProductionPlanMgr/WorkOrderCreateService.cs
Normal file
50
Tnb.ProductionPlanMgr/WorkOrderCreateService.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
using JNPF.Common.Core.Manager;
|
||||
using JNPF.DependencyInjection;
|
||||
using JNPF.DynamicApiController;
|
||||
using JNPF.Systems.Entitys.System;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using NPOI.OpenXmlFormats.Shared;
|
||||
using SqlSugar;
|
||||
using Tnb.ProductionPlanMgr.Entitys.Dto.WorkOrder;
|
||||
using Tnb.ProductionPlanMgr.Entitys.Entity;
|
||||
using Tnb.ProductionPlanMgr.Interfaces;
|
||||
|
||||
namespace Tnb.ProductionPlanMgr
|
||||
{
|
||||
/// <summary>
|
||||
/// 生产计划管理
|
||||
/// </summary>
|
||||
[ApiDescriptionSettings(Tag = "ProductPlanMgr", Name = "WorkOrderCreate", Order = 700)]
|
||||
[Route("api/production/[controller]")]
|
||||
public class WorkOrderCreateService :IWorkOrderCreateService,IDynamicApiController, ITransient
|
||||
{
|
||||
private readonly ISqlSugarRepository<PrdMoEntity> _repository;
|
||||
private readonly IDataBaseManager _dataBaseManager;
|
||||
public WorkOrderCreateService(ISqlSugarRepository<PrdMoEntity> repository, IDataBaseManager dataBaseManager)
|
||||
{
|
||||
_repository = repository;
|
||||
_dataBaseManager = dataBaseManager;
|
||||
}
|
||||
/// <summary>
|
||||
/// 生产工单创建-生产工单下发
|
||||
/// </summary>
|
||||
/// <param name="input">生产工单下发输入参数</param>
|
||||
/// <returns></returns>
|
||||
[HttpPut("workorder-issue")]
|
||||
public async Task<dynamic> WorkOrderIssue(WorkOrderIssueCrInput input)
|
||||
{
|
||||
if (input is null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(input));
|
||||
}
|
||||
var link = await _repository.AsSugarClient().Queryable<DbLinkEntity>().FirstAsync(x => x.FullName == "tnb_mes");
|
||||
var db = _dataBaseManager.ChangeDataBase(link);
|
||||
var row = await db.Updateable<PrdMoEntity>()
|
||||
.SetColumns(it => new PrdMoEntity { MoStatus = "25019232867093" })
|
||||
.Where(it => input.WorkOrderIds.Contains(it.Id))
|
||||
.ExecuteCommandAsync();
|
||||
return (row > 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
23
Tnb.ProductionPlanMgr/WorkOrderSchedulingService.cs
Normal file
23
Tnb.ProductionPlanMgr/WorkOrderSchedulingService.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Aspose.Cells;
|
||||
using JNPF.DependencyInjection;
|
||||
using JNPF.DynamicApiController;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace Tnb.ProductionPlanMgr
|
||||
{
|
||||
[ApiDescriptionSettings(Tag = "ProductPlanMgr", Name = "WorkOrderScheduling", Order = 700)]
|
||||
[Route("api/production/[controller]")]
|
||||
public class WorkOrderSchedulingService: IDynamicApiController, ITransient
|
||||
{
|
||||
|
||||
public WorkOrderSchedulingService()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
27
Tnb.ProductionPlanMgr/internals/BaseService.cs
Normal file
27
Tnb.ProductionPlanMgr/internals/BaseService.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using JNPF;
|
||||
using JNPF.Common.Core.Manager;
|
||||
using JNPF.DependencyInjection;
|
||||
using JNPF.Systems.Entitys.System;
|
||||
using SqlSugar;
|
||||
|
||||
namespace Tnb.ProductionPlanMgr.internals
|
||||
{
|
||||
public class BaseService : ITransient
|
||||
{
|
||||
private readonly Dictionary<string, ISqlSugarClient> _dbContextDic = new(StringComparer.OrdinalIgnoreCase);
|
||||
static BaseService()
|
||||
{
|
||||
var repo = App.GetService<ISqlSugarRepository<DbLinkEntity>>();
|
||||
var = await repo.GetListAsync();
|
||||
var dbMgr = App.GetService<IDataBaseManager>();
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -91,11 +91,19 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tnb.SqlSugar", "common\Tnb.
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "09-BasicData", "09-BasicData", "{52B19E13-6B04-444C-A38A-B9955B199A98}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tnb.BasicData.Entitys", "Tnb.BasicData.Entitys\Tnb.BasicData.Entitys.csproj", "{1E09E797-7DFF-49B1-ABB8-290660DB4451}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tnb.BasicData.Entitys", "Tnb.BasicData.Entitys\Tnb.BasicData.Entitys.csproj", "{1E09E797-7DFF-49B1-ABB8-290660DB4451}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tnb.BasicData.Interfaces", "Tnb.BasicData.Interfaces\Tnb.BasicData.Interfaces.csproj", "{12A5A0D3-C608-46AB-AC4C-5D5EF729AF8E}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tnb.BasicData.Interfaces", "Tnb.BasicData.Interfaces\Tnb.BasicData.Interfaces.csproj", "{12A5A0D3-C608-46AB-AC4C-5D5EF729AF8E}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tnb.BasicData", "Tnb.BasicData\Tnb.BasicData.csproj", "{C37798AB-AF09-4260-BEF5-92F7D373A4EA}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tnb.BasicData", "Tnb.BasicData\Tnb.BasicData.csproj", "{C37798AB-AF09-4260-BEF5-92F7D373A4EA}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "10-ProductionPlanMgr", "10-ProductionPlanMgr", "{ABE58B5E-610B-4159-BFF0-8B04BF700B3C}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tnb.ProductionPlanMgr", "Tnb.ProductionPlanMgr\Tnb.ProductionPlanMgr.csproj", "{1E8D442B-D136-4D1A-A265-16E2DE19D938}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tnb.ProductionPlanMgr.Entitys", "Tnb.ProductionPlanMgr.Entitys\Tnb.ProductionPlanMgr.Entitys.csproj", "{CE77DCAE-5210-4876-8C52-443823FF886F}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tnb.ProductionPlanMgr.Interfaces", "Tnb.ProductionPlanMgr.Interfaces\Tnb.ProductionPlanMgr.Interfaces.csproj", "{BCC64BB9-B22C-475E-BF6C-BF22B644C359}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
@@ -235,6 +243,18 @@ Global
|
||||
{C37798AB-AF09-4260-BEF5-92F7D373A4EA}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{C37798AB-AF09-4260-BEF5-92F7D373A4EA}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C37798AB-AF09-4260-BEF5-92F7D373A4EA}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{1E8D442B-D136-4D1A-A265-16E2DE19D938}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{1E8D442B-D136-4D1A-A265-16E2DE19D938}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{1E8D442B-D136-4D1A-A265-16E2DE19D938}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{1E8D442B-D136-4D1A-A265-16E2DE19D938}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{CE77DCAE-5210-4876-8C52-443823FF886F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{CE77DCAE-5210-4876-8C52-443823FF886F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{CE77DCAE-5210-4876-8C52-443823FF886F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{CE77DCAE-5210-4876-8C52-443823FF886F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{BCC64BB9-B22C-475E-BF6C-BF22B644C359}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{BCC64BB9-B22C-475E-BF6C-BF22B644C359}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{BCC64BB9-B22C-475E-BF6C-BF22B644C359}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{BCC64BB9-B22C-475E-BF6C-BF22B644C359}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@@ -272,6 +292,9 @@ Global
|
||||
{1E09E797-7DFF-49B1-ABB8-290660DB4451} = {52B19E13-6B04-444C-A38A-B9955B199A98}
|
||||
{12A5A0D3-C608-46AB-AC4C-5D5EF729AF8E} = {52B19E13-6B04-444C-A38A-B9955B199A98}
|
||||
{C37798AB-AF09-4260-BEF5-92F7D373A4EA} = {52B19E13-6B04-444C-A38A-B9955B199A98}
|
||||
{1E8D442B-D136-4D1A-A265-16E2DE19D938} = {ABE58B5E-610B-4159-BFF0-8B04BF700B3C}
|
||||
{CE77DCAE-5210-4876-8C52-443823FF886F} = {ABE58B5E-610B-4159-BFF0-8B04BF700B3C}
|
||||
{BCC64BB9-B22C-475E-BF6C-BF22B644C359} = {ABE58B5E-610B-4159-BFF0-8B04BF700B3C}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {646DDD1C-F143-42C2-894F-F5C7B3A0CE74}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"DBType": "PostgreSQL", //MySql;SqlServer;Oracle;PostgreSQL;Dm;Kdbndp;Sqlite;
|
||||
"Host": "localhost",
|
||||
"Port": "5432",
|
||||
"DBName": "tnb_bas",
|
||||
"DBName": "tianyi_bas",
|
||||
"UserName": "totong",
|
||||
"Password": "IPANyxGSKxIXg0dBM",
|
||||
//SqlServer
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
<ProjectReference Include="..\..\system\Tnb.Systems\Tnb.Systems.csproj" />
|
||||
<ProjectReference Include="..\..\taskschedule\Tnb.TaskScheduler\Tnb.TaskScheduler.csproj" />
|
||||
<ProjectReference Include="..\..\Tnb.BasicData\Tnb.BasicData.csproj" />
|
||||
<ProjectReference Include="..\..\Tnb.ProductionPlanMgr\Tnb.ProductionPlanMgr.csproj" />
|
||||
<ProjectReference Include="..\..\visualdev\Tnb.VisualDev\Tnb.VisualDev.csproj" />
|
||||
<ProjectReference Include="..\..\workflow\Tnb.WorkFlow\Tnb.WorkFlow.csproj" />
|
||||
<ProjectReference Include="..\..\extend\Tnb.Extend\Tnb.Extend.csproj" />
|
||||
|
||||
@@ -318,12 +318,14 @@ public class DbLinkService : IDbLinkService, IDynamicApiController, ITransient
|
||||
[NonAction]
|
||||
public async Task<DbLinkEntity> GetInfo(string id)
|
||||
{
|
||||
var model = await _memCache.GetOrCreateAsync($"DbLink_{id}", async entry =>
|
||||
{
|
||||
//entry.AbsoluteExpiration = DateTime.Now.AddMinutes(60);
|
||||
//entry.SlidingExpiration = TimeSpan.FromSeconds(-1);
|
||||
return await _repository.AsSugarClient().CopyNew().Queryable<DbLinkEntity>().FirstAsync(m => m.Id == id && m.DeleteMark == null);
|
||||
});
|
||||
//modified by ly on 20230417
|
||||
var model = await _repository.AsSugarClient().CopyNew().Queryable<DbLinkEntity>().FirstAsync(m => m.Id == id && m.DeleteMark == null);
|
||||
//await _memCache.GetOrCreateAsync($"DbLink_{id}", async entry =>
|
||||
//{
|
||||
// //entry.AbsoluteExpiration = DateTime.Now.AddMinutes(60);
|
||||
// //entry.SlidingExpiration = TimeSpan.FromSeconds(-1);
|
||||
// return await _repository.AsSugarClient().CopyNew().Queryable<DbLinkEntity>().FirstAsync(m => m.Id == id && m.DeleteMark == null);
|
||||
//});
|
||||
return model;
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -208,7 +208,7 @@ public class RunService : IRunService, ITransient
|
||||
if (templateInfo.SingleFormData.Any(x => x.__config__.templateJson != null && x.__config__.templateJson.Any()))
|
||||
realList.list = await _formDataParsing.GetKeyData(templateInfo.SingleFormData.Where(x => x.__config__.templateJson != null && x.__config__.templateJson.Any()).ToList(), realList.list, templateInfo.ColumnData, actionType, templateInfo.WebType, primaryKey);
|
||||
else //modified by ly on 20230407
|
||||
realList.list = await _formDataParsing.GetKeyData(templateInfo.SingleFormData.Where(x => x.__config__.templateJson == null|| !x.__config__.templateJson.Any()).ToList(), realList.list, templateInfo.ColumnData, actionType, templateInfo.WebType, primaryKey);
|
||||
realList.list = await _formDataParsing.GetKeyData(templateInfo.SingleFormData.Where(x => x.__config__.templateJson == null || !x.__config__.templateJson.Any()).ToList(), realList.list, templateInfo.ColumnData, actionType, templateInfo.WebType, primaryKey);
|
||||
|
||||
// 如果是无表数据并且排序字段不为空,再进行数据排序
|
||||
if (!templateInfo.IsHasTable && input.sidx.IsNotEmptyOrNull())
|
||||
@@ -1558,6 +1558,7 @@ public class RunService : IRunService, ITransient
|
||||
{
|
||||
List<FieldsModel> childFieldsModelList = model.__config__.children;
|
||||
object? objectData = allDataMap[strKey[i]];
|
||||
|
||||
List<Dictionary<string, object>> childAllDataMapList = objectData.ToJsonString().ToObject<List<Dictionary<string, object>>>();
|
||||
if (childAllDataMapList != null && childAllDataMapList.Count > 0)
|
||||
{
|
||||
|
||||
@@ -349,6 +349,7 @@ public class VisualDevService : IVisualDevService, IDynamicApiController, ITrans
|
||||
_db.BeginTran(); // 开启事务
|
||||
|
||||
// 修改功能
|
||||
|
||||
await _visualDevRepository.AsSugarClient().Updateable(entity).IgnoreColumns(ignoreAllNullColumns: true).CallEntityMethod(m => m.LastModify()).ExecuteCommandAsync();
|
||||
|
||||
// 修改流程表单
|
||||
|
||||
Reference in New Issue
Block a user