Merge branch 'dev' of https://git.tuotong-tech.com/tnb/tnb.server into dev
This commit is contained in:
@@ -40,5 +40,10 @@ public partial class WmsCarryCode
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarColumn(IsIgnore = true)]
|
[SugarColumn(IsIgnore = true)]
|
||||||
public int check_conclusion { get; set; }
|
public int check_conclusion { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 出库需求量(临时)
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(IsIgnore = true)]
|
||||||
|
public decimal pr_qty { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ using System.Text;
|
|||||||
using System.Threading.Channels;
|
using System.Threading.Channels;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Aspose.Cells.Drawing;
|
using Aspose.Cells.Drawing;
|
||||||
|
using JavaScriptEngineSwitcher.Core.Extensions;
|
||||||
using JNPF;
|
using JNPF;
|
||||||
using JNPF.Common.Contracts;
|
using JNPF.Common.Contracts;
|
||||||
using JNPF.Common.Core.Manager;
|
using JNPF.Common.Core.Manager;
|
||||||
@@ -27,6 +28,7 @@ using Microsoft.AspNetCore.Mvc;
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using NPOI.HSSF.UserModel;
|
using NPOI.HSSF.UserModel;
|
||||||
|
using NPOI.OpenXmlFormats.Dml;
|
||||||
using NPOI.SS.UserModel;
|
using NPOI.SS.UserModel;
|
||||||
using NPOI.XSSF.UserModel;
|
using NPOI.XSSF.UserModel;
|
||||||
using SqlSugar;
|
using SqlSugar;
|
||||||
@@ -46,7 +48,7 @@ namespace Tnb.WarehouseMgr
|
|||||||
[Route("api/[area]/[controller]/[action]")]
|
[Route("api/[area]/[controller]/[action]")]
|
||||||
public class BaseWareHouseService : IOverideVisualDevService, IDynamicApiController, ITransient
|
public class BaseWareHouseService : IOverideVisualDevService, IDynamicApiController, ITransient
|
||||||
{
|
{
|
||||||
private static Dictionary<string, IWHStorageService> _stroageMap = new(StringComparer.OrdinalIgnoreCase);
|
private static Lazy<Dictionary<string, IWHStorageService>> _stroageMap;
|
||||||
public OverideVisualDevFunc OverideFuncs { get; } = new OverideVisualDevFunc();
|
public OverideVisualDevFunc OverideFuncs { get; } = new OverideVisualDevFunc();
|
||||||
private readonly ChannelWriter<NotifyMessage> _channelWriter;
|
private readonly ChannelWriter<NotifyMessage> _channelWriter;
|
||||||
|
|
||||||
@@ -57,17 +59,24 @@ namespace Tnb.WarehouseMgr
|
|||||||
|
|
||||||
static BaseWareHouseService()
|
static BaseWareHouseService()
|
||||||
{
|
{
|
||||||
var serviceTypes = App.EffectiveTypes.Where(u => u.IsClass && !u.IsInterface && !u.IsAbstract && typeof(IWHStorageService).IsAssignableFrom(u)).ToList();
|
_stroageMap = new Lazy<Dictionary<string, IWHStorageService>>(() =>
|
||||||
foreach (var serviceType in serviceTypes)
|
|
||||||
{
|
{
|
||||||
var callerName = serviceType.GetCustomAttribute<CallerAttribute>()?.Name ?? string.Empty;
|
Dictionary<string, IWHStorageService> map = new(StringComparer.OrdinalIgnoreCase);
|
||||||
if (!callerName.IsNullOrEmpty())
|
var serviceTypes = App.EffectiveTypes.Where(u => u.IsClass && !u.IsInterface && !u.IsAbstract && typeof(IWHStorageService).IsAssignableFrom(u)).ToList();
|
||||||
|
foreach (var serviceType in serviceTypes)
|
||||||
{
|
{
|
||||||
var obj = Activator.CreateInstance(serviceType) as IWHStorageService;
|
var callerName = serviceType.GetCustomAttribute<CallerAttribute>()?.Name ?? string.Empty;
|
||||||
if (obj == null) continue;
|
if (!callerName.IsNullOrEmpty())
|
||||||
_stroageMap[callerName] = obj;
|
{
|
||||||
|
var obj = Activator.CreateInstance(serviceType) as IWHStorageService;
|
||||||
|
if (obj == null) continue;
|
||||||
|
map[callerName] = obj;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
return map;
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Task<ClaimsPrincipal> GetUserIdentity()
|
protected Task<ClaimsPrincipal> GetUserIdentity()
|
||||||
@@ -112,6 +121,9 @@ namespace Tnb.WarehouseMgr
|
|||||||
}
|
}
|
||||||
return Task.FromResult(isMatch);
|
return Task.FromResult(isMatch);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 发布消息
|
/// 发布消息
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -128,9 +140,9 @@ namespace Tnb.WarehouseMgr
|
|||||||
[NonAction]
|
[NonAction]
|
||||||
protected async Task DoUpdate(WareHouseUpInput input)
|
protected async Task DoUpdate(WareHouseUpInput input)
|
||||||
{
|
{
|
||||||
if (_stroageMap.ContainsKey(input.loginType))
|
if (_stroageMap.Value.ContainsKey(input.loginType))
|
||||||
{
|
{
|
||||||
await _stroageMap[input.loginType].Do(input);
|
await _stroageMap.Value[input.loginType].Do(input);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
[NonAction]
|
[NonAction]
|
||||||
|
|||||||
@@ -1,15 +1,18 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Reflection;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Channels;
|
using System.Threading.Channels;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using JNPF.Common.Const;
|
||||||
using JNPF.Common.Core.Manager;
|
using JNPF.Common.Core.Manager;
|
||||||
using JNPF.Common.Dtos.VisualDev;
|
using JNPF.Common.Dtos.VisualDev;
|
||||||
using JNPF.Common.Enums;
|
using JNPF.Common.Enums;
|
||||||
using JNPF.Common.Extension;
|
using JNPF.Common.Extension;
|
||||||
using JNPF.Common.Security;
|
using JNPF.Common.Security;
|
||||||
using JNPF.FriendlyException;
|
using JNPF.FriendlyException;
|
||||||
|
using JNPF.Systems.Entitys.Permission;
|
||||||
using JNPF.Systems.Interfaces.System;
|
using JNPF.Systems.Interfaces.System;
|
||||||
using JNPF.VisualDev;
|
using JNPF.VisualDev;
|
||||||
using JNPF.VisualDev.Entitys;
|
using JNPF.VisualDev.Entitys;
|
||||||
@@ -90,7 +93,6 @@ namespace Tnb.WarehouseMgr
|
|||||||
ePoint = await _db.Queryable<WmsPointH>().FirstAsync(it => it.location_id == endLocations[0].id);
|
ePoint = await _db.Queryable<WmsPointH>().FirstAsync(it => it.location_id == endLocations[0].id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
VisualDevEntity? templateEntity = await _visualDevService.GetInfoById(ModuleConsts.MODULE_CARRYMOVEINSTOCK_ID, true);
|
VisualDevEntity? templateEntity = await _visualDevService.GetInfoById(ModuleConsts.MODULE_CARRYMOVEINSTOCK_ID, true);
|
||||||
await _runService.Create(templateEntity, input);
|
await _runService.Create(templateEntity, input);
|
||||||
|
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ using Tnb.WarehouseMgr.Entities.Dto;
|
|||||||
using Tnb.WarehouseMgr.Entities.Dto.Inputs;
|
using Tnb.WarehouseMgr.Entities.Dto.Inputs;
|
||||||
using Tnb.WarehouseMgr.Entities.Enums;
|
using Tnb.WarehouseMgr.Entities.Enums;
|
||||||
using Tnb.WarehouseMgr.Interfaces;
|
using Tnb.WarehouseMgr.Interfaces;
|
||||||
|
using System.Reflection;
|
||||||
|
|
||||||
namespace Tnb.WarehouseMgr
|
namespace Tnb.WarehouseMgr
|
||||||
{
|
{
|
||||||
@@ -145,6 +146,7 @@ namespace Tnb.WarehouseMgr
|
|||||||
{
|
{
|
||||||
List<WmsCarryMat> carryMats = new();
|
List<WmsCarryMat> carryMats = new();
|
||||||
List<WmsCarryCode> carryCodes = new();
|
List<WmsCarryCode> carryCodes = new();
|
||||||
|
List<WmsCarryCode> carryCodesPart = new();
|
||||||
foreach (var os in outStockDList)
|
foreach (var os in outStockDList)
|
||||||
{
|
{
|
||||||
var OutStockStrategyInput = new OutStockStrategyQuery
|
var OutStockStrategyInput = new OutStockStrategyQuery
|
||||||
@@ -159,9 +161,11 @@ namespace Tnb.WarehouseMgr
|
|||||||
? (a, b) => a.id == input.data[nameof(WmsOutstockH.carry_id)].ToString()
|
? (a, b) => a.id == input.data[nameof(WmsOutstockH.carry_id)].ToString()
|
||||||
: (a, b) => outStkCarrys.Select(x => x.id).Contains(b.carry_id);
|
: (a, b) => outStkCarrys.Select(x => x.id).Contains(b.carry_id);
|
||||||
|
|
||||||
List<WmsCarryCode>? carryCodesPart = await _db.Queryable<WmsCarryH>().InnerJoin<WmsCarryCode>((a, b) => a.id == b.carry_id).InnerJoin<BasLocation>((a, b, c) => a.location_id == c.id)
|
carryCodesPart = await _db.Queryable<WmsCarryH>().InnerJoin<WmsCarryCode>((a, b) => a.id == b.carry_id).InnerJoin<BasLocation>((a, b, c) => a.location_id == c.id)
|
||||||
.Where(whereExp)
|
.Where(whereExp)
|
||||||
.Select<WmsCarryCode>()
|
.Select<WmsCarryCode>()
|
||||||
|
.MergeTable()
|
||||||
|
.OrderBy(it=>it.create_time)
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
|
|
||||||
if (carryCodesPart?.Count > 0)
|
if (carryCodesPart?.Count > 0)
|
||||||
@@ -214,7 +218,7 @@ namespace Tnb.WarehouseMgr
|
|||||||
var sortingOutIds = new List<string>();
|
var sortingOutIds = new List<string>();
|
||||||
foreach (var pair in dic)
|
foreach (var pair in dic)
|
||||||
{
|
{
|
||||||
var codes = carryCodes.FindAll(x => x.carry_id == pair.Key);
|
var codes = carryCodesPart.FindAll(x => x.carry_id == pair.Key);
|
||||||
if (codes?.Count > 0)
|
if (codes?.Count > 0)
|
||||||
{
|
{
|
||||||
if (pair.Value == codes.Sum(d => d.codeqty))
|
if (pair.Value == codes.Sum(d => d.codeqty))
|
||||||
@@ -644,12 +648,12 @@ namespace Tnb.WarehouseMgr
|
|||||||
{
|
{
|
||||||
|
|
||||||
await _db.Ado.BeginTranAsync();
|
await _db.Ado.BeginTranAsync();
|
||||||
var curUser = await GetUserIdentity();
|
|
||||||
var carryId = input.carryIds[^input.carryIds.Count];
|
var carryId = input.carryIds[^input.carryIds.Count];
|
||||||
var carry = await _db.Queryable<WmsCarryH>().SingleAsync(it => it.id == carryId);
|
var carry = await _db.Queryable<WmsCarryH>().SingleAsync(it => it.id == carryId);
|
||||||
if (carry != null)
|
if (carry != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
var otds = await _db.Queryable<WmsOutstockD>().Where(it => it.bill_id == input.requireId).ToListAsync();
|
var otds = await _db.Queryable<WmsOutstockD>().Where(it => it.bill_id == input.requireId).ToListAsync();
|
||||||
var outStatus = carry.out_status.ToEnum<EnumOutStatus>();
|
var outStatus = carry.out_status.ToEnum<EnumOutStatus>();
|
||||||
if (outStatus == EnumOutStatus.全部出)
|
if (outStatus == EnumOutStatus.全部出)
|
||||||
@@ -658,7 +662,7 @@ namespace Tnb.WarehouseMgr
|
|||||||
var carryCodes = await _db.Queryable<WmsCarryCode>().Where(it => it.carry_id == carryId).ToListAsync();
|
var carryCodes = await _db.Queryable<WmsCarryCode>().Where(it => it.carry_id == carryId).ToListAsync();
|
||||||
var outStockCodes = carryCodes.Adapt<List<WmsOutstockCode>>();
|
var outStockCodes = carryCodes.Adapt<List<WmsOutstockCode>>();
|
||||||
|
|
||||||
|
|
||||||
outStockCodes.ForEach(x =>
|
outStockCodes.ForEach(x =>
|
||||||
{
|
{
|
||||||
var billDId = otds?.Find(xx => xx.material_id == x.material_id && xx.code_batch == x.code_batch)?.id;
|
var billDId = otds?.Find(xx => xx.material_id == x.material_id && xx.code_batch == x.code_batch)?.id;
|
||||||
@@ -669,8 +673,8 @@ namespace Tnb.WarehouseMgr
|
|||||||
x.id = SnowflakeIdHelper.NextId();
|
x.id = SnowflakeIdHelper.NextId();
|
||||||
x.bill_id = input.requireId;
|
x.bill_id = input.requireId;
|
||||||
x.bill_d_id = billDId!;
|
x.bill_d_id = billDId!;
|
||||||
x.org_id = _userManager.User?.OrganizeId ?? curUser.FindFirst(ClaimConst.CLAINMORGID)?.Value ?? string.Empty;
|
x.org_id = _userManager.User.OrganizeId;
|
||||||
x.create_id = _userManager.UserId ?? curUser.FindFirst(ClaimConst.CLAINMUSERID)?.Value ?? string.Empty; ;
|
x.create_id = _userManager.UserId;
|
||||||
x.create_time = DateTime.Now;
|
x.create_time = DateTime.Now;
|
||||||
});
|
});
|
||||||
await _db.Insertable(outStockCodes).ExecuteCommandAsync();
|
await _db.Insertable(outStockCodes).ExecuteCommandAsync();
|
||||||
@@ -721,8 +725,8 @@ namespace Tnb.WarehouseMgr
|
|||||||
x.id = SnowflakeIdHelper.NextId();
|
x.id = SnowflakeIdHelper.NextId();
|
||||||
x.bill_id = input.requireId;
|
x.bill_id = input.requireId;
|
||||||
x.bill_d_id = billDId!;
|
x.bill_d_id = billDId!;
|
||||||
x.org_id = _userManager.User?.OrganizeId ?? curUser.FindFirst(ClaimConst.CLAINMORGID)?.Value ?? string.Empty;
|
x.org_id = _userManager.User?.OrganizeId;
|
||||||
x.create_id = _userManager.UserId?? curUser.FindFirst(ClaimConst.CLAINMUSERID)?.Value ?? string.Empty;
|
x.create_id = _userManager.UserId;
|
||||||
x.create_time = DateTime.Now;
|
x.create_time = DateTime.Now;
|
||||||
});
|
});
|
||||||
await _db.Insertable(osCodes).ExecuteCommandAsync();
|
await _db.Insertable(osCodes).ExecuteCommandAsync();
|
||||||
@@ -787,13 +791,13 @@ namespace Tnb.WarehouseMgr
|
|||||||
await _db.Updateable(carryCode).UpdateColumns(it => it.codeqty).ExecuteCommandAsync();
|
await _db.Updateable(carryCode).UpdateColumns(it => it.codeqty).ExecuteCommandAsync();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var row = await _db.Updateable<WmsCarryH>().SetColumns(it => new WmsCarryH { out_status = ((int)EnumOutStatus.正常).ToString() }).Where(it => input.carryIds.Contains(it.id)).ExecuteCommandAsync();
|
|
||||||
await _db.Deleteable<WmsCarryMat>().Where(it => input.carryIds.Contains(it.carry_id)).ExecuteCommandAsync();
|
|
||||||
}
|
}
|
||||||
if (delBarcodes.Count > 0)
|
if (delBarcodes.Count > 0)
|
||||||
{
|
{
|
||||||
await _db.Deleteable<WmsCarryCode>().Where(it => delBarcodes.Contains(it.barcode)).ExecuteCommandAsync();
|
await _db.Deleteable<WmsCarryCode>().Where(it => delBarcodes.Contains(it.barcode)).ExecuteCommandAsync();
|
||||||
}
|
}
|
||||||
|
var row = await _db.Updateable<WmsCarryH>().SetColumns(it => new WmsCarryH { out_status = ((int)EnumOutStatus.正常).ToString() }).Where(it => input.carryIds.Contains(it.id)).ExecuteCommandAsync();
|
||||||
|
await _db.Deleteable<WmsCarryMat>().Where(it => input.carryIds.Contains(it.carry_id)).ExecuteCommandAsync();
|
||||||
//载具移入
|
//载具移入
|
||||||
var outStockH = await _db.Queryable<WmsOutstockH>().SingleAsync(it => it.id == input.requireId);
|
var outStockH = await _db.Queryable<WmsOutstockH>().SingleAsync(it => it.id == input.requireId);
|
||||||
var visulDevInput = new VisualDevModelDataCrInput();
|
var visulDevInput = new VisualDevModelDataCrInput();
|
||||||
@@ -809,6 +813,7 @@ namespace Tnb.WarehouseMgr
|
|||||||
[nameof(WmsMoveInstock.status)] = WmsWareHouseConst.BILLSTATUS_ADD_ID,
|
[nameof(WmsMoveInstock.status)] = WmsWareHouseConst.BILLSTATUS_ADD_ID,
|
||||||
[nameof(WmsHandleH.bill_code)] = _billRullService.GetBillNumber(WmsWareHouseConst.WMS_CARRYMOINSTK_ENCODE).GetAwaiter().GetResult(),
|
[nameof(WmsHandleH.bill_code)] = _billRullService.GetBillNumber(WmsWareHouseConst.WMS_CARRYMOINSTK_ENCODE).GetAwaiter().GetResult(),
|
||||||
};
|
};
|
||||||
|
|
||||||
await _wmsCarryMoveInStockService.CarryMoveIn(visulDevInput);
|
await _wmsCarryMoveInStockService.CarryMoveIn(visulDevInput);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,12 +3,14 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using JNPF.Common.Const;
|
||||||
using JNPF.Common.Core.Manager;
|
using JNPF.Common.Core.Manager;
|
||||||
using JNPF.Common.Dtos.VisualDev;
|
using JNPF.Common.Dtos.VisualDev;
|
||||||
using JNPF.Common.Enums;
|
using JNPF.Common.Enums;
|
||||||
using JNPF.Common.Extension;
|
using JNPF.Common.Extension;
|
||||||
using JNPF.Common.Security;
|
using JNPF.Common.Security;
|
||||||
using JNPF.FriendlyException;
|
using JNPF.FriendlyException;
|
||||||
|
using JNPF.Systems.Entitys.Permission;
|
||||||
using JNPF.Systems.Interfaces.System;
|
using JNPF.Systems.Interfaces.System;
|
||||||
using JNPF.VisualDev;
|
using JNPF.VisualDev;
|
||||||
using JNPF.VisualDev.Entitys;
|
using JNPF.VisualDev.Entitys;
|
||||||
@@ -63,6 +65,107 @@ namespace Tnb.WarehouseMgr
|
|||||||
private async Task<dynamic> PDACarryMoveIn(VisualDevModelDataCrInput input)
|
private async Task<dynamic> PDACarryMoveIn(VisualDevModelDataCrInput input)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
#region old
|
||||||
|
//try
|
||||||
|
//{
|
||||||
|
// await _db.Ado.BeginTranAsync();
|
||||||
|
|
||||||
|
// //入库取终点 //出库起点
|
||||||
|
// var inStockStrategyInput = new InStockStrategyQuery { warehouse_id = input.data[nameof(InStockStrategyQuery.warehouse_id)].ToString()!, Size = 1 };
|
||||||
|
// var endLocations = await _wareHouseService.InStockStrategy(inStockStrategyInput);
|
||||||
|
// WmsPointH sPoint = null!;
|
||||||
|
// WmsPointH ePoint = null!;
|
||||||
|
// if (input.data.ContainsKey(nameof(WmsPointH.location_id)))
|
||||||
|
// {
|
||||||
|
// sPoint = await _db.Queryable<WmsPointH>().FirstAsync(it => it.location_id == input.data[nameof(WmsPointH.location_id)].ToString());
|
||||||
|
// }
|
||||||
|
// if (endLocations?.Count > 0)
|
||||||
|
// {
|
||||||
|
// var carry = await _db.Queryable<WmsCarryH>().SingleAsync(it => it.id == input.data[nameof(WmsCarryD.carry_id)].ToString());
|
||||||
|
// var loc = await _db.Queryable<BasLocation>().SingleAsync(it => it.id == endLocations[0].id);
|
||||||
|
// var isMatch = await IsCarryAndLocationMatchByCarryStd(carry, loc);
|
||||||
|
// if (!isMatch) throw new AppFriendlyException("库位与载具规格不匹配", 500);
|
||||||
|
// ePoint = await _db.Queryable<WmsPointH>().FirstAsync(it => it.location_id == endLocations[0].id);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// VisualDevEntity? templateEntity = await _visualDevService.GetInfoById(ModuleId, true);
|
||||||
|
// await _runService.Create(templateEntity, input);
|
||||||
|
|
||||||
|
// if (sPoint != null && ePoint != null)
|
||||||
|
// {
|
||||||
|
// var points = await _wareHouseService.PathAlgorithms(sPoint.id, ePoint.id);
|
||||||
|
// //根据获取的路径点生成预任务,生成顺序必须预路径算法返回的起终点的顺序一致(预任务顺序)
|
||||||
|
// if (points?.Count > 0)
|
||||||
|
// {
|
||||||
|
// if (points.Count <= 2) throw new AppFriendlyException("该路径不存在", 500);
|
||||||
|
// var preTasks = points.Where(it => !it.location_id.IsNullOrEmpty()).GroupBy(g => g.area_code).Select(it =>
|
||||||
|
// {
|
||||||
|
// var sPoint = it.FirstOrDefault();
|
||||||
|
// var ePoint = it.LastOrDefault();
|
||||||
|
|
||||||
|
// WmsPretaskH preTask = new();
|
||||||
|
// preTask.org_id = _userManager.User.OrganizeId;
|
||||||
|
// preTask.startlocation_id = sPoint?.location_id!;
|
||||||
|
// preTask.startlocation_code = sPoint?.location_code!;
|
||||||
|
// preTask.endlocation_id = ePoint?.location_id!;
|
||||||
|
// preTask.endlocation_code = ePoint?.location_code!;
|
||||||
|
// preTask.start_floor = sPoint?.floor.ToString();
|
||||||
|
// preTask.end_floor = ePoint?.floor.ToString();
|
||||||
|
// preTask.startpoint_id = sPoint?.id!;
|
||||||
|
// preTask.startpoint_code = sPoint?.point_code!;
|
||||||
|
// preTask.endpoint_id = ePoint?.id!;
|
||||||
|
// preTask.endpoint_code = ePoint?.point_code!;
|
||||||
|
// preTask.bill_code = _billRullService.GetBillNumber(WmsWareHouseConst.WMS_PRETASK_H_ENCODE).GetAwaiter().GetResult();
|
||||||
|
// preTask.status = WmsWareHouseConst.PRETASK_BILL_STATUS_DXF_ID;
|
||||||
|
// preTask.biz_type = WmsWareHouseConst.BIZTYPE_CARRYMOVEINSTOCK_ID;
|
||||||
|
// preTask.task_type = WmsWareHouseConst.WMS_PRETASK_INSTOCK_TYPE_ID;
|
||||||
|
// preTask.carry_id = input.data[nameof(preTask.carry_id)]?.ToString()!;
|
||||||
|
// preTask.carry_code = input.data[nameof(preTask.carry_code)]?.ToString()!;
|
||||||
|
// preTask.area_id = sPoint?.area_id!;
|
||||||
|
// preTask.area_code = it.Key;
|
||||||
|
// preTask.require_id = input.data["ReturnIdentity"].ToString();
|
||||||
|
// preTask.require_code = input.data[nameof(preTask.bill_code)]?.ToString()!;
|
||||||
|
// preTask.create_id = _userManager.UserId;
|
||||||
|
// preTask.create_time = DateTime.Now;
|
||||||
|
// return preTask;
|
||||||
|
// }).ToList();
|
||||||
|
// var isOk = await _wareHouseService.GenPreTask(preTasks, null!);
|
||||||
|
// if (isOk)
|
||||||
|
// {
|
||||||
|
// var preTaskUpInput = new GenPreTaskUpInput();
|
||||||
|
// preTaskUpInput.RquireId = input.data["ReturnIdentity"].ToString()!;
|
||||||
|
// preTaskUpInput.CarryId = input.data[nameof(WmsCarryD.carry_id)]?.ToString()!;
|
||||||
|
// preTaskUpInput.CarryStartLocationId = points.FirstOrDefault()!.location_id!;
|
||||||
|
// preTaskUpInput.CarryStartLocationCode = points.FirstOrDefault()!.location_code!;
|
||||||
|
// preTaskUpInput.LocationIds = points.Select(x => x.location_id).ToList()!;
|
||||||
|
// preTaskUpInput.PreTaskRecords = preTasks.Adapt<List<WmsHandleH>>();
|
||||||
|
// preTaskUpInput.PreTaskRecords.ForEach(x => x.id = SnowflakeIdHelper.NextId());
|
||||||
|
// //根据载具移入Id,回更单据状态
|
||||||
|
// await _db.Updateable<WmsMoveInstock>().SetColumns(it => new WmsMoveInstock { status = WmsWareHouseConst.BILLSTATUS_ON_ID }).Where(it => it.id == preTaskUpInput.RquireId).ExecuteCommandAsync();
|
||||||
|
|
||||||
|
// await _wareHouseService.GenInStockTaskHandleAfter(preTaskUpInput,
|
||||||
|
// it => new WmsCarryH { is_lock = 1, location_id = preTaskUpInput.CarryStartLocationId, location_code = preTaskUpInput.CarryStartLocationCode },
|
||||||
|
// it => new BasLocation { is_lock = 1 });
|
||||||
|
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
|
// await _db.Ado.CommitTranAsync();
|
||||||
|
//}
|
||||||
|
//catch (Exception)
|
||||||
|
//{
|
||||||
|
// await _db.Ado.RollbackTranAsync();
|
||||||
|
// throw;
|
||||||
|
//}
|
||||||
|
//finally
|
||||||
|
//{
|
||||||
|
// await Publish(nameof(IWareHouseService.GenTaskExecute));
|
||||||
|
//}
|
||||||
|
//return Task.FromResult(true);
|
||||||
|
#endregion
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
await _db.Ado.BeginTranAsync();
|
await _db.Ado.BeginTranAsync();
|
||||||
@@ -85,9 +188,11 @@ namespace Tnb.WarehouseMgr
|
|||||||
ePoint = await _db.Queryable<WmsPointH>().FirstAsync(it => it.location_id == endLocations[0].id);
|
ePoint = await _db.Queryable<WmsPointH>().FirstAsync(it => it.location_id == endLocations[0].id);
|
||||||
}
|
}
|
||||||
|
|
||||||
VisualDevEntity? templateEntity = await _visualDevService.GetInfoById(ModuleId, true);
|
|
||||||
|
VisualDevEntity? templateEntity = await _visualDevService.GetInfoById(ModuleConsts.MODULE_CARRYMOVEINSTOCK_ID, true);
|
||||||
await _runService.Create(templateEntity, input);
|
await _runService.Create(templateEntity, input);
|
||||||
|
|
||||||
|
|
||||||
if (sPoint != null && ePoint != null)
|
if (sPoint != null && ePoint != null)
|
||||||
{
|
{
|
||||||
var points = await _wareHouseService.PathAlgorithms(sPoint.id, ePoint.id);
|
var points = await _wareHouseService.PathAlgorithms(sPoint.id, ePoint.id);
|
||||||
@@ -101,7 +206,7 @@ namespace Tnb.WarehouseMgr
|
|||||||
var ePoint = it.LastOrDefault();
|
var ePoint = it.LastOrDefault();
|
||||||
|
|
||||||
WmsPretaskH preTask = new();
|
WmsPretaskH preTask = new();
|
||||||
preTask.org_id = _userManager.User.OrganizeId;
|
preTask.org_id = _userManager.User.OrganizeId!;
|
||||||
preTask.startlocation_id = sPoint?.location_id!;
|
preTask.startlocation_id = sPoint?.location_id!;
|
||||||
preTask.startlocation_code = sPoint?.location_code!;
|
preTask.startlocation_code = sPoint?.location_code!;
|
||||||
preTask.endlocation_id = ePoint?.location_id!;
|
preTask.endlocation_id = ePoint?.location_id!;
|
||||||
@@ -135,18 +240,28 @@ namespace Tnb.WarehouseMgr
|
|||||||
preTaskUpInput.CarryStartLocationId = points.FirstOrDefault()!.location_id!;
|
preTaskUpInput.CarryStartLocationId = points.FirstOrDefault()!.location_id!;
|
||||||
preTaskUpInput.CarryStartLocationCode = points.FirstOrDefault()!.location_code!;
|
preTaskUpInput.CarryStartLocationCode = points.FirstOrDefault()!.location_code!;
|
||||||
preTaskUpInput.LocationIds = points.Select(x => x.location_id).ToList()!;
|
preTaskUpInput.LocationIds = points.Select(x => x.location_id).ToList()!;
|
||||||
preTaskUpInput.PreTaskRecords = preTasks.Adapt<List<WmsHandleH>>();
|
|
||||||
preTaskUpInput.PreTaskRecords.ForEach(x => x.id = SnowflakeIdHelper.NextId());
|
WmsHandleH handleH = new();
|
||||||
|
handleH.org_id = _userManager.User.OrganizeId;
|
||||||
|
handleH.startlocation_id = input.data[nameof(WmsPointH.location_id)]?.ToString()!;
|
||||||
|
handleH.endlocation_id = endLocations![0].id;
|
||||||
|
handleH.bill_code = input.data[nameof(WmsHandleH.bill_code)]?.ToString()!;
|
||||||
|
handleH.biz_type = input.data[nameof(WmsHandleH.biz_type)]?.ToString()!;
|
||||||
|
handleH.carry_id = input.data[nameof(WmsHandleH.carry_id)]?.ToString()!;
|
||||||
|
handleH.carry_code = input.data[nameof(WmsHandleH.carry_code)]?.ToString()!;
|
||||||
|
handleH.require_id = input.data["ReturnIdentity"].ToString();
|
||||||
|
handleH.require_code = input.data[nameof(WmsHandleH.bill_code)]?.ToString()!;
|
||||||
|
handleH.create_id = _userManager.UserId ;
|
||||||
|
handleH.create_time = DateTime.Now;
|
||||||
|
preTaskUpInput.PreTaskRecord = handleH;
|
||||||
//根据载具移入Id,回更单据状态
|
//根据载具移入Id,回更单据状态
|
||||||
await _db.Updateable<WmsMoveInstock>().SetColumns(it => new WmsMoveInstock { status = WmsWareHouseConst.BILLSTATUS_ON_ID }).Where(it => it.id == preTaskUpInput.RquireId).ExecuteCommandAsync();
|
await _db.Updateable<WmsMoveInstock>().SetColumns(it => new WmsMoveInstock { status = WmsWareHouseConst.BILLSTATUS_ON_ID }).Where(it => it.id == preTaskUpInput.RquireId).ExecuteCommandAsync();
|
||||||
|
|
||||||
await _wareHouseService.GenInStockTaskHandleAfter(preTaskUpInput,
|
await _wareHouseService.GenInStockTaskHandleAfter(preTaskUpInput,
|
||||||
it => new WmsCarryH { is_lock = 1, location_id = preTaskUpInput.CarryStartLocationId, location_code = preTaskUpInput.CarryStartLocationCode },
|
it => new WmsCarryH { is_lock = 1, location_id = preTaskUpInput.CarryStartLocationId, location_code = preTaskUpInput.CarryStartLocationCode },
|
||||||
it => new BasLocation { is_lock = 1 });
|
it => new BasLocation { is_lock = 1 });
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
await _db.Ado.CommitTranAsync();
|
await _db.Ado.CommitTranAsync();
|
||||||
@@ -158,9 +273,11 @@ namespace Tnb.WarehouseMgr
|
|||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
|
//向队列写入消息
|
||||||
await Publish(nameof(IWareHouseService.GenTaskExecute));
|
await Publish(nameof(IWareHouseService.GenTaskExecute));
|
||||||
}
|
}
|
||||||
return Task.FromResult(true);
|
return Task.FromResult(true);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override async Task ModifyAsync(WareHouseUpInput input)
|
public override async Task ModifyAsync(WareHouseUpInput input)
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ using System.Linq.Expressions;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using JNPF.Common.Contracts;
|
using JNPF.Common.Contracts;
|
||||||
|
using JNPF.Common.Core.Manager;
|
||||||
using JNPF.Common.Enums;
|
using JNPF.Common.Enums;
|
||||||
using JNPF.Common.Extension;
|
using JNPF.Common.Extension;
|
||||||
using JNPF.FriendlyException;
|
using JNPF.FriendlyException;
|
||||||
@@ -33,12 +34,14 @@ namespace Tnb.WarehouseMgr
|
|||||||
private readonly IDictionaryDataService _dictionaryDataService;
|
private readonly IDictionaryDataService _dictionaryDataService;
|
||||||
private readonly IWmsCarryMoveInStockService _wmsCarryMoveInStockService;
|
private readonly IWmsCarryMoveInStockService _wmsCarryMoveInStockService;
|
||||||
private static Dictionary<string, object> _dicBizType = new();
|
private static Dictionary<string, object> _dicBizType = new();
|
||||||
public WmsSignForDeliveryService(ISqlSugarRepository<WmsDistaskH> repository, IWmsCarryService wareCarryService, IDictionaryDataService dictionaryDataService, IWmsCarryMoveInStockService wmsCarryMoveInStockService)
|
private readonly IUserManager _userManager;
|
||||||
|
public WmsSignForDeliveryService(ISqlSugarRepository<WmsDistaskH> repository, IWmsCarryService wareCarryService, IDictionaryDataService dictionaryDataService, IWmsCarryMoveInStockService wmsCarryMoveInStockService, IUserManager userManager)
|
||||||
{
|
{
|
||||||
_db = repository.AsSugarClient();
|
_db = repository.AsSugarClient();
|
||||||
_wareCarryService = wareCarryService;
|
_wareCarryService = wareCarryService;
|
||||||
_dictionaryDataService = dictionaryDataService;
|
_dictionaryDataService = dictionaryDataService;
|
||||||
_wmsCarryMoveInStockService = wmsCarryMoveInStockService;
|
_wmsCarryMoveInStockService = wmsCarryMoveInStockService;
|
||||||
|
_userManager = userManager;
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 根据载具ID获取,对应的执行任务记录
|
/// 根据载具ID获取,对应的执行任务记录
|
||||||
|
|||||||
@@ -115,8 +115,8 @@ public class Startup : AppStartup
|
|||||||
|
|
||||||
SnowflakeIdHelper.InitYitIdWorker();
|
SnowflakeIdHelper.InitYitIdWorker();
|
||||||
|
|
||||||
//bool isStartTimeJob = App.GetConfig<bool>("IsStartTimeJob");
|
bool isStartTimeJob = App.GetConfig<bool>("IsStartTimeJob");
|
||||||
//if (isStartTimeJob)
|
if (isStartTimeJob)
|
||||||
// serviceProvider.GetRequiredService<ITimeTaskService>().StartTimerJob();
|
serviceProvider.GetRequiredService<ITimeTaskService>().StartTimerJob();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -70,12 +70,13 @@ public partial class UserManager : IUserManager, IScoped
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 用户信息.
|
/// 用户信息.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public UserEntity User
|
public UserEntity User
|
||||||
{
|
{
|
||||||
get => _repository.GetSingle(u => u.Id == UserId);
|
get =>_repository.GetSingle(u => u.Id == UserId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -21,7 +21,8 @@ namespace JNPF.Common.Core.Manager;
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 用户管理 .
|
/// 用户管理 .
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class UserManager
|
public partial class UserManager
|
||||||
{
|
{
|
||||||
public static string AsscessToken { get; set; }
|
public static string AsscessToken { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -78,4 +78,12 @@ public interface IOrganizeService
|
|||||||
/// <param name="id"></param>
|
/// <param name="id"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task<List<string>> GetChildOrgId(string id);
|
Task<List<string>> GetChildOrgId(string id);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 根据工位id获取其任意上级
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id"></param>
|
||||||
|
/// <param name="type"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<OrganizeEntity> GetAnyParentByWorkstationId(string id,string type);
|
||||||
}
|
}
|
||||||
@@ -19,6 +19,7 @@ using JNPF.Systems.Interfaces.System;
|
|||||||
using Mapster;
|
using Mapster;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using SqlSugar;
|
using SqlSugar;
|
||||||
|
using Tnb.BasicData;
|
||||||
using Yitter.IdGenerator;
|
using Yitter.IdGenerator;
|
||||||
|
|
||||||
namespace JNPF.Systems;
|
namespace JNPF.Systems;
|
||||||
@@ -835,6 +836,14 @@ public class OrganizeService : IOrganizeService, IDynamicApiController, ITransie
|
|||||||
return (await _repository.GetListAsync(x => x.OrganizeIdTree.Contains(id) && x.EnabledMark == 1 && x.DeleteMark == null)).Select(x => x.Id).ToList();
|
return (await _repository.GetListAsync(x => x.OrganizeIdTree.Contains(id) && x.EnabledMark == 1 && x.DeleteMark == null)).Select(x => x.Id).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async Task<OrganizeEntity> GetAnyParentByWorkstationId(string id, string type)
|
||||||
|
{
|
||||||
|
return await _repository.AsQueryable()
|
||||||
|
.LeftJoin<OrganizeEntity>((a,b)=>a.OrganizeIdTree.Contains(b.Id) && b.Category==type)
|
||||||
|
.Where((a,b)=>a.Id==id)
|
||||||
|
.Select((a,b)=>b).FirstAsync();
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 处理组织树 名称.
|
/// 处理组织树 名称.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
namespace JNPF.TaskScheduler.Interfaces.TaskScheduler;
|
using JNPF.TaskScheduler.Entitys;
|
||||||
|
|
||||||
|
namespace JNPF.TaskScheduler.Interfaces.TaskScheduler;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 定时任务
|
/// 定时任务
|
||||||
@@ -13,4 +15,6 @@ public interface ITimeTaskService
|
|||||||
/// 启动自启动任务.
|
/// 启动自启动任务.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
void StartTimerJob();
|
void StartTimerJob();
|
||||||
|
|
||||||
|
List<TimeTaskEntity> GetTasks();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ using JNPF.Common.Security;
|
|||||||
using JNPF.Systems.Entitys.System;
|
using JNPF.Systems.Entitys.System;
|
||||||
using JNPF.TaskScheduler;
|
using JNPF.TaskScheduler;
|
||||||
using JNPF.TaskScheduler.Entitys.Model;
|
using JNPF.TaskScheduler.Entitys.Model;
|
||||||
|
using JNPF.TaskScheduler.Interfaces.TaskScheduler;
|
||||||
using SqlSugar;
|
using SqlSugar;
|
||||||
using Tnb.EquipMgr.Entities;
|
using Tnb.EquipMgr.Entities;
|
||||||
using Tnb.ProductionMgr.Entities;
|
using Tnb.ProductionMgr.Entities;
|
||||||
@@ -19,12 +20,14 @@ namespace Tnb.TaskScheduler.Listener
|
|||||||
public class MoldMaintainTask : ISpareTimeWorker
|
public class MoldMaintainTask : ISpareTimeWorker
|
||||||
{
|
{
|
||||||
private ISqlSugarRepository<ToolMoldMaintainRule> repository => App.GetService<ISqlSugarRepository<ToolMoldMaintainRule>>();
|
private ISqlSugarRepository<ToolMoldMaintainRule> repository => App.GetService<ISqlSugarRepository<ToolMoldMaintainRule>>();
|
||||||
|
private ITimeTaskService timeTaskService => App.GetService<ITimeTaskService>();
|
||||||
[SpareTime("0 0 0 * * ?", "生成模具保养任务", ExecuteType = SpareTimeExecuteTypes.Serial, StartNow = false)]
|
[SpareTime("0 0 0 * * ?", "生成模具保养任务", ExecuteType = SpareTimeExecuteTypes.Serial, StartNow = false)]
|
||||||
public async void CreateTask(SpareTimer timer, long count)
|
public async void CreateTask(SpareTimer timer, long count)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var timeTaskEntity = await repository.AsSugarClient().Queryable<TimeTaskEntity>().Where(p => p.Id == timer.WorkerName && p.EnabledMark == 1).FirstAsync();
|
var TimeTasks = timeTaskService.GetTasks();
|
||||||
|
var timeTaskEntity = TimeTasks.Where(p => p.Id == timer.WorkerName && p.EnabledMark == 1).First();
|
||||||
if (timeTaskEntity == null)
|
if (timeTaskEntity == null)
|
||||||
return;
|
return;
|
||||||
ContentModel? comtentModel = timeTaskEntity.ExecuteContent.ToObject<ContentModel>();
|
ContentModel? comtentModel = timeTaskEntity.ExecuteContent.ToObject<ContentModel>();
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ using JNPF.Systems.Entitys.System;
|
|||||||
using JNPF.TaskScheduler;
|
using JNPF.TaskScheduler;
|
||||||
using JNPF.TaskScheduler.Entitys;
|
using JNPF.TaskScheduler.Entitys;
|
||||||
using JNPF.TaskScheduler.Entitys.Model;
|
using JNPF.TaskScheduler.Entitys.Model;
|
||||||
|
using JNPF.TaskScheduler.Interfaces.TaskScheduler;
|
||||||
using SqlSugar;
|
using SqlSugar;
|
||||||
using Tnb.BasicData.Entities;
|
using Tnb.BasicData.Entities;
|
||||||
using Tnb.EquipMgr.Entities;
|
using Tnb.EquipMgr.Entities;
|
||||||
@@ -25,13 +26,14 @@ namespace Tnb.TaskScheduler.Listener
|
|||||||
public class QcTaskTimeWorker : ISpareTimeWorker
|
public class QcTaskTimeWorker : ISpareTimeWorker
|
||||||
{
|
{
|
||||||
private ISqlSugarRepository<QcCheckPlanH> repository => App.GetService<ISqlSugarRepository<QcCheckPlanH>>();
|
private ISqlSugarRepository<QcCheckPlanH> repository => App.GetService<ISqlSugarRepository<QcCheckPlanH>>();
|
||||||
|
private ITimeTaskService timeTaskService => App.GetService<ITimeTaskService>();
|
||||||
[SpareTime("0 0 0 * * ?", "生成质检任务", ExecuteType = SpareTimeExecuteTypes.Serial, StartNow = false)]
|
[SpareTime("0 0 0 * * ?", "生成质检任务", ExecuteType = SpareTimeExecuteTypes.Serial, StartNow = false)]
|
||||||
public async void CreateTask(SpareTimer timer, long count)
|
public async void CreateTask(SpareTimer timer, long count)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var timeTaskEntity = await repository.AsSugarClient().Queryable<TimeTaskEntity>().Where(p => p.Id == timer.WorkerName && p.EnabledMark == 1).FirstAsync();
|
var TimeTasks = timeTaskService.GetTasks();
|
||||||
|
var timeTaskEntity = TimeTasks.Where(p => p.Id == timer.WorkerName && p.EnabledMark == 1).First();
|
||||||
if (timeTaskEntity == null)
|
if (timeTaskEntity == null)
|
||||||
return;
|
return;
|
||||||
ContentModel? comtentModel = timeTaskEntity.ExecuteContent.ToObject<ContentModel>();
|
ContentModel? comtentModel = timeTaskEntity.ExecuteContent.ToObject<ContentModel>();
|
||||||
|
|||||||
@@ -136,6 +136,12 @@ public class TimeTaskService : ITimeTaskService, IDynamicApiController, ITransie
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Post
|
#region Post
|
||||||
|
public List<TimeTaskEntity> GetTasks()
|
||||||
|
{
|
||||||
|
var list= _repository.AsQueryable().ToList();
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 新建.
|
/// 新建.
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
using JNPF.Common.Configuration;
|
using JNPF.Common.Configuration;
|
||||||
using JNPF.Systems.Entitys.Dto.Database;
|
|
||||||
using JNPF;
|
using JNPF;
|
||||||
using Mapster;
|
using Mapster;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
|
using JNPF.Common.Configuration;
|
||||||
using Tnb.Core;
|
using Tnb.Core;
|
||||||
|
|
||||||
namespace Tnb.Vengine;
|
namespace Tnb.Vengine;
|
||||||
@@ -26,7 +27,7 @@ public class TemplateContext
|
|||||||
#if DEBUG
|
#if DEBUG
|
||||||
BasePath = CodeHelper.GetSolutionDirectoryPath(false)!;
|
BasePath = CodeHelper.GetSolutionDirectoryPath(false)!;
|
||||||
#else
|
#else
|
||||||
BasePath = EApp.Options.App.AcmenBasePath;
|
BasePath = FileVariable.GenerateCodePath;
|
||||||
#endif
|
#endif
|
||||||
ModuleCode = moduleCode;
|
ModuleCode = moduleCode;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user