备件领用bug
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using System.Linq;
|
||||
using JNPF.Common.Core.Manager;
|
||||
using JNPF.Common.Dtos.VisualDev;
|
||||
using JNPF.Common.Security;
|
||||
@@ -117,7 +118,14 @@ namespace Tnb.EquipMgr
|
||||
|
||||
if (eqpSparePartsList.Count > 0)
|
||||
{
|
||||
_ = await db.Insertable<EqpEquipSpareParts>(eqpSparePartsList).ExecuteCommandAsync();
|
||||
var datas= await db.Queryable<EqpEquipSpareParts>().ToListAsync();
|
||||
foreach (var item in eqpSparePartsList)
|
||||
{
|
||||
if (!datas.Where(p => p.equip_id == item.equip_id && p.spare_parts_id == item.spare_parts_id).Any())
|
||||
_ = await db.Insertable<EqpEquipSpareParts>(eqpSparePartsList).ExecuteCommandAsync();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user