立即调用erp接口 任务单批次生成修改
This commit is contained in:
@@ -29,6 +29,7 @@ using Tnb.WarehouseMgr.Entities.Entity;
|
||||
using Tnb.WarehouseMgr.Interfaces;
|
||||
using Tnb.ProductionMgr.Entities.Entity;
|
||||
using Tnb.BasicData;
|
||||
using Tnb.BasicData.Interfaces;
|
||||
|
||||
namespace Tnb.WarehouseMgr
|
||||
{
|
||||
@@ -47,6 +48,7 @@ namespace Tnb.WarehouseMgr
|
||||
private readonly IWmsCarryUnbindService _wmsCarryUnbindService;
|
||||
private readonly IWareHouseService _wareHouseService;
|
||||
private readonly IOtherOutstockHService _otherOutstockHService;
|
||||
private readonly IThirdApiRecordService _thirdApiRecordService;
|
||||
public WmsMaterialSignHService(
|
||||
ISqlSugarRepository<WmsCarryH> repository,
|
||||
IUserManager userManager,
|
||||
@@ -55,6 +57,7 @@ namespace Tnb.WarehouseMgr
|
||||
IVisualDevService visualDevService,
|
||||
IWmsPDAScanInStockService wmsPDAScanInStock,
|
||||
IWmsCarryUnbindService wmsCarryUnbindService,
|
||||
IThirdApiRecordService thirdApiRecordService,
|
||||
IWareHouseService wareHouseService,
|
||||
IOtherOutstockHService otherOutstockHService)
|
||||
{
|
||||
@@ -66,6 +69,7 @@ namespace Tnb.WarehouseMgr
|
||||
_wmsPDAScanInStock = wmsPDAScanInStock;
|
||||
_wmsCarryUnbindService = wmsCarryUnbindService;
|
||||
_wareHouseService = wareHouseService;
|
||||
_thirdApiRecordService = thirdApiRecordService;
|
||||
_otherOutstockHService = otherOutstockHService;
|
||||
}
|
||||
|
||||
@@ -445,6 +449,11 @@ namespace Tnb.WarehouseMgr
|
||||
thirdWebapiRecord.create_time = DateTime.Now;
|
||||
thirdWebapiRecord.remark = $"原材料调拨出库wms_rawmat_transferoutstock_h:{wmsRawmatTransferoutstockH.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);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -551,6 +560,10 @@ namespace Tnb.WarehouseMgr
|
||||
await _db.Insertable(thirdWebapiRecord).ExecuteCommandAsync();
|
||||
Logger.LogInformation("【WmsMaterialSignHService ModifyAsync】同步其它出库单到erp成功");
|
||||
|
||||
BasFactoryConfig callErp2 = await _db.Queryable<BasFactoryConfig>().FirstAsync(x => x.enabled == 1 && x.key == FactoryConfigConst.CALLERP);
|
||||
if(callErp2.value=="1"){
|
||||
await _thirdApiRecordService.Send(new List<ThirdWebapiRecord> { thirdWebapiRecord }, "自动", _db);
|
||||
}
|
||||
|
||||
if (wmsMaterialTransfer.type == WmsWareHouseConst.MATERIALTRANSFER_JZGLRK_CODE
|
||||
|| wmsMaterialTransfer.type == WmsWareHouseConst.MATERIALTRANSFER_QTCRK_CODE
|
||||
@@ -623,6 +636,10 @@ namespace Tnb.WarehouseMgr
|
||||
|
||||
await _db.Insertable(thirdWebapiRecord2).ExecuteCommandAsync();
|
||||
Logger.LogInformation("【WmsMaterialSignHService ModifyAsync】同步其它入库单到erp成功");
|
||||
|
||||
if(callErp2.value=="1"){
|
||||
await _thirdApiRecordService.Send(new List<ThirdWebapiRecord> { thirdWebapiRecord2 }, "自动", _db);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user