This commit is contained in:
2024-07-19 17:22:08 +08:00
parent 5345400596
commit a239258646
3 changed files with 41 additions and 28 deletions

View File

@@ -84,4 +84,9 @@ public partial class BasEbomH : BaseEntity<string>
/// </summary>
public string? query_info { get; set; }
/// <summary>
/// erp修改时间
/// </summary>
public string erp_modify_time { get; set; }
}

View File

@@ -34,5 +34,9 @@ namespace Tnb.ProductionMgr.Entities.Entity.ErpEntity
/// 数量
/// </summary>
public decimal BATCHAMOUNT { get; set; }
/// <summary>
/// 修改时间
/// </summary>
public string MODIFIEDTIME { get; set; }
}
}

View File

@@ -943,6 +943,8 @@ namespace Tnb.ProductionMgr
BasEbomH basEbomH = await _db.Queryable<BasEbomH>().Where(x=>x.material_id==material.id && x.version==firstItemInList.HVERSION).FirstAsync();
if (basEbomH == null) continue;
if (basEbomH.erp_modify_time != firstItemInList.MODIFIEDTIME)
{
bool flag = false;
List<BasEbomD> tempList = new List<BasEbomD>();
foreach (var children in itemList)
@@ -978,6 +980,8 @@ namespace Tnb.ProductionMgr
.ExecuteCommandAsync();
await _db.Deleteable<BasEbomD>().Where(x => x.ebom_id == basEbomH.id).ExecuteCommandAsync();
}
}
}
await _db.Insertable(insertBasEbomHs).ExecuteCommandAsync();