diff --git a/ProductionMgr/Tnb.ProductionMgr.Entitys/Entity/PrdTask.cs b/ProductionMgr/Tnb.ProductionMgr.Entitys/Entity/PrdTask.cs
index 5817e956..3f78ed61 100644
--- a/ProductionMgr/Tnb.ProductionMgr.Entitys/Entity/PrdTask.cs
+++ b/ProductionMgr/Tnb.ProductionMgr.Entitys/Entity/PrdTask.cs
@@ -8,7 +8,7 @@ namespace Tnb.ProductionMgr.Entities
///
///生产任务信息
///
- [SugarTable("prd_task")]
+ [SugarTable("prd_mo_task")]
public partial class PrdTask
{
public PrdTask()
diff --git a/ProductionMgr/Tnb.ProductionMgr.Entitys/Entity/PrdTaskLog.cs b/ProductionMgr/Tnb.ProductionMgr.Entitys/Entity/PrdTaskLog.cs
index d1cd237e..3b49a401 100644
--- a/ProductionMgr/Tnb.ProductionMgr.Entitys/Entity/PrdTaskLog.cs
+++ b/ProductionMgr/Tnb.ProductionMgr.Entitys/Entity/PrdTaskLog.cs
@@ -8,7 +8,7 @@ namespace Tnb.ProductionMgr.Entities
///
///生产任务操作记录
///
- [SugarTable("prd_task_log")]
+ [SugarTable("prd_mo_task_log")]
public partial class PrdTaskLog
{
public PrdTaskLog(){
diff --git a/ProductionMgr/Tnb.ProductionMgr/PrdMoService.cs b/ProductionMgr/Tnb.ProductionMgr/PrdMoService.cs
index 0aba2700..e426fbe7 100644
--- a/ProductionMgr/Tnb.ProductionMgr/PrdMoService.cs
+++ b/ProductionMgr/Tnb.ProductionMgr/PrdMoService.cs
@@ -6,6 +6,7 @@ using JNPF.FriendlyException;
using JNPF.Logging;
using JNPF.Systems.Interfaces.System;
using JNPF.VisualDev;
+using JNPF.VisualDev.Entitys.Dto.VisualDevModelData;
using Mapster;
using Microsoft.AspNetCore.Mvc;
using SqlSugar;
@@ -23,8 +24,10 @@ namespace Tnb.ProductionMgr
///
[ApiDescriptionSettings(Tag = ModuleConst.Tag, Area = ModuleConst.Area, Order = 700)]
[Route("api/[area]/[controller]/[action]")]
+ [OverideVisualDev(ModuleId)]
public class PrdMoService : IOverideVisualDevService, IPrdMoService, IDynamicApiController, ITransient
{
+ private const string ModuleId = "25567924238373";
private readonly ISqlSugarRepository _repository;
private readonly IDataBaseManager _dataBaseManager;
private readonly IUserManager _userManager;
@@ -43,6 +46,7 @@ namespace Tnb.ProductionMgr
_dataBaseManager = dataBaseManager;
_userManager = userManager;
_dictionaryDataService = dictionaryDataService;
+ OverideFuncs.DeleteAsync = Delete;
}
@@ -404,7 +408,7 @@ namespace Tnb.ProductionMgr
{
var obj = (await db.Queryable().FirstAsync(it => it.id == input.mo_id));
obj.input_qty += entity.scheduled_qty;
- string moStatus = "",icmoStatus="";
+ string moStatus = "", icmoStatus = "";
//判断,已排产数量>=计划数量时将状态改为 已排产
if (obj.input_qty >= obj.plan_qty)
@@ -495,5 +499,22 @@ namespace Tnb.ProductionMgr
}
#endregion
+
+ //public async Task GetList(VisualDevModelListQueryInput input)
+ //{
+ // return null;
+ //}
+
+ ///
+ /// 删除
+ ///
+ ///
+ ///
+
+ private Task Delete(string id)
+ {
+ string str = "";
+ return Task.CompletedTask;
+ }
}
}
\ No newline at end of file
diff --git a/apihost/Tnb.API.Entry/Configurations/Cors.json b/apihost/Tnb.API.Entry/Configurations/Cors.json
index 7e6a366e..3224525c 100644
--- a/apihost/Tnb.API.Entry/Configurations/Cors.json
+++ b/apihost/Tnb.API.Entry/Configurations/Cors.json
@@ -1,7 +1,7 @@
{
"CorsAccessorSettings": {
"PolicyName": "JNPFCorsAccessor",
- "WithOrigins": [ "http://192.168.10.12:9230", "http://192.168.10.18:9230", "http://localhost:8080", "http://localhost:9230" ],
+ "WithOrigins": [ "http://192.168.10.12:9230","http://localhost:8080", "http://localhost:9230" ],
"WithExposedHeaders": [ "access-token", "x-access-token", "Content-Disposition" ]
}
}
\ No newline at end of file
diff --git a/system/Tnb.Systems/Permission/DepartmentService.cs b/system/Tnb.Systems/Permission/DepartmentService.cs
index 0a9c36d2..71917ea9 100644
--- a/system/Tnb.Systems/Permission/DepartmentService.cs
+++ b/system/Tnb.Systems/Permission/DepartmentService.cs
@@ -459,6 +459,9 @@ public class DepartmentService : IDepartmentService, IDynamicApiController, ITra
isOK = await _repository.AsSugarClient().Updateable().SetColumns(it => new EqpEquipment { station_code = "" }).Where(it => unbindEqpIds.Contains(it.id)).ExecuteCommandAsync();
}
}
+ //绑定工序
+ var procList = input.propertyJson.Value("rowprocess");
+
if (!(isOK > 0)) throw Oops.Oh(ErrorCode.COM1001);
}
diff --git a/visualdev/Tnb.VisualDev/RunService.cs b/visualdev/Tnb.VisualDev/RunService.cs
index 2e54bcbd..c1fc04a8 100644
--- a/visualdev/Tnb.VisualDev/RunService.cs
+++ b/visualdev/Tnb.VisualDev/RunService.cs
@@ -179,20 +179,19 @@ public class RunService : IRunService, ITransient
var jArr = JArray.Parse(entity.Tables);
if (!input.station_code.IsNullOrWhiteSpace())
{
-
+
if (jArr?.FirstOrDefault()?.Value("table") == "eqp_equipment")
{
sql += $" where station_code='{input.station_code}' or station_code=''";
}
- }
- if (!input.process_code.IsNullOrWhiteSpace())
- {
if (jArr?.FirstOrDefault()?.Value("table") == "bas_process")
{
- //sql += $" where station_code='{input.station_code}' or station_code=''";
+ //sql += $" and station_code='{input.station_code}' or station_code=''";
}
}
-
+
+
+
realList = _databaseService.GetInterFaceData(link, sql, input, templateInfo.ColumnData.Adapt(), new List(), tableFieldKeyValue);
@@ -2902,15 +2901,15 @@ public class RunService : IRunService, ITransient
{
jarr = JArray.Parse(itemValue);
}
-
+
// 多选时为模糊查询
if (model.multiple)
{
if (jarr?.Children() != null && jarr?.Children().ToList().Count > 1)
{
var values = string.Join(",", jarr.ToList().Select(t => t.Value()));
- conModels.Add(new ConditionalModel { FieldName= item.Key, ConditionalType= ConditionalType.In, FieldValue=values });
-
+ conModels.Add(new ConditionalModel { FieldName = item.Key, ConditionalType = ConditionalType.In, FieldValue = values });
+
}
else
{
@@ -2934,7 +2933,7 @@ public class RunService : IRunService, ITransient
{
var values = string.Join(",", jarr.ToList().Select(t => t.Value()));
conModels.Add(new ConditionalModel { FieldName = item.Key, ConditionalType = ConditionalType.In, FieldValue = values });
-
+
}
else
{
diff --git a/visualdev/Tnb.VisualDev/Tnb.VisualDev.csproj b/visualdev/Tnb.VisualDev/Tnb.VisualDev.csproj
index 0bff7024..10a3c287 100644
--- a/visualdev/Tnb.VisualDev/Tnb.VisualDev.csproj
+++ b/visualdev/Tnb.VisualDev/Tnb.VisualDev.csproj
@@ -12,6 +12,7 @@
+
diff --git a/visualdev/Tnb.VisualDev/VisualDevModelDataService.cs b/visualdev/Tnb.VisualDev/VisualDevModelDataService.cs
index 513fd245..3adc169e 100644
--- a/visualdev/Tnb.VisualDev/VisualDevModelDataService.cs
+++ b/visualdev/Tnb.VisualDev/VisualDevModelDataService.cs
@@ -1,4 +1,5 @@
-using JNPF.Common.Configuration;
+using System.Data;
+using JNPF.Common.Configuration;
using JNPF.Common.Const;
using JNPF.Common.Core.Manager;
using JNPF.Common.Core.Manager.Files;
@@ -33,6 +34,7 @@ using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json.Linq;
using SqlSugar;
+using Tnb.ProductionMgr.Interfaces;
using Yitter.IdGenerator;
namespace JNPF.VisualDev
@@ -104,6 +106,8 @@ namespace JNPF.VisualDev
///
private readonly ITenant _db;
+ private readonly IPrdMoService _prdMoService;
+
///
/// 初始化一个类型的新实例.
///
@@ -119,7 +123,8 @@ namespace JNPF.VisualDev
ICacheManager cacheManager,
IFlowTaskService flowTaskService,
IFileManager fileManager,
- ISqlSugarClient context)
+ ISqlSugarClient context,
+ IPrdMoService prdMoService)
{
_visualDevRepository = visualDevRepository;
_visualDevService = visualDevService;
@@ -133,6 +138,7 @@ namespace JNPF.VisualDev
_fileManager = fileManager;
_dataInterfaceService = dataInterfaceService;
_db = context.AsTenant();
+ _prdMoService = prdMoService;
}
#region Get