diff --git a/SGGL/BLL/IDP/IDPDataService.cs b/SGGL/BLL/IDP/IDPDataService.cs index a8688ce9..3b0e300c 100644 --- a/SGGL/BLL/IDP/IDPDataService.cs +++ b/SGGL/BLL/IDP/IDPDataService.cs @@ -840,7 +840,8 @@ namespace BLL { if (!string.IsNullOrWhiteSpace(item.RdpId) && !string.IsNullOrWhiteSpace(item.fileid)) { - IDP_DesignDrawing newItem = db.IDP_DesignDrawing.FirstOrDefault(x => x.StockId == item.RdpId && x.ThirdId == item.fileid); + IDP_DesignDrawing newItem = db.IDP_DesignDrawing.FirstOrDefault(x => x.IdpfileId == item.uuid); + //IDP_DesignDrawing newItem = db.IDP_DesignDrawing.FirstOrDefault(x => x.StockId == item.RdpId && x.ThirdId == item.fileid); //IDP_DesignDrawing newItem = db.IDP_DesignDrawing.FirstOrDefault(x => x.StockId == item.RdpId && x.FormatFileCode == item.doc_no && x.FormatFileName == item.maintitle); if (newItem != null) { @@ -934,7 +935,8 @@ namespace BLL responseData = responseData.GroupBy(p => new { p.item_id, p.folderNo, p.isUpgrade }).Select(g => g.First()).ToList(); foreach (var item in responseData) { - IDP_DesignDrawing newItem = db.IDP_DesignDrawing.FirstOrDefault(x => x.ProjectCode == item.item_id && x.FormatFileCode == item.folderNo && x.FileVersion == item.isUpgrade); + IDP_DesignDrawing newItem = db.IDP_DesignDrawing.FirstOrDefault(x => x.ProjectCode == item.item_id && (x.Doc_no == item.folderNo || x.FormatFileCode == item.folderNo) && x.FileVersion == item.isUpgrade); + //IDP_DesignDrawing newItem = db.IDP_DesignDrawing.FirstOrDefault(x => x.ProjectCode == item.item_id && x.FormatFileCode == item.folderNo && x.FileVersion == item.isUpgrade); if (newItem == null) { err++; @@ -1012,7 +1014,8 @@ namespace BLL responseData = responseData.GroupBy(p => new { p.item_id, p.folderNo, p.isUpgrade }).Select(g => g.First()).ToList(); foreach (var item in responseData) { - IDP_DesignDrawing newItem = db.IDP_DesignDrawing.FirstOrDefault(x => x.ProjectCode == item.item_id && x.FormatFileCode == item.folderNo && x.FileVersion == item.isUpgrade); + IDP_DesignDrawing newItem = db.IDP_DesignDrawing.FirstOrDefault(x => x.ProjectCode == item.item_id && (x.Doc_no == item.folderNo || x.FormatFileCode == item.folderNo) && x.FileVersion == item.isUpgrade); + //IDP_DesignDrawing newItem = db.IDP_DesignDrawing.FirstOrDefault(x => x.ProjectCode == item.item_id && x.FormatFileCode == item.folderNo && x.FileVersion == item.isUpgrade); if (newItem == null) { err++; diff --git a/SGGL/Model/IDP/OADesignDrawingData.cs b/SGGL/Model/IDP/OADesignDrawingData.cs index 996ea6a2..857d199b 100644 --- a/SGGL/Model/IDP/OADesignDrawingData.cs +++ b/SGGL/Model/IDP/OADesignDrawingData.cs @@ -160,6 +160,11 @@ namespace Model /// public partial class OADesignDrawingDataItem { + /// + /// 图纸唯一主键uuid + /// + [JsonProperty("uuid")] + public string uuid { get; set; } /// /// 数字档案馆RdpId ///