jiapeng 6 ans auparavant
Parent
commit
16c63202d0

+ 12 - 0
src/main/java/com/ekexiu/portal/platform/PlatformService.java

@ -452,6 +452,18 @@ public class PlatformService {
452 452
		}
453 453
		return ret;
454 454
	}
455
	
456
	@Get
457
	@Path("/ids/buttedProfessors")
458
	List<ButtedProfessor> queryIdsForButtedProfessors(@JdbcConn Connection con,String pid)throws SQLException{
459
		return platformDao.queryButtedProfessors(con, pid);
460
	}
461
	
462
	@Get
463
	@Path("/ids/buttedOrgs")
464
	List<ButtedOrg> queryIdsForButtedOrgs(@JdbcConn Connection con,String pid)throws SQLException{
465
		return platformDao.queryButtedOrgs(con, pid);
466
	}
455 467

456 468
	@Get
457 469
	@Path("/info/wares")

+ 29 - 0
src/main/java/com/ekexiu/portal/service/ProfessorService.java

@ -1040,6 +1040,35 @@ public class ProfessorService {
1040 1040
			JdbcUtil.close(ps);
1041 1041
		}
1042 1042
	}
1043
	
1044
	
1045
	@Get
1046
	@Path("/coadjutantByPatent")
1047
	public List<Map<String, Object>> queryCoadjutantByPatent(@JdbcConn Connection con, String id, @DefaultValue("5") int rows) throws SQLException {
1048
		PreparedStatement ps = con.prepareStatement("SELECT professor_id,COUNT (1) tc FROM patent_author "+
1049
				"WHERE patent_id IN ( SELECT DISTINCT patent_id FROM patent_author WHERE professor_id =? ) "+
1050
				"AND professor_id <>? AND professor_id <> '################################' GROUP BY professor_id order by tc desc limit ?");
1051
		try {
1052
			ps.setString(1, id);
1053
			ps.setString(2, id);
1054
			ps.setInt(3, rows);
1055
			ResultSet rs = ps.executeQuery();
1056
			try {
1057
				List<Map<String, Object>> ret = new ArrayList<Map<String, Object>>();
1058
				while (rs.next()) {
1059
					Map<String, Object> row = new HashMap<String, Object>();
1060
					ret.add(row);
1061
					row.put("professorId", rs.getString(1));
1062
					row.put("count", rs.getInt(2));
1063
				}
1064
				return ret;
1065
			} finally {
1066
				JdbcUtil.close(rs);
1067
			}
1068
		} finally {
1069
			JdbcUtil.close(ps);
1070
		}
1071
	}
1043 1072

1044 1073
	@Get
1045 1074
	@Path("/qm")