|
@ -1069,9 +1069,11 @@ public abstract class ProfessorDao {
|
1069
|
1069
|
boolean hasKey = null != key;
|
1070
|
1070
|
if (hasKey) {
|
1071
|
1071
|
sql.append(" WHERE (( P.ID IN (SELECT PROFESSOR_ID FROM RESEARCH_AREA WHERE CAPTION LIKE ?)) "
|
1072
|
|
+ " OR (ORG_ID IN(SELECT ORGANIZATION.ID FROM ORGANIZATION WHERE ORGANIZATION.NAME LIKE ?)) "
|
1073
|
|
+ " OR ( P.NAME LIKE ?) OR (P.SUBJECT LIKE ?) OR (P.INDUSTRY LIKE ?) OR (P.PROVINCE LIKE ?) OR (P.ADDRESS LIKE ?) "
|
1074
|
|
+ " OR P.ID IN (SELECT PROFESSOR_ID FROM RESOURCE WHERE RESOURCE_NAME LIKE ?))");
|
|
1072
|
+ " OR (ORG_ID IN(SELECT ORGANIZATION.ID FROM ORGANIZATION WHERE ORGANIZATION.NAME LIKE ?)) "
|
|
1073
|
+ " OR ( P.NAME LIKE ?) OR (P.SUBJECT LIKE ?) OR (P.INDUSTRY LIKE ?) OR (P.PROVINCE LIKE ?) OR (P.ADDRESS LIKE ?) "
|
|
1074
|
+ " OR P.ID IN (SELECT PROFESSOR_ID FROM RESOURCE WHERE RESOURCE_NAME LIKE ?) "
|
|
1075
|
+ " OR P.ID IN (SELECT PROFESSOR_ID FROM ARTICLE WHERE ARTICLE_TITLE LIKE ?) "
|
|
1076
|
+ " OR (P.ID IN (SELECT PROFESSOR_ID FROM PATENT WHERE NAME LIKE ?)) OR (P.DEPARTMENT LIKE ?))");
|
1075
|
1077
|
}
|
1076
|
1078
|
boolean hasSubject = null != subject;
|
1077
|
1079
|
boolean hasIndustry = null != industry;
|
|
@ -1112,6 +1114,9 @@ public abstract class ProfessorDao {
|
1112
|
1114
|
ps.setString(paramIndex++, key);
|
1113
|
1115
|
ps.setString(paramIndex++, key);
|
1114
|
1116
|
ps.setString(paramIndex++, key);
|
|
1117
|
ps.setString(paramIndex++, key);
|
|
1118
|
ps.setString(paramIndex++, key);
|
|
1119
|
ps.setString(paramIndex++, key);
|
1115
|
1120
|
}
|
1116
|
1121
|
if (hasSubject) {
|
1117
|
1122
|
ps.setString(paramIndex++, subject);
|
|
@ -1193,6 +1198,9 @@ public abstract class ProfessorDao {
|
1193
|
1198
|
ps.setString(paramIndex++, key);
|
1194
|
1199
|
ps.setString(paramIndex++, key);
|
1195
|
1200
|
ps.setString(paramIndex++, key);
|
|
1201
|
ps.setString(paramIndex++, key);
|
|
1202
|
ps.setString(paramIndex++, key);
|
|
1203
|
ps.setString(paramIndex++, key);
|
1196
|
1204
|
}
|
1197
|
1205
|
if (hasSubject) {
|
1198
|
1206
|
ps.setString(paramIndex++, subject);
|
|
@ -1282,9 +1290,11 @@ public abstract class ProfessorDao {
|
1282
|
1290
|
boolean hasKey = null != key;
|
1283
|
1291
|
if (hasKey) {
|
1284
|
1292
|
sql.append(" WHERE ((P.ID IN (SELECT PROFESSOR_ID FROM RESEARCH_AREA WHERE CAPTION LIKE ?)) "
|
1285
|
|
+ " OR (ORG_ID IN(SELECT organization.ID FROM ORGANIZATION WHERE organization.NAME LIKE ?)) "
|
|
1293
|
+ " OR (ORG_ID IN(SELECT ORGANIZATION.ID FROM ORGANIZATION WHERE ORGANIZATION.NAME LIKE ?)) "
|
1286
|
1294
|
+ " OR (P.NAME LIKE ?) OR (P.SUBJECT LIKE ?) OR (P.INDUSTRY LIKE ?) OR (P.ADDRESS LIKE ?)"
|
1287
|
|
+ " OR (P.ID IN (SELECT PROFESSOR_ID FROM RESOURCE WHERE RESOURCE_NAME LIKE ?)) )");
|
|
1295
|
+ " OR (P.ID IN (SELECT PROFESSOR_ID FROM RESOURCE WHERE RESOURCE_NAME LIKE ?)) "
|
|
1296
|
+ " OR (P.ID IN (SELECT PROFESSOR_ID FROM ARTICLE WHERE ARTICLE_TITLE LIKE ?)) "
|
|
1297
|
+ " OR (P.ID IN (SELECT PROFESSOR_ID FROM PATENT WHERE NAME LIKE ?)) OR (P.DEPARTMENT LIKE ?) )");
|
1288
|
1298
|
}
|
1289
|
1299
|
boolean hasSubject = null != subject;
|
1290
|
1300
|
boolean hasIndustry = null != industry;
|
|
@ -1321,6 +1331,9 @@ public abstract class ProfessorDao {
|
1321
|
1331
|
ps.setString(paramIndex++, key);
|
1322
|
1332
|
ps.setString(paramIndex++, key);
|
1323
|
1333
|
ps.setString(paramIndex++, key);
|
|
1334
|
ps.setString(paramIndex++, key);
|
|
1335
|
ps.setString(paramIndex++, key);
|
|
1336
|
ps.setString(paramIndex++, key);
|
1324
|
1337
|
}
|
1325
|
1338
|
if (hasSubject) {
|
1326
|
1339
|
ps.setString(paramIndex++, subject);
|
|
@ -1361,9 +1374,9 @@ public abstract class ProfessorDao {
|
1361
|
1374
|
if (1 == pageNo) {
|
1362
|
1375
|
queryResult.setPageNo(1);
|
1363
|
1376
|
sql = new StringBuilder();
|
1364
|
|
sql.append("SELECT OFFICE,P.SUBJECT,P.INDUSTRY,P.ADDRESS,DEPARTMENT,organization.NAME,TITLE,"
|
|
1377
|
sql.append("SELECT OFFICE,P.SUBJECT,P.INDUSTRY,P.ADDRESS,DEPARTMENT,ORGANIZATION.NAME,TITLE,"
|
1365
|
1378
|
+ " AUTHENTICATION,AUTH_TYPE,P.AUTH_STATUS,P.ID,P.NAME,STAR_LEVEL,CONSULT_COUNT,P.ORG_AUTH "
|
1366
|
|
+ " FROM PROFESSOR P LEFT JOIN ORGANIZATION ON ORG_ID=organization.ID ");
|
|
1379
|
+ " FROM PROFESSOR P LEFT JOIN ORGANIZATION ON ORG_ID=ORGANIZATION.ID ");
|
1367
|
1380
|
if (whereSql.length() > 0) {
|
1368
|
1381
|
sql.append(whereSql);
|
1369
|
1382
|
}
|
|
@ -1381,9 +1394,9 @@ public abstract class ProfessorDao {
|
1381
|
1394
|
--pageNo;
|
1382
|
1395
|
int offset = (pageNo * pageSize);
|
1383
|
1396
|
sql = new StringBuilder();
|
1384
|
|
sql.append("SELECT OFFICE,P.SUBJECT,P.INDUSTRY,P.ADDRESS,DEPARTMENT,organization.NAME,TITLE,"
|
|
1397
|
sql.append("SELECT OFFICE,P.SUBJECT,P.INDUSTRY,P.ADDRESS,DEPARTMENT,ORGANIZATION.NAME,TITLE,"
|
1385
|
1398
|
+ " AUTHENTICATION,AUTH_TYPE,P.AUTH_STATUS,P.ID,P.NAME,STAR_LEVEL,CONSULT_COUNT,P.ORG_AUTH "
|
1386
|
|
+ " FROM PROFESSOR P LEFT JOIN ORGANIZATION ON ORG_ID=organization.ID ");
|
|
1399
|
+ " FROM PROFESSOR P LEFT JOIN ORGANIZATION ON ORG_ID=ORGANIZATION.ID ");
|
1387
|
1400
|
if (whereSql.length() > 0) {
|
1388
|
1401
|
sql.append(whereSql);
|
1389
|
1402
|
}
|
|
@ -1400,6 +1413,9 @@ public abstract class ProfessorDao {
|
1400
|
1413
|
ps.setString(paramIndex++, key);
|
1401
|
1414
|
ps.setString(paramIndex++, key);
|
1402
|
1415
|
ps.setString(paramIndex++, key);
|
|
1416
|
ps.setString(paramIndex++, key);
|
|
1417
|
ps.setString(paramIndex++, key);
|
|
1418
|
ps.setString(paramIndex++, key);
|
1403
|
1419
|
}
|
1404
|
1420
|
if (hasSubject) {
|
1405
|
1421
|
ps.setString(paramIndex++, subject);
|