diff --git a/Tnb.ProductionPlanMgr.Entitys/Class1.cs b/Tnb.ProductionPlanMgr.Entitys/Class1.cs new file mode 100644 index 00000000..d6367141 --- /dev/null +++ b/Tnb.ProductionPlanMgr.Entitys/Class1.cs @@ -0,0 +1,7 @@ +namespace Tnb.ProductionPlanMgr.Entitys +{ + public class Class1 + { + + } +} \ No newline at end of file diff --git a/Tnb.ProductionPlanMgr.Entitys/Dto/WorkOrder/WorkOrderIssueCrInput.cs b/Tnb.ProductionPlanMgr.Entitys/Dto/WorkOrder/WorkOrderIssueCrInput.cs new file mode 100644 index 00000000..d3c9084c --- /dev/null +++ b/Tnb.ProductionPlanMgr.Entitys/Dto/WorkOrder/WorkOrderIssueCrInput.cs @@ -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 +{ + /// + /// 生产工单下发输入参数 + /// + public class WorkOrderIssueCrInput + { + /// + /// 生产工单Id列表 + /// + public List WorkOrderIds { get; set; } + } +} diff --git a/Tnb.ProductionPlanMgr.Entitys/Entity/PrdMoEntity.cs b/Tnb.ProductionPlanMgr.Entitys/Entity/PrdMoEntity.cs new file mode 100644 index 00000000..e4f2a0a6 --- /dev/null +++ b/Tnb.ProductionPlanMgr.Entitys/Entity/PrdMoEntity.cs @@ -0,0 +1,239 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using SqlSugar; +using Tnb.Common.Contracts; + +namespace Tnb.ProductionPlanMgr.Entitys.Entity +{ + /// + /// MES生产工单 + /// + [SugarTable("prd_mo")] + public class PrdMoEntity : BaseEntity + { + /// + /// 租户ID + /// 默认值: NULL::character varying + /// + [SugarColumn(ColumnName = "tenant_id")] + public string TenantId { get; set; } + /// + /// 所属组织ID + /// 默认值: NULL::character varying + /// + [SugarColumn(ColumnName = "org_id")] + public string OrgId { get; set; } + /// + /// 工单代码 + /// + [SugarColumn(ColumnName = "mo_code")] + public string MoCode { get; set; } + /// + /// 产品代码, BAS_MATERIA.MATERIALCODE BAS_ITEM.ITEMCODE + /// + [SugarColumn(ColumnName = "item_code")] + public string ItemCode { get; set; } + /// + /// 产品附属信息 + /// 默认值: NULL::character varying + /// + [SugarColumn(ColumnName = "item_attribute")] + public string ItemAttribute { get; set; } + /// + /// 工单类型:1-正常工单、2-返工工单、3-试制工单 + /// + [SugarColumn(ColumnName = "mo_type")] + public string MoType { get; set; } + /// + /// 生产状态 Initial: 初始, Confirm:确认 Release: 下发, Open: 生产中, Close: 关单, Pending: 暂停 + /// + [SugarColumn(ColumnName = "mo_status")] + public string MoStatus { get; set; } + /// + /// 生产数量 + /// + [SugarColumn(ColumnName = "plan_qty")] + public decimal PlanQty { get; set; } + /// + /// 已投入数量 + /// + [SugarColumn(ColumnName = "input_qty")] + public decimal? InputQty { get; set; } + /// + /// 已完工数量 + /// + [SugarColumn(ColumnName = "complete_qty")] + public decimal? CompleteQty { get; set; } + /// + /// 报废数量 + /// + [SugarColumn(ColumnName = "scrap_qty")] + public decimal? ScrapQty { get; set; } + /// + /// 计划开始时间 + /// + [SugarColumn(ColumnName = "plan_start_date")] + public DateTime PlanStartDate { get; set; } + /// + /// 计划结束时间 + /// + [SugarColumn(ColumnName = "plan_end_date")] + public DateTime PlanEndDate { get; set; } + /// + /// 实际开工日期 + /// + [SugarColumn(ColumnName = "act_start_date")] + public DateTime? ActStartDate { get; set; } + /// + /// 实际完工日期 + /// + [SugarColumn(ColumnName = "act_end_date")] + public DateTime? ActEndDate { get; set; } + /// + /// 生产部门ID + /// 默认值: NULL::character varying + /// + [SugarColumn(ColumnName = "dept_id")] + public string DeptId { get; set; } + /// + /// 客户代码 + /// 默认值: NULL::character varying + /// + [SugarColumn(ColumnName = "customer_code")] + public string CustomerCode { get; set; } + /// + /// 订单号 + /// 默认值: NULL::character varying + /// + [SugarColumn(ColumnName = "order_no")] + public string OrderNo { get; set; } + /// + /// 订单行号 + /// + [SugarColumn(ColumnName = "order_seq")] + public int? OrderSeq { get; set; } + /// + /// BOM版本 + /// 默认值: NULL::character varying + /// + [SugarColumn(ColumnName = "bom_version")] + public string BomVersion { get; set; } + /// + /// 关联比例 + /// + [SugarColumn(ColumnName = "relation_ratio")] + public decimal? RelationRatio { get; set; } + /// + /// 下发人员ID + /// 默认值: NULL::character varying + /// + [SugarColumn(ColumnName = "mo_down_user_id")] + public string MoDownUserId { get; set; } + /// + /// 下发人员名称 + /// 默认值: NULL::character varying + /// + [SugarColumn(ColumnName = "mo_down_user_name")] + public string MoDownUserName { get; set; } + /// + /// 下发日期 + /// + [SugarColumn(ColumnName = "mo_down_date")] + public DateTime? MoDownDate { get; set; } + /// + /// 备注 + /// 默认值: NULL::character varying + /// + [SugarColumn(ColumnName = "remark")] + public string Remark { get; set; } + /// + /// 工作中心代码 + /// 默认值: NULL::character varying + /// + [SugarColumn(ColumnName = "work_center_code")] + public string WorkCenterCode { get; set; } + /// + /// 主工单代码 + /// 默认值: NULL::character varying + /// + [SugarColumn(ColumnName = "parent_mo_code")] + public string ParentMoCode { get; set; } + /// + /// 排程开始时间 + /// + [SugarColumn(ColumnName = "seduling_start_date")] + public DateTime? SedulingStartDate { get; set; } + /// + /// 排程结束时间 + /// + [SugarColumn(ColumnName = "seduling_end_date")] + public DateTime? SedulingEndDate { get; set; } + /// + /// 是否生派工单 + /// + [SugarColumn(ColumnName = "is_create_dispatch")] + public int? IsCreateDispatch { get; set; } + /// + /// 子工单序号(1开始,最大+1,不强制连续) + /// + [SugarColumn(ColumnName = "seq")] + public int? Seq { get; set; } + /// + /// 数据来源 10-计划,20-插入,30-导入 + /// 默认值: NULL::character varying + /// + [SugarColumn(ColumnName = "data_sources")] + public string DataSources { get; set; } + /// + /// 产线代码 + /// 默认值: NULL::character varying + /// + [SugarColumn(ColumnName = "production_linecode")] + public string ProductionLinecode { get; set; } + /// + /// ismerge + /// + [SugarColumn(ColumnName = "is_merge")] + public int? IsMerge { get; set; } + /// + /// 组合工单 + /// 默认值: NULL::character varying + /// + [SugarColumn(ColumnName = "combine_mo_code")] + public string CombineMoCode { get; set; } + /// + /// 时间戳 + /// 默认值: NULL::character varying + /// + [SugarColumn(ColumnName = "time_stamp")] + public string TimeStamp { get; set; } + /// + /// 创建用户 + /// 默认值: NULL::character varying + /// + [SugarColumn(ColumnName = "create_id")] + public string CreateId { get; set; } + /// + /// 创建时间 + /// + [SugarColumn(ColumnName = "create_time")] + public DateTime? CreateTime { get; set; } + /// + /// 修改用户 + /// 默认值: NULL::character varying + /// + [SugarColumn(ColumnName = "modify_id")] + public string ModifyId { get; set; } + /// + /// 修改时间 + /// + [SugarColumn(ColumnName = "modify_time")] + public DateTime? ModifyTime { get; set; } + /// + /// 扩展字段 + /// + [SugarColumn(ColumnName = "extras")] + public string Extras { get; set; } + } +} diff --git a/Tnb.ProductionPlanMgr.Entitys/Tnb.ProductionPlanMgr.Entitys.csproj b/Tnb.ProductionPlanMgr.Entitys/Tnb.ProductionPlanMgr.Entitys.csproj new file mode 100644 index 00000000..01bb3f48 --- /dev/null +++ b/Tnb.ProductionPlanMgr.Entitys/Tnb.ProductionPlanMgr.Entitys.csproj @@ -0,0 +1,14 @@ + + + + net6.0 + enable + enable + True + + + + + + + diff --git a/Tnb.ProductionPlanMgr.Interfaces/IWorkOrderCreateService.cs b/Tnb.ProductionPlanMgr.Interfaces/IWorkOrderCreateService.cs new file mode 100644 index 00000000..9570bb1f --- /dev/null +++ b/Tnb.ProductionPlanMgr.Interfaces/IWorkOrderCreateService.cs @@ -0,0 +1,12 @@ +using Tnb.ProductionPlanMgr.Entitys.Dto.WorkOrder; + +namespace Tnb.ProductionPlanMgr.Interfaces +{ + /// + /// 工单生成 + /// + public interface IWorkOrderCreateService + { + Task WorkOrderIssue(WorkOrderIssueCrInput input); + } +} \ No newline at end of file diff --git a/Tnb.ProductionPlanMgr.Interfaces/Tnb.ProductionPlanMgr.Interfaces.csproj b/Tnb.ProductionPlanMgr.Interfaces/Tnb.ProductionPlanMgr.Interfaces.csproj new file mode 100644 index 00000000..6fb744e9 --- /dev/null +++ b/Tnb.ProductionPlanMgr.Interfaces/Tnb.ProductionPlanMgr.Interfaces.csproj @@ -0,0 +1,14 @@ + + + + net6.0 + enable + enable + True + + + + + + + diff --git a/Tnb.ProductionPlanMgr/Tnb.ProductionPlanMgr.csproj b/Tnb.ProductionPlanMgr/Tnb.ProductionPlanMgr.csproj new file mode 100644 index 00000000..126ca9b8 --- /dev/null +++ b/Tnb.ProductionPlanMgr/Tnb.ProductionPlanMgr.csproj @@ -0,0 +1,17 @@ + + + + net6.0 + enable + enable + True + + + + + + + + + + diff --git a/Tnb.ProductionPlanMgr/WorkOrderCreateService.cs b/Tnb.ProductionPlanMgr/WorkOrderCreateService.cs new file mode 100644 index 00000000..19654e3d --- /dev/null +++ b/Tnb.ProductionPlanMgr/WorkOrderCreateService.cs @@ -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 +{ + /// + /// 生产计划管理 + /// + [ApiDescriptionSettings(Tag = "ProductPlanMgr", Name = "WorkOrderCreate", Order = 700)] + [Route("api/production/[controller]")] + public class WorkOrderCreateService :IWorkOrderCreateService,IDynamicApiController, ITransient + { + private readonly ISqlSugarRepository _repository; + private readonly IDataBaseManager _dataBaseManager; + public WorkOrderCreateService(ISqlSugarRepository repository, IDataBaseManager dataBaseManager) + { + _repository = repository; + _dataBaseManager = dataBaseManager; + } + /// + /// 生产工单创建-生产工单下发 + /// + /// 生产工单下发输入参数 + /// + [HttpPut("workorder-issue")] + public async Task WorkOrderIssue(WorkOrderIssueCrInput input) + { + if (input is null) + { + throw new ArgumentNullException(nameof(input)); + } + var link = await _repository.AsSugarClient().Queryable().FirstAsync(x => x.FullName == "tnb_mes"); + var db = _dataBaseManager.ChangeDataBase(link); + var row = await db.Updateable() + .SetColumns(it => new PrdMoEntity { MoStatus = "25019232867093" }) + .Where(it => input.WorkOrderIds.Contains(it.Id)) + .ExecuteCommandAsync(); + return (row > 0); + } + } +} \ No newline at end of file diff --git a/Tnb.ProductionPlanMgr/WorkOrderSchedulingService.cs b/Tnb.ProductionPlanMgr/WorkOrderSchedulingService.cs new file mode 100644 index 00000000..dfba6aad --- /dev/null +++ b/Tnb.ProductionPlanMgr/WorkOrderSchedulingService.cs @@ -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() + { + + } + } +} diff --git a/Tnb.ProductionPlanMgr/internals/BaseService.cs b/Tnb.ProductionPlanMgr/internals/BaseService.cs new file mode 100644 index 00000000..14933bef --- /dev/null +++ b/Tnb.ProductionPlanMgr/internals/BaseService.cs @@ -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 _dbContextDic = new(StringComparer.OrdinalIgnoreCase); + static BaseService() + { + var repo = App.GetService>(); + var = await repo.GetListAsync(); + var dbMgr = App.GetService(); + + } + + + } +} diff --git a/Tnb.Server.sln b/Tnb.Server.sln index f30f130d..ec7d3b6e 100644 --- a/Tnb.Server.sln +++ b/Tnb.Server.sln @@ -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} diff --git a/apihost/Tnb.API.Entry/Configurations/ConnectionStrings.json b/apihost/Tnb.API.Entry/Configurations/ConnectionStrings.json index 2b96adcf..aeadd7ea 100644 --- a/apihost/Tnb.API.Entry/Configurations/ConnectionStrings.json +++ b/apihost/Tnb.API.Entry/Configurations/ConnectionStrings.json @@ -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 diff --git a/apihost/Tnb.API.Entry/Tnb.API.Entry.csproj b/apihost/Tnb.API.Entry/Tnb.API.Entry.csproj index 64149742..13267fd0 100644 --- a/apihost/Tnb.API.Entry/Tnb.API.Entry.csproj +++ b/apihost/Tnb.API.Entry/Tnb.API.Entry.csproj @@ -39,6 +39,7 @@ + diff --git a/system/Tnb.Systems/System/DbLinkService.cs b/system/Tnb.Systems/System/DbLinkService.cs index 60fc9d88..d920a7f6 100644 --- a/system/Tnb.Systems/System/DbLinkService.cs +++ b/system/Tnb.Systems/System/DbLinkService.cs @@ -318,12 +318,14 @@ public class DbLinkService : IDbLinkService, IDynamicApiController, ITransient [NonAction] public async Task 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().FirstAsync(m => m.Id == id && m.DeleteMark == null); - }); + //modified by ly on 20230417 + var model = await _repository.AsSugarClient().CopyNew().Queryable().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().FirstAsync(m => m.Id == id && m.DeleteMark == null); + //}); return model; } #endregion diff --git a/visualdev/Tnb.VisualDev/RunService.cs b/visualdev/Tnb.VisualDev/RunService.cs index c329f870..65f351e4 100644 --- a/visualdev/Tnb.VisualDev/RunService.cs +++ b/visualdev/Tnb.VisualDev/RunService.cs @@ -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 childFieldsModelList = model.__config__.children; object? objectData = allDataMap[strKey[i]]; + List> childAllDataMapList = objectData.ToJsonString().ToObject>>(); if (childAllDataMapList != null && childAllDataMapList.Count > 0) { diff --git a/visualdev/Tnb.VisualDev/VisualDevService.cs b/visualdev/Tnb.VisualDev/VisualDevService.cs index 860f9ee6..94151705 100644 --- a/visualdev/Tnb.VisualDev/VisualDevService.cs +++ b/visualdev/Tnb.VisualDev/VisualDevService.cs @@ -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(); // 修改流程表单