生产退料开发等

This commit is contained in:
2024-06-27 11:15:07 +08:00
parent 1765ebedc4
commit 8177d05cd2
17 changed files with 788 additions and 159 deletions

View File

@@ -0,0 +1,72 @@
using JNPF.Common.Contracts;
using JNPF.Common.Security;
using SqlSugar;
namespace Tnb.WarehouseMgr.Entities.Entity;
/// <summary>
/// wms生产退料单明细
/// </summary>
[SugarTable("wms_prd_return_d")]
public partial class WmsPrdReturnD : BaseEntity<string>
{
public WmsPrdReturnD()
{
id = SnowflakeIdHelper.NextId();
}
/// <summary>
/// 创建用户
/// </summary>
public string? create_id { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public DateTime? create_time { get; set; }
/// <summary>
/// 修改用户
/// </summary>
public string? modify_id { get; set; }
/// <summary>
/// 修改时间
/// </summary>
public DateTime? modify_time { get; set; }
/// <summary>
/// 生产退料单id
/// </summary>
public string? bill_id { get; set; }
/// <summary>
/// 物料
/// </summary>
public string? material_id { get; set; }
/// <summary>
/// 物料编码
/// </summary>
public string? material_code { get; set; }
/// <summary>
/// 物料名称
/// </summary>
public string? material_name { get; set; }
/// <summary>
/// 数量
/// </summary>
public decimal? qty { get; set; }
/// <summary>
/// 已退料数量
/// </summary>
public decimal? ytqty { get; set; }
/// <summary>
/// 单位
/// </summary>
public string? unit_id { get; set; }
}

View File

@@ -0,0 +1,67 @@
using JNPF.Common.Contracts;
using JNPF.Common.Security;
using SqlSugar;
namespace Tnb.WarehouseMgr.Entities.Entity;
/// <summary>
/// wms生产退料单
/// </summary>
[SugarTable("wms_prd_return_h")]
public partial class WmsPrdReturnH : BaseEntity<string>
{
public WmsPrdReturnH()
{
id = SnowflakeIdHelper.NextId();
}
/// <summary>
/// 载具
/// </summary>
public string? carry_id { get; set; }
/// <summary>
/// 载具编码
/// </summary>
public string? carry_code { get; set; }
/// <summary>
/// 载具规格
/// </summary>
public string? carrystd_id { get; set; }
/// <summary>
/// 创建用户
/// </summary>
public string? create_id { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public DateTime? create_time { get; set; }
/// <summary>
/// 修改用户
/// </summary>
public string? modify_id { get; set; }
/// <summary>
/// 修改时间
/// </summary>
public DateTime? modify_time { get; set; }
/// <summary>
/// 入库仓库
/// </summary>
public string? warehouse_id { get; set; }
/// <summary>
/// 生产退料单号
/// </summary>
public string? bill_code { get; set; }
/// <summary>
/// 单据状态
/// </summary>
public string? status { get; set; }
}

View File

@@ -15,6 +15,7 @@ using Tnb.EquipMgr.Entities;
using Tnb.ProductionMgr.Entities;
using Tnb.ProductionMgr.Entities.Dto;
using Tnb.ProductionMgr.Interfaces;
using Tnb.WarehouseMgr;
using Tnb.WarehouseMgr.Entities;
using Tnb.WarehouseMgr.Entities.Dto.Inputs;
using Tnb.WarehouseMgr.Interfaces;
@@ -34,6 +35,7 @@ namespace Tnb.ProductionMgr
private readonly IBillRullService _billRullService;
private readonly IDictionaryDataService _dictionaryDataService;
private readonly IWmsCarryBindService _wmsCarryBindService;
private readonly IWmsCarryUnbindService _wmsCarryUnbindService;
// private readonly WmsSignForDeliveryService _wmsSignForDeliveryService;
@@ -45,6 +47,7 @@ namespace Tnb.ProductionMgr
// WmsSignForDeliveryService wmsSignForDeliveryService,
IDictionaryDataService dictionaryDataService,
IWmsCarryBindService wmsCarryBindService,
IWmsCarryUnbindService wmsCarryUnbindService,
IUserManager userManager
)
{
@@ -55,6 +58,7 @@ namespace Tnb.ProductionMgr
_dictionaryDataService = dictionaryDataService;
_billRullService = billRullService;
_wmsCarryBindService = wmsCarryBindService;
_wmsCarryUnbindService = wmsCarryUnbindService;
}
@@ -457,7 +461,7 @@ namespace Tnb.ProductionMgr
_ = await db.Insertable<PrdFeedingH>(prdFeedingH).ExecuteCommandAsync();
_ = await db.Insertable<PrdFeedingD>(list).ExecuteCommandAsync();
_wmsCarryBindService.CarryCodeUnbind(new CarryCodeUnbindInput()
_wmsCarryUnbindService.CarryCodeUnbind(new CarryCodeUnbindInput()
{
carry_id = carry.id
});

View File

@@ -106,6 +106,7 @@ namespace Tnb.ProductionMgr
private readonly IBillRullService _billRullService;
private readonly IWareHouseService _wareHouseService;
private readonly IWmsCarryBindService _wmsCarryBindService;
private readonly IWmsCarryUnbindService _wmsCarryUnbindService;
private readonly IWmsEmptyOutstockService _wmsEmptyOutstockService;
private readonly ElevatorControlConfiguration _eleCtlCfg = App.Configuration.Build<ElevatorControlConfiguration>();
@@ -114,7 +115,8 @@ namespace Tnb.ProductionMgr
#region
public RedisBackGround(StackExRedisHelper redisData, IPrdInstockService prdInstockService, ISqlSugarRepository<RedisReadConfig> repository, IWmsPDAScanInStockService wmsPDAScanInStock
, IUserManager userManager, IBillRullService billRullService, IWareHouseService wareHouseService, IWmsCarryBindService wmsCarryBindService, IWmsEmptyOutstockService wmsEmptyOutstockService)
, IUserManager userManager, IBillRullService billRullService, IWareHouseService wareHouseService, IWmsCarryBindService wmsCarryBindService,
IWmsCarryUnbindService wmsCarryUnbindService, IWmsEmptyOutstockService wmsEmptyOutstockService)
{
_redisData = redisData;
_prdInstockService = prdInstockService;
@@ -125,6 +127,7 @@ namespace Tnb.ProductionMgr
_wareHouseService = wareHouseService;
_wmsCarryBindService = wmsCarryBindService;
_wmsEmptyOutstockService = wmsEmptyOutstockService;
_wmsCarryUnbindService = wmsCarryUnbindService;
db_CheckGettimer = repository.CopyNew();
db_Scantimer = repository.CopyNew();
@@ -1456,7 +1459,7 @@ where carry_code = '{coderesult}' and status = '{WmsWareHouseConst.TASK_BILL_STA
carryBindInput.carry_code = wmsMechanicalArmH.rackcode;
carryBindInput.source_code = wmsMechanicalArmH.outbill;
await _wmsCarryBindService.CarryUnbind(carryBindInput);
await _wmsCarryUnbindService.CarryUnbind(carryBindInput);
// 锁住终点库位
await db_Floor2timer移走下升降区未生成预任务且空托的料架.Updateable<BasLocation>(r => new BasLocation