This commit is contained in:
2024-08-22 14:08:16 +08:00
parent 4ce0a58715
commit 27e67dadf3
29 changed files with 758 additions and 184 deletions

View File

@@ -28,6 +28,7 @@ using Tnb.WarehouseMgr.Entities.Dto;
using Tnb.WarehouseMgr.Entities.Dto.Inputs;
using Tnb.WarehouseMgr.Interfaces;
using Tnb.WarehouseMgr.Entities.Dto.Outputs;
using Tnb.BasicData.Interfaces;
namespace Tnb.ProductionMgr
{
@@ -46,6 +47,7 @@ namespace Tnb.ProductionMgr
private readonly IBillRullService _billRullService;
private readonly IPrdMoTaskService _prdMoTaskService;
private readonly IWmsCarryQueryService _wmsCarryQueryService;
private readonly IBasWorkgroupService _basWorkgroupService;
public PrdMaterialReceiptService(
ISqlSugarRepository<PrdMaterialReceiptH> repository,
@@ -53,6 +55,7 @@ namespace Tnb.ProductionMgr
IOrganizeService organizeService,
IPrdMoTaskService prdMoTaskService,
IWmsCarryQueryService wmsCarryQueryService,
IBasWorkgroupService basWorkgroupService,
IUserManager userManager
)
{
@@ -62,6 +65,7 @@ namespace Tnb.ProductionMgr
_billRullService = billRullService;
_prdMoTaskService = prdMoTaskService;
_wmsCarryQueryService = wmsCarryQueryService;
_basWorkgroupService = basWorkgroupService;
}
@@ -430,7 +434,12 @@ namespace Tnb.ProductionMgr
List<PrdMaterialReceiptH> insertHList = new List<PrdMaterialReceiptH>();
List<PrdMaterialReceiptD> insertDList = new List<PrdMaterialReceiptD>();
string orgId = WmsWareHouseConst.AdministratorOrgId;
string userId = moTask.worker_id;
// string userId = moTask.worker_id;
string userId = WmsWareHouseConst.AdministratorUserId;
if (_userManager != null && !string.IsNullOrEmpty(_userManager.UserId))
{
userId = _userManager.UserId;
}
foreach(string carryId in input.carryIds)
{
WmsCarryH carry = await db.Queryable<WmsCarryH>().SingleAsync(x => x.id == carryId);