排除已刪除電站

This commit is contained in:
b110212000 2021-09-22 16:42:18 +08:00
parent d749cdabc8
commit 1e6e8ba252

View File

@ -437,7 +437,7 @@ namespace SolarPower.Repository.Implement
END AS EscrowName
FROM power_station ps
LEFT JOIN company c ON ps.CompanyId = c.Id
WHERE ps.Id NOT IN (SELECT psop.PowerStationId FROM power_station_operation_personnel psop WHERE psop.UserId = @UserId AND psop.Deleted = 0)";
WHERE ps.Id NOT IN (SELECT psop.PowerStationId FROM power_station_operation_personnel psop WHERE psop.UserId = @UserId AND psop.Deleted = 0) AND ps.Deleted = 0 ";
if (!isPlatformLayer)
{