立即调用erp接口 任务单批次生成修改

This commit is contained in:
2024-09-23 15:07:00 +08:00
parent 1c04f0449f
commit 1dc51107f5
16 changed files with 452 additions and 346 deletions

View File

@@ -60,6 +60,7 @@ using NPOI.SS.Format;
using Aspose.Cells.Drawing;
using SQLitePCL;
using Tnb.BasicData.Entities.Entity;
using Tnb.BasicData.Interfaces;
namespace Tnb.WarehouseMgr
{
@@ -78,7 +79,7 @@ namespace Tnb.WarehouseMgr
private readonly IWmsCarryUnbindService _wmsCarryUnbindService;
private readonly IWmsOutinStockDetailService _wmsOutinStockDetailService;
private static ISqlSugarClient db_agvElevatorTaskExceptionHandles;
private readonly IThirdApiRecordService _thirdApiRecordService;
@@ -156,6 +157,7 @@ namespace Tnb.WarehouseMgr
IWmsCarryUnbindService wmsCarryUnbindService,
IRunService runService,
IVisualDevService visualDevService,
IThirdApiRecordService thirdApiRecordService,
IWmsOutinStockDetailService wmsOutinStockDetailService
//IConfiguration configuration
) : base(repository.AsSugarClient())
@@ -171,6 +173,7 @@ namespace Tnb.WarehouseMgr
_wmsCarryUnbindService = wmsCarryUnbindService;
_runService = runService;
_visualDevService = visualDevService;
_thirdApiRecordService = thirdApiRecordService;
_wmsOutinStockDetailService = wmsOutinStockDetailService;
//_configuration = configuration;
@@ -3323,6 +3326,11 @@ namespace Tnb.WarehouseMgr
thirdWebapiRecord.remark = $"原材料转库单wms_material_transfer:{wmsMaterialTransfer.bill_code}";
await db.Insertable(thirdWebapiRecord).ExecuteCommandAsync();
BasFactoryConfig callErp = await _db.Queryable<BasFactoryConfig>().FirstAsync(x => x.enabled == 1 && x.key == FactoryConfigConst.CALLERP);
if(callErp.value=="1"){
await _thirdApiRecordService.Send(new List<ThirdWebapiRecord> { thirdWebapiRecord }, "自动", _db);
}
}