保存志愿 bug fixed

develop
old易 2024-01-04 14:43:17 +08:00
parent ab5dfc7cfc
commit ff751a0cb7
4 changed files with 14 additions and 8 deletions

View File

@ -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<int>()
{
success = false,
response = -1,
msg = "无数据"
};
}
return new MessageModel<int>()
{

View File

@ -256,7 +256,7 @@ namespace New_College.Api.Controllers.Front
}
if (id > 0 && itemIds == request.volunteerTableDetailViews.Count() && itemIds > 0)
{
_unitOfWork.BeginTran();
_unitOfWork.CommitTran();
}
else
{

View File

@ -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();
}
}

View File

@ -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<bool> 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();