|
@@ -3612,6 +3612,7 @@ OPTION (MAXRECURSION 0); -- 允许无限递归 ";
|
|
|
{
|
|
{
|
|
|
data = await _sqlSugar.Queryable<Pm_PerformanceAnalysis>()
|
|
data = await _sqlSugar.Queryable<Pm_PerformanceAnalysis>()
|
|
|
.Where(x => x.UserId == userId && x.Year == year && x.Month == month && x.IsDel == 0)
|
|
.Where(x => x.UserId == userId && x.Year == year && x.Month == month && x.IsDel == 0)
|
|
|
|
|
+ .OrderByDescending(x => x.CreateTime)
|
|
|
.FirstAsync();
|
|
.FirstAsync();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -3698,9 +3699,21 @@ OPTION (MAXRECURSION 0); -- 允许无限递归 ";
|
|
|
return Ok(jw);
|
|
return Ok(jw);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- var data = await _sqlSugar.Queryable<Pm_PerformanceAnalysis>()
|
|
|
|
|
- .Where(x => x.UserId == userId && x.Year == year && x.Month == month && x.IsDel == 0)
|
|
|
|
|
- .FirstAsync();
|
|
|
|
|
|
|
+ var data = new Pm_PerformanceAnalysis();
|
|
|
|
|
+ if (year < 1 && month < 1)
|
|
|
|
|
+ {
|
|
|
|
|
+ data = await _sqlSugar.Queryable<Pm_PerformanceAnalysis>()
|
|
|
|
|
+ .Where(x => x.UserId == userId && x.IsDel == 0)
|
|
|
|
|
+ .OrderByDescending(x => x.CreateTime)
|
|
|
|
|
+ .FirstAsync();
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ data = await _sqlSugar.Queryable<Pm_PerformanceAnalysis>()
|
|
|
|
|
+ .Where(x => x.UserId == userId && x.Year == year && x.Month == month && x.IsDel == 0)
|
|
|
|
|
+ .OrderByDescending(x => x.CreateTime)
|
|
|
|
|
+ .FirstAsync();
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
if (data == null)
|
|
if (data == null)
|
|
|
{
|
|
{
|