产成品入库重复调用过滤

This commit is contained in:
2024-09-27 10:34:43 +08:00
parent 1c043a5eca
commit 21ef67b69a

View File

@@ -367,6 +367,13 @@ namespace Tnb.WarehouseMgr
{
return;
}
if (await _db.Queryable<ThirdWebapiRecord>().AnyAsync(x => x.remark.Contains(prdReport.id) && x.name == "产成品入库"))
{
Logger.LogInformation($"【WmsPrdInstockHService ModifyAsync】重复调用入库");
return;
}
List<WmsPrdInstockCode> allInstockDetails = await _db.Queryable<WmsPrdInstockCode>().Where(it => it.prd_instockD_id == wmsPrdInstockD.id).ToListAsync();
@@ -466,7 +473,7 @@ namespace Tnb.WarehouseMgr
thirdWebapiRecord.url = WmsWareHouseConst.BIP_DOMAIN + "uapws/rest/productin/save";
thirdWebapiRecord.request_data = JsonConvert.SerializeObject(requestData);
thirdWebapiRecord.create_time = DateTime.Now;
thirdWebapiRecord.remark = $"载具编号:{prdReport?.material_box_code ?? ""}";
thirdWebapiRecord.remark = $"载具编号:{prdReport?.material_box_code ?? ""},提报id:{prdReport?.id}";
await _db.Insertable(thirdWebapiRecord).ExecuteCommandAsync();
BasFactoryConfig callErp = await _db.Queryable<BasFactoryConfig>().FirstAsync(x => x.enabled == 1 && x.key == FactoryConfigConst.CALLERP);