重写,在线开发删除接口
This commit is contained in:
@@ -8,7 +8,7 @@ namespace Tnb.ProductionMgr.Entities
|
||||
///<summary>
|
||||
///生产任务信息
|
||||
///</summary>
|
||||
[SugarTable("prd_task")]
|
||||
[SugarTable("prd_mo_task")]
|
||||
public partial class PrdTask
|
||||
{
|
||||
public PrdTask()
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace Tnb.ProductionMgr.Entities
|
||||
///<summary>
|
||||
///生产任务操作记录
|
||||
///</summary>
|
||||
[SugarTable("prd_task_log")]
|
||||
[SugarTable("prd_mo_task_log")]
|
||||
public partial class PrdTaskLog
|
||||
{
|
||||
public PrdTaskLog(){
|
||||
|
||||
@@ -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
|
||||
/// </summary>
|
||||
[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<PrdMo> _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<PrdMo>().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<dynamic> GetList(VisualDevModelListQueryInput input)
|
||||
//{
|
||||
// return null;
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
|
||||
private Task Delete(string id)
|
||||
{
|
||||
string str = "";
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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" ]
|
||||
}
|
||||
}
|
||||
@@ -459,6 +459,9 @@ public class DepartmentService : IDepartmentService, IDynamicApiController, ITra
|
||||
isOK = await _repository.AsSugarClient().Updateable<EqpEquipment>().SetColumns(it => new EqpEquipment { station_code = "" }).Where(it => unbindEqpIds.Contains(it.id)).ExecuteCommandAsync();
|
||||
}
|
||||
}
|
||||
//绑定工序
|
||||
var procList = input.propertyJson.Value<JArray>("rowprocess");
|
||||
|
||||
if (!(isOK > 0)) throw Oops.Oh(ErrorCode.COM1001);
|
||||
|
||||
}
|
||||
|
||||
@@ -179,20 +179,19 @@ public class RunService : IRunService, ITransient
|
||||
var jArr = JArray.Parse(entity.Tables);
|
||||
if (!input.station_code.IsNullOrWhiteSpace())
|
||||
{
|
||||
|
||||
|
||||
if (jArr?.FirstOrDefault()?.Value<string>("table") == "eqp_equipment")
|
||||
{
|
||||
sql += $" where station_code='{input.station_code}' or station_code=''";
|
||||
}
|
||||
}
|
||||
if (!input.process_code.IsNullOrWhiteSpace())
|
||||
{
|
||||
if (jArr?.FirstOrDefault()?.Value<string>("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<MainBeltViceQueryModel>(), new List<IConditionalModel>(), 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<string>()));
|
||||
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<string>()));
|
||||
conModels.Add(new ConditionalModel { FieldName = item.Key, ConditionalType = ConditionalType.In, FieldValue = values });
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
<ProjectReference Include="..\..\common\Tnb.Common.Core\Tnb.Common.Core.csproj" />
|
||||
<ProjectReference Include="..\..\extend\Tnb.Extend.Interfaces\Tnb.Extend.Interfaces.csproj" />
|
||||
<ProjectReference Include="..\..\message\Tnb.Message.Interfaces\Tnb.Message.Interfaces.csproj" />
|
||||
<ProjectReference Include="..\..\ProductionMgr\Tnb.ProductionMgr.Interfaces\Tnb.ProductionMgr.Interfaces.csproj" />
|
||||
<ProjectReference Include="..\Tnb.VisualDev.Engine\Tnb.VisualDev.Engine.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@@ -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
|
||||
/// </summary>
|
||||
private readonly ITenant _db;
|
||||
|
||||
private readonly IPrdMoService _prdMoService;
|
||||
|
||||
/// <summary>
|
||||
/// 初始化一个<see cref="VisualDevModelDataService"/>类型的新实例.
|
||||
/// </summary>
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user