生产提报修改

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

View File

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