eganwu преди 2 години
родител
ревизия
f696d1be8e
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      src/custom/restcontroller/ClientUserInfo.java

+ 1 - 1
src/custom/restcontroller/ClientUserInfo.java

@@ -33,7 +33,7 @@ public class ClientUserInfo extends UserInfo {
 
     public Row getEnterpriseRow() throws YosException {
         if (enterpriseRow == null) {
-            Rows enterpriseRows = controller.dbConnect.runSqlQuery("select * from sys_enterprise where siteid='" + getSiteId() + "' and exists(select *from sys_enterprise_hr where siteid='" + getSiteId() + "' and userid=" + getUserId() + ")");
+            Rows enterpriseRows = controller.dbConnect.runSqlQuery("select * from sys_enterprise t1 where t1.siteid='" + getSiteId() + "' and exists(select *from sys_enterprise_hr where siteid='" + getSiteId() + "' and userid=" + getUserId() + " and t1.sys_enterpriseid=sys_enterpriseid)");
             if (enterpriseRows.isNotEmpty()) {
                 enterpriseRow = enterpriseRows.getRow(0);
             }