diff --git a/New_College.Api/Controllers/Back/D_PlanMajorDescController.cs b/New_College.Api/Controllers/Back/D_PlanMajorDescController.cs index d182316..e6b294e 100644 --- a/New_College.Api/Controllers/Back/D_PlanMajorDescController.cs +++ b/New_College.Api/Controllers/Back/D_PlanMajorDescController.cs @@ -278,11 +278,17 @@ namespace New_College.Api.Controllers } if (id > 0 && itemIds == vollunterrrequest.volunteerTableDetailViews.Count() && itemIds > 0) { - _unitOfWork.BeginTran(); + _unitOfWork.CommitTran(); } else { _unitOfWork.RollbackTran(); + return new MessageModel() + { + success = false, + response = -1, + msg = "无数据" + }; } return new MessageModel() { diff --git a/New_College.Api/Controllers/Front/PcVolunteerController.cs b/New_College.Api/Controllers/Front/PcVolunteerController.cs index 4c86c54..9a9f936 100644 --- a/New_College.Api/Controllers/Front/PcVolunteerController.cs +++ b/New_College.Api/Controllers/Front/PcVolunteerController.cs @@ -256,7 +256,7 @@ namespace New_College.Api.Controllers.Front } if (id > 0 && itemIds == request.volunteerTableDetailViews.Count() && itemIds > 0) { - _unitOfWork.BeginTran(); + _unitOfWork.CommitTran(); } else { diff --git a/New_College.Api/Controllers/HealthCheckController.cs b/New_College.Api/Controllers/HealthCheckController.cs index d30cd33..cc43a90 100644 --- a/New_College.Api/Controllers/HealthCheckController.cs +++ b/New_College.Api/Controllers/HealthCheckController.cs @@ -64,10 +64,10 @@ namespace New_College.Controllers // return t_EnrollmentPlane.categoryupdate(); + // return d_LongIdMapServices.UpdateUniveristyInf(); + // return d_LongIdMapServices.Import(); - // return d_LongIdMapServices.Import(); - - return d_LongIdMapServices.UpdatePlanProInf(); + return d_LongIdMapServices.UpdatePlanProInf(); } } diff --git a/New_College.Services/D_LongIdMapServices.cs b/New_College.Services/D_LongIdMapServices.cs index 6a8c8df..47cea7f 100644 --- a/New_College.Services/D_LongIdMapServices.cs +++ b/New_College.Services/D_LongIdMapServices.cs @@ -1949,7 +1949,7 @@ namespace New_College.Services // await d_UniversityRepository.Update(a); // } //}); - var plist = await this._PlanMajorDescRepository.Query(c => c.Location == "山东省" && c.Years == 2023); + var plist = await this._PlanMajorDescRepository.Query(c => c.Location == "山东省" && c.Years == 2023 && c.IsDelete == false && c.UId <= 0); info.ForEach(async a => { var pplist = plist.Where(ee => ee.UniversityName == a.Name).ToList(); @@ -1971,7 +1971,7 @@ namespace New_College.Services }); if (pplist.Any() && pplist.Count() > 0) { - this._PlanMajorDescRepository.Batchupdate(pplist); + await this._PlanMajorDescRepository.Batchupdate(pplist); } }); @@ -1985,7 +1985,7 @@ namespace New_College.Services public async Task UpdatePlanProInf() { var tbinfo = await t_TbSNeedDataInfoRepository.Query(); - var plist = await this._PlanMajorDescRepository.Query(c => c.Location == "山东省" && c.Years == 2023 && c.IsDelete == false); + var plist = await this._PlanMajorDescRepository.Query(c => c.Location == "山东省" && c.Years == 2023 && c.IsDelete == false && c.UId <= 0); plist.ForEach(p => { var newmodel = tbinfo.Where(e => e.EnrollmentCode == p.EnrollmentCode && e.MajorCode == p.MajorCode).FirstOrDefault();