生产提报修改

This commit is contained in:
2024-06-13 08:44:43 +08:00
parent 9c6e353291
commit 89cfac6564
2 changed files with 16 additions and 11 deletions

View File

@@ -44,6 +44,8 @@ using JNPF.Extras.CollectiveOAuth.Utils;
using Tnb.WarehouseMgr.Entities;
using Tnb.WarehouseMgr.Entities.Dto;
using Tnb.WarehouseMgr.Entities.Dto.Inputs;
using Tnb.WarehouseMgr.Interfaces;
using Tnb.WarehouseMgr;
// using Tnb.PerMgr.Entities;
@@ -68,7 +70,9 @@ namespace Tnb.ProductionMgr
private readonly ISqlSugarClient _db;
private readonly IBillRullService _billRuleService;
private readonly IPrdInstockService _prdInstockService;
private readonly WmsPrdInstockHService _wmsPrdInstockHService;
private readonly IQcCheckPlanService _qcCheckPlanService;
private readonly IWmsCarryService _wmsCarryService;
private readonly ElevatorControlConfiguration _eleCtlCfg = App.Configuration.Build<ElevatorControlConfiguration>();
private readonly RedisData _redisData;
@@ -78,8 +82,10 @@ namespace Tnb.ProductionMgr
IUserManager userManager,
IDictionaryDataService dictionaryDataService,
IRunService runService,
IWmsCarryService wmsCarryService,
IBillRullService billRullService,
IPrdInstockService prdInstockService,
WmsPrdInstockHService wmsPrdInstockHService,
IVisualDevService visualDevService,
IQcCheckPlanService qcCheckPlanService
)
@@ -95,6 +101,8 @@ namespace Tnb.ProductionMgr
_billRuleService = billRullService;
_prdInstockService = prdInstockService;
_qcCheckPlanService = qcCheckPlanService;
_wmsCarryService = wmsCarryService;
_wmsPrdInstockHService = wmsPrdInstockHService;
}
#region Get
@@ -1898,13 +1906,11 @@ namespace Tnb.ProductionMgr
bindCarryCodeInput.location_id = location.id;
bindCarryCodeInput.location_code = location.location_code;
bindCarryCodeInput.code_batch = prdMoTask.batch;
string response1 = HttpUtils.RequestPost($"{config.value}/api/wms/wms-carry/bind-carry-material",JsonConvert.SerializeObject(bindCarryCodeInput), header);
AuthResponse authResponse1 = JsonConvert.DeserializeObject<AuthResponse>(response1);
AuthResponse authResponse11 = JsonConvert.DeserializeObject<AuthResponse>(authResponse1.data.ToString());
if (authResponse11.code != 200)
Tnb.WarehouseMgr.Entities.Dto.Outputs.Result result1 = await _wmsCarryService.BindCarryMaterial(bindCarryCodeInput);
if (result1.code != HttpStatusCode.OK)
{
throw Oops.Bah(authResponse11.msg);
throw Oops.Bah(result1.msg);
}
WmsPrdInstockInput wmsPrdInstockInput = new WmsPrdInstockInput();
@@ -1937,12 +1943,10 @@ namespace Tnb.ProductionMgr
carry_id = wmsCarryH.id,
});
string response2 = HttpUtils.RequestPost($"{config.value}/api/wms/wms-prd-instock-h/prd-instock",JsonConvert.SerializeObject(wmsPrdInstockInput), header);
AuthResponse authResponse2 = JsonConvert.DeserializeObject<AuthResponse>(response2);
AuthResponse authResponse22 = JsonConvert.DeserializeObject<AuthResponse>(authResponse2.data.ToString());
if (authResponse22.code != 200)
Tnb.WarehouseMgr.Entities.Dto.Outputs.Result result2 = await _wmsPrdInstockHService.PrdInstock(wmsPrdInstockInput);
if (result2.code != HttpStatusCode.OK)
{
throw Oops.Bah(authResponse22.msg);
throw Oops.Bah(result2.msg);
}
if (prdMoTask.schedule_type == 2)

View File

@@ -17,6 +17,7 @@
<ProjectReference Include="..\..\taskschedule\Tnb.TaskScheduler\Tnb.TaskScheduler.csproj" />
<ProjectReference Include="..\..\visualdev\Tnb.VisualDev.Engine\Tnb.VisualDev.Engine.csproj" />
<ProjectReference Include="..\..\WarehouseMgr\Tnb.WarehouseMgr.Interfaces\Tnb.WarehouseMgr.Interfaces.csproj" />
<ProjectReference Include="..\..\WarehouseMgr\Tnb.WarehouseMgr\Tnb.WarehouseMgr.csproj" />
<ProjectReference Include="..\Tnb.ProductionMgr.Interfaces\Tnb.ProductionMgr.Interfaces.csproj" />
</ItemGroup>