重写,在线开发删除接口
This commit is contained in:
@@ -8,7 +8,7 @@ namespace Tnb.ProductionMgr.Entities
|
|||||||
///<summary>
|
///<summary>
|
||||||
///生产任务信息
|
///生产任务信息
|
||||||
///</summary>
|
///</summary>
|
||||||
[SugarTable("prd_task")]
|
[SugarTable("prd_mo_task")]
|
||||||
public partial class PrdTask
|
public partial class PrdTask
|
||||||
{
|
{
|
||||||
public PrdTask()
|
public PrdTask()
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ namespace Tnb.ProductionMgr.Entities
|
|||||||
///<summary>
|
///<summary>
|
||||||
///生产任务操作记录
|
///生产任务操作记录
|
||||||
///</summary>
|
///</summary>
|
||||||
[SugarTable("prd_task_log")]
|
[SugarTable("prd_mo_task_log")]
|
||||||
public partial class PrdTaskLog
|
public partial class PrdTaskLog
|
||||||
{
|
{
|
||||||
public PrdTaskLog(){
|
public PrdTaskLog(){
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ using JNPF.FriendlyException;
|
|||||||
using JNPF.Logging;
|
using JNPF.Logging;
|
||||||
using JNPF.Systems.Interfaces.System;
|
using JNPF.Systems.Interfaces.System;
|
||||||
using JNPF.VisualDev;
|
using JNPF.VisualDev;
|
||||||
|
using JNPF.VisualDev.Entitys.Dto.VisualDevModelData;
|
||||||
using Mapster;
|
using Mapster;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using SqlSugar;
|
using SqlSugar;
|
||||||
@@ -23,8 +24,10 @@ namespace Tnb.ProductionMgr
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[ApiDescriptionSettings(Tag = ModuleConst.Tag, Area = ModuleConst.Area, Order = 700)]
|
[ApiDescriptionSettings(Tag = ModuleConst.Tag, Area = ModuleConst.Area, Order = 700)]
|
||||||
[Route("api/[area]/[controller]/[action]")]
|
[Route("api/[area]/[controller]/[action]")]
|
||||||
|
[OverideVisualDev(ModuleId)]
|
||||||
public class PrdMoService : IOverideVisualDevService, IPrdMoService, IDynamicApiController, ITransient
|
public class PrdMoService : IOverideVisualDevService, IPrdMoService, IDynamicApiController, ITransient
|
||||||
{
|
{
|
||||||
|
private const string ModuleId = "25567924238373";
|
||||||
private readonly ISqlSugarRepository<PrdMo> _repository;
|
private readonly ISqlSugarRepository<PrdMo> _repository;
|
||||||
private readonly IDataBaseManager _dataBaseManager;
|
private readonly IDataBaseManager _dataBaseManager;
|
||||||
private readonly IUserManager _userManager;
|
private readonly IUserManager _userManager;
|
||||||
@@ -43,6 +46,7 @@ namespace Tnb.ProductionMgr
|
|||||||
_dataBaseManager = dataBaseManager;
|
_dataBaseManager = dataBaseManager;
|
||||||
_userManager = userManager;
|
_userManager = userManager;
|
||||||
_dictionaryDataService = dictionaryDataService;
|
_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));
|
var obj = (await db.Queryable<PrdMo>().FirstAsync(it => it.id == input.mo_id));
|
||||||
obj.input_qty += entity.scheduled_qty;
|
obj.input_qty += entity.scheduled_qty;
|
||||||
string moStatus = "",icmoStatus="";
|
string moStatus = "", icmoStatus = "";
|
||||||
|
|
||||||
//判断,已排产数量>=计划数量时将状态改为 已排产
|
//判断,已排产数量>=计划数量时将状态改为 已排产
|
||||||
if (obj.input_qty >= obj.plan_qty)
|
if (obj.input_qty >= obj.plan_qty)
|
||||||
@@ -495,5 +499,22 @@ namespace Tnb.ProductionMgr
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#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": {
|
"CorsAccessorSettings": {
|
||||||
"PolicyName": "JNPFCorsAccessor",
|
"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" ]
|
"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();
|
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);
|
if (!(isOK > 0)) throw Oops.Oh(ErrorCode.COM1001);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -184,15 +184,14 @@ public class RunService : IRunService, ITransient
|
|||||||
{
|
{
|
||||||
sql += $" where station_code='{input.station_code}' or station_code=''";
|
sql += $" where station_code='{input.station_code}' or station_code=''";
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (!input.process_code.IsNullOrWhiteSpace())
|
|
||||||
{
|
|
||||||
if (jArr?.FirstOrDefault()?.Value<string>("table") == "bas_process")
|
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);
|
realList = _databaseService.GetInterFaceData(link, sql, input, templateInfo.ColumnData.Adapt<MainBeltViceQueryModel>(), new List<IConditionalModel>(), tableFieldKeyValue);
|
||||||
|
|
||||||
|
|
||||||
@@ -2909,7 +2908,7 @@ public class RunService : IRunService, ITransient
|
|||||||
if (jarr?.Children() != null && jarr?.Children().ToList().Count > 1)
|
if (jarr?.Children() != null && jarr?.Children().ToList().Count > 1)
|
||||||
{
|
{
|
||||||
var values = string.Join(",", jarr.ToList().Select(t => t.Value<string>()));
|
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
|
else
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
<ProjectReference Include="..\..\common\Tnb.Common.Core\Tnb.Common.Core.csproj" />
|
<ProjectReference Include="..\..\common\Tnb.Common.Core\Tnb.Common.Core.csproj" />
|
||||||
<ProjectReference Include="..\..\extend\Tnb.Extend.Interfaces\Tnb.Extend.Interfaces.csproj" />
|
<ProjectReference Include="..\..\extend\Tnb.Extend.Interfaces\Tnb.Extend.Interfaces.csproj" />
|
||||||
<ProjectReference Include="..\..\message\Tnb.Message.Interfaces\Tnb.Message.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" />
|
<ProjectReference Include="..\Tnb.VisualDev.Engine\Tnb.VisualDev.Engine.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using JNPF.Common.Configuration;
|
using System.Data;
|
||||||
|
using JNPF.Common.Configuration;
|
||||||
using JNPF.Common.Const;
|
using JNPF.Common.Const;
|
||||||
using JNPF.Common.Core.Manager;
|
using JNPF.Common.Core.Manager;
|
||||||
using JNPF.Common.Core.Manager.Files;
|
using JNPF.Common.Core.Manager.Files;
|
||||||
@@ -33,6 +34,7 @@ using Microsoft.AspNetCore.Http;
|
|||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using SqlSugar;
|
using SqlSugar;
|
||||||
|
using Tnb.ProductionMgr.Interfaces;
|
||||||
using Yitter.IdGenerator;
|
using Yitter.IdGenerator;
|
||||||
|
|
||||||
namespace JNPF.VisualDev
|
namespace JNPF.VisualDev
|
||||||
@@ -104,6 +106,8 @@ namespace JNPF.VisualDev
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private readonly ITenant _db;
|
private readonly ITenant _db;
|
||||||
|
|
||||||
|
private readonly IPrdMoService _prdMoService;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 初始化一个<see cref="VisualDevModelDataService"/>类型的新实例.
|
/// 初始化一个<see cref="VisualDevModelDataService"/>类型的新实例.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -119,7 +123,8 @@ namespace JNPF.VisualDev
|
|||||||
ICacheManager cacheManager,
|
ICacheManager cacheManager,
|
||||||
IFlowTaskService flowTaskService,
|
IFlowTaskService flowTaskService,
|
||||||
IFileManager fileManager,
|
IFileManager fileManager,
|
||||||
ISqlSugarClient context)
|
ISqlSugarClient context,
|
||||||
|
IPrdMoService prdMoService)
|
||||||
{
|
{
|
||||||
_visualDevRepository = visualDevRepository;
|
_visualDevRepository = visualDevRepository;
|
||||||
_visualDevService = visualDevService;
|
_visualDevService = visualDevService;
|
||||||
@@ -133,6 +138,7 @@ namespace JNPF.VisualDev
|
|||||||
_fileManager = fileManager;
|
_fileManager = fileManager;
|
||||||
_dataInterfaceService = dataInterfaceService;
|
_dataInterfaceService = dataInterfaceService;
|
||||||
_db = context.AsTenant();
|
_db = context.AsTenant();
|
||||||
|
_prdMoService = prdMoService;
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Get
|
#region Get
|
||||||
|
|||||||
Reference in New Issue
Block a user