Browse Source

专家个人信息修改页所有跟时间相关的,按时间倒序排序。

zzy.zhiyuan.foxmail 8 years ago
parent
commit
6b419ac817

+ 2 - 0
src/main/java/com/ekexiu/portal/dao/HonorDao.java

7
import org.jfw.apt.annotation.Nullable;
7
import org.jfw.apt.annotation.Nullable;
8
import org.jfw.apt.orm.annotation.dao.DAO;
8
import org.jfw.apt.orm.annotation.dao.DAO;
9
import org.jfw.apt.orm.annotation.dao.method.From;
9
import org.jfw.apt.orm.annotation.dao.method.From;
10
import org.jfw.apt.orm.annotation.dao.method.OrderBy;
10
import org.jfw.apt.orm.annotation.dao.method.operator.DeleteWith;
11
import org.jfw.apt.orm.annotation.dao.method.operator.DeleteWith;
11
import org.jfw.apt.orm.annotation.dao.method.operator.Insert;
12
import org.jfw.apt.orm.annotation.dao.method.operator.Insert;
12
import org.jfw.apt.orm.annotation.dao.method.operator.SelectList;
13
import org.jfw.apt.orm.annotation.dao.method.operator.SelectList;
24
	int update(Connection con, Honor honor) throws SQLException;
25
	int update(Connection con, Honor honor) throws SQLException;
25
26
26
	@SelectList
27
	@SelectList
28
	@OrderBy(" ORDER BY YEAR DESC ")
27
	List<Honor> query(Connection con, String professorId) throws SQLException;
29
	List<Honor> query(Connection con, String professorId) throws SQLException;
28
30
29
	@Nullable
31
	@Nullable

+ 2 - 0
src/main/java/com/ekexiu/portal/dao/PaperDao.java

7
import org.jfw.apt.annotation.Nullable;
7
import org.jfw.apt.annotation.Nullable;
8
import org.jfw.apt.orm.annotation.dao.DAO;
8
import org.jfw.apt.orm.annotation.dao.DAO;
9
import org.jfw.apt.orm.annotation.dao.method.From;
9
import org.jfw.apt.orm.annotation.dao.method.From;
10
import org.jfw.apt.orm.annotation.dao.method.OrderBy;
10
import org.jfw.apt.orm.annotation.dao.method.operator.DeleteWith;
11
import org.jfw.apt.orm.annotation.dao.method.operator.DeleteWith;
11
import org.jfw.apt.orm.annotation.dao.method.operator.Insert;
12
import org.jfw.apt.orm.annotation.dao.method.operator.Insert;
12
import org.jfw.apt.orm.annotation.dao.method.operator.SelectList;
13
import org.jfw.apt.orm.annotation.dao.method.operator.SelectList;
24
	int update(Connection con,Paper paper) throws SQLException;
25
	int update(Connection con,Paper paper) throws SQLException;
25
	
26
	
26
	@SelectList
27
	@SelectList
28
	@OrderBy(" ORDER BY YEAR DESC ")
27
	List<Paper> query(Connection con,String professorId) throws SQLException;
29
	List<Paper> query(Connection con,String professorId) throws SQLException;
28
	
30
	
29
	@Nullable
31
	@Nullable

+ 2 - 0
src/main/java/com/ekexiu/portal/dao/PartTimeJobDao.java

7
import org.jfw.apt.annotation.Nullable;
7
import org.jfw.apt.annotation.Nullable;
8
import org.jfw.apt.orm.annotation.dao.DAO;
8
import org.jfw.apt.orm.annotation.dao.DAO;
9
import org.jfw.apt.orm.annotation.dao.method.From;
9
import org.jfw.apt.orm.annotation.dao.method.From;
10
import org.jfw.apt.orm.annotation.dao.method.OrderBy;
10
import org.jfw.apt.orm.annotation.dao.method.operator.DeleteWith;
11
import org.jfw.apt.orm.annotation.dao.method.operator.DeleteWith;
11
import org.jfw.apt.orm.annotation.dao.method.operator.Insert;
12
import org.jfw.apt.orm.annotation.dao.method.operator.Insert;
12
import org.jfw.apt.orm.annotation.dao.method.operator.SelectList;
13
import org.jfw.apt.orm.annotation.dao.method.operator.SelectList;
24
	int update(Connection con,PartTimeJob job) throws SQLException;
25
	int update(Connection con,PartTimeJob job) throws SQLException;
25
	
26
	
26
	@SelectList
27
	@SelectList
28
	@OrderBy(" ORDER BY STOP_MONTH DESC ")
27
	List<PartTimeJob> query(Connection con,String professorId) throws SQLException;
29
	List<PartTimeJob> query(Connection con,String professorId) throws SQLException;
28
	
30
	
29
	@Nullable
31
	@Nullable

+ 2 - 0
src/main/java/com/ekexiu/portal/dao/PatentDao.java

7
import org.jfw.apt.annotation.Nullable;
7
import org.jfw.apt.annotation.Nullable;
8
import org.jfw.apt.orm.annotation.dao.DAO;
8
import org.jfw.apt.orm.annotation.dao.DAO;
9
import org.jfw.apt.orm.annotation.dao.method.From;
9
import org.jfw.apt.orm.annotation.dao.method.From;
10
import org.jfw.apt.orm.annotation.dao.method.OrderBy;
10
import org.jfw.apt.orm.annotation.dao.method.operator.DeleteWith;
11
import org.jfw.apt.orm.annotation.dao.method.operator.DeleteWith;
11
import org.jfw.apt.orm.annotation.dao.method.operator.Insert;
12
import org.jfw.apt.orm.annotation.dao.method.operator.Insert;
12
import org.jfw.apt.orm.annotation.dao.method.operator.SelectList;
13
import org.jfw.apt.orm.annotation.dao.method.operator.SelectList;
23
	int update(Connection con, Patent patent) throws SQLException;
24
	int update(Connection con, Patent patent) throws SQLException;
24
25
25
	@SelectList
26
	@SelectList
27
	@OrderBy(" ORDER BY YEAR DESC ")
26
	List<Patent> query(Connection con, String professorId) throws SQLException;
28
	List<Patent> query(Connection con, String professorId) throws SQLException;
27
29
28
	@Nullable
30
	@Nullable

+ 2 - 0
src/main/java/com/ekexiu/portal/dao/ProfessorEduBgDao.java

7
import org.jfw.apt.annotation.Nullable;
7
import org.jfw.apt.annotation.Nullable;
8
import org.jfw.apt.orm.annotation.dao.DAO;
8
import org.jfw.apt.orm.annotation.dao.DAO;
9
import org.jfw.apt.orm.annotation.dao.method.From;
9
import org.jfw.apt.orm.annotation.dao.method.From;
10
import org.jfw.apt.orm.annotation.dao.method.OrderBy;
10
import org.jfw.apt.orm.annotation.dao.method.operator.DeleteWith;
11
import org.jfw.apt.orm.annotation.dao.method.operator.DeleteWith;
11
import org.jfw.apt.orm.annotation.dao.method.operator.Insert;
12
import org.jfw.apt.orm.annotation.dao.method.operator.Insert;
12
import org.jfw.apt.orm.annotation.dao.method.operator.SelectList;
13
import org.jfw.apt.orm.annotation.dao.method.operator.SelectList;
24
	int update(Connection con,ProfessorEduBg edu) throws SQLException;
25
	int update(Connection con,ProfessorEduBg edu) throws SQLException;
25
	
26
	
26
	@SelectList
27
	@SelectList
28
	@OrderBy(" ORDER BY YEAR DESC ")
27
	List<ProfessorEduBg> query(Connection con,String professorId) throws SQLException;
29
	List<ProfessorEduBg> query(Connection con,String professorId) throws SQLException;
28
	
30
	
29
	@Nullable
31
	@Nullable

+ 2 - 0
src/main/java/com/ekexiu/portal/dao/ProjectDao.java

7
import org.jfw.apt.annotation.Nullable;
7
import org.jfw.apt.annotation.Nullable;
8
import org.jfw.apt.orm.annotation.dao.DAO;
8
import org.jfw.apt.orm.annotation.dao.DAO;
9
import org.jfw.apt.orm.annotation.dao.method.From;
9
import org.jfw.apt.orm.annotation.dao.method.From;
10
import org.jfw.apt.orm.annotation.dao.method.OrderBy;
10
import org.jfw.apt.orm.annotation.dao.method.operator.DeleteWith;
11
import org.jfw.apt.orm.annotation.dao.method.operator.DeleteWith;
11
import org.jfw.apt.orm.annotation.dao.method.operator.Insert;
12
import org.jfw.apt.orm.annotation.dao.method.operator.Insert;
12
import org.jfw.apt.orm.annotation.dao.method.operator.SelectList;
13
import org.jfw.apt.orm.annotation.dao.method.operator.SelectList;
23
	int update(Connection con,Project project) throws SQLException;
24
	int update(Connection con,Project project) throws SQLException;
24
	
25
	
25
	@SelectList
26
	@SelectList
27
	@OrderBy(" ORDER BY STOP_MONTH DESC ")
26
	List<Project> query(Connection con,String professorId) throws SQLException;
28
	List<Project> query(Connection con,String professorId) throws SQLException;
27
	
29
	
28
	@Nullable
30
	@Nullable

+ 8 - 4
src/main/java/com/ekexiu/portal/dao/ResourceDao.java

77
	@From(Resource.class)
77
	@From(Resource.class)
78
	public abstract int updateCooperationNotes(Connection con,String resourceId,@Set String cooperationNotes) throws SQLException;
78
	public abstract int updateCooperationNotes(Connection con,String resourceId,@Set String cooperationNotes) throws SQLException;
79
	
79
	
80
	@DeleteWith
81
	@From(Resource.class)
82
	public abstract int deletePro(Connection con, String professorId) throws SQLException;
83
	
84
	@DeleteWith
85
	@From(Resource.class)
86
	public abstract int delete(Connection con, String resourceId) throws SQLException;
87
	
80
	/**
88
	/**
81
	 * 查询资源基础信息(ID,名称,学术领域,应用行业,可提供服务,发布者ID,资源图片)
89
	 * 查询资源基础信息(ID,名称,学术领域,应用行业,可提供服务,发布者ID,资源图片)
82
	 * @param con
90
	 * @param con
453
        }
461
        }
454
    }
462
    }
455
	
463
	
456
	@DeleteWith
457
	@From(Resource.class)
458
	public abstract int delete(Connection con, String resourceId) throws SQLException;
459
	
460
	/**
464
	/**
461
	 * 资源搜索页面接口,添加资源拥有者基本信息
465
	 * 资源搜索页面接口,添加资源拥有者基本信息
462
	 * @param key 搜索条件
466
	 * @param key 搜索条件

+ 4 - 4
src/main/java/com/ekexiu/portal/service/ConsultService.java

122
	public PageQueryResult<Consult> queryAssessHis(@JdbcConn Connection con, String professorId,@DefaultValue("5") int pageSize,@DefaultValue("1") int pageNo) throws SQLException {
122
	public PageQueryResult<Consult> queryAssessHis(@JdbcConn Connection con, String professorId,@DefaultValue("5") int pageSize,@DefaultValue("1") int pageNo) throws SQLException {
123
		PageQueryResult<Consult> queryResult = this.consultDao.queryAssessHis(con, professorId, pageSize, pageNo);
123
		PageQueryResult<Consult> queryResult = this.consultDao.queryAssessHis(con, professorId, pageSize, pageNo);
124
		List<Consult> consults = queryResult.getData();
124
		List<Consult> consults = queryResult.getData();
125
		if(consults != null){
125
		if(!consults.isEmpty()){
126
			for (Consult consult : consults) {
126
			for (Consult consult : consults) {
127
				EditProfessor professor = this.professorDao.queryBaseInfo(con, consult.getConsultantId());
127
				EditProfessor professor = this.professorDao.queryBaseInfo(con, consult.getConsultantId());
128
				if(professor != null){
128
				if(professor != null){
186
			@DefaultValue("5") int pageSize, @DefaultValue("1") int pageNo) throws SQLException {
186
			@DefaultValue("5") int pageSize, @DefaultValue("1") int pageNo) throws SQLException {
187
		PageQueryResult<Consult> queryResult = this.consultDao.queryPageProBase(con, professorId, status, timeType, sortType, pageSize, pageNo);
187
		PageQueryResult<Consult> queryResult = this.consultDao.queryPageProBase(con, professorId, status, timeType, sortType, pageSize, pageNo);
188
		List<Consult> consults = queryResult.getData();
188
		List<Consult> consults = queryResult.getData();
189
		if(consults != null){
189
		if(!consults.isEmpty()){
190
			for (Consult consult : consults) {
190
			for (Consult consult : consults) {
191
				EditProfessor professor = this.professorDao.queryBaseInfo(con, consult.getConsultantId());
191
				EditProfessor professor = this.professorDao.queryBaseInfo(con, consult.getConsultantId());
192
				if(professor!=null){
192
				if(professor!=null){
214
			@DefaultValue("5") int pageSize, @DefaultValue("1") int pageNo) throws SQLException {
214
			@DefaultValue("5") int pageSize, @DefaultValue("1") int pageNo) throws SQLException {
215
		PageQueryResult<Consult> queryResult = this.consultDao.queryPageConBase(con, consultantId, status, timeType, sortType, pageSize, pageNo);
215
		PageQueryResult<Consult> queryResult = this.consultDao.queryPageConBase(con, consultantId, status, timeType, sortType, pageSize, pageNo);
216
		List<Consult> consults = queryResult.getData();
216
		List<Consult> consults = queryResult.getData();
217
		if(consults != null){
217
		if(!consults.isEmpty()){
218
			for (Consult consult : consults) {
218
			for (Consult consult : consults) {
219
				EditProfessor professor = this.professorDao.queryBaseInfo(con, consult.getProfessorId());
219
				EditProfessor professor = this.professorDao.queryBaseInfo(con, consult.getProfessorId());
220
				if(professor!=null){
220
				if(professor!=null){
242
			@DefaultValue("1") int timeType, @DefaultValue("10") int pageSize, @DefaultValue("1") int pageNo) throws SQLException {
242
			@DefaultValue("1") int timeType, @DefaultValue("10") int pageSize, @DefaultValue("1") int pageNo) throws SQLException {
243
		PageQueryResult<Consult> queryResult = this.consultDao.queryPageBase(con, professorId, consultOrNeed, consultType, status, timeType, pageSize, pageNo);
243
		PageQueryResult<Consult> queryResult = this.consultDao.queryPageBase(con, professorId, consultOrNeed, consultType, status, timeType, pageSize, pageNo);
244
		List<Consult> consults = queryResult.getData();
244
		List<Consult> consults = queryResult.getData();
245
		if(consults != null){
245
		if(!consults.isEmpty()){
246
			for (Consult consult : consults) {
246
			for (Consult consult : consults) {
247
				EditProfessor professor = new EditProfessor();
247
				EditProfessor professor = new EditProfessor();
248
				if(0 == consultOrNeed){
248
				if(0 == consultOrNeed){

+ 6 - 5
src/main/java/com/ekexiu/portal/service/ProfessorService.java

331
	public PageQueryResult<EditProfessor> queryHot(@JdbcConn Connection con,@DefaultValue("8") int pageSize,@DefaultValue("1") int pageNo) throws SQLException {
331
	public PageQueryResult<EditProfessor> queryHot(@JdbcConn Connection con,@DefaultValue("8") int pageSize,@DefaultValue("1") int pageNo) throws SQLException {
332
		PageQueryResult<EditProfessor> queryResult = this.professorDao.queryHot(con, pageSize, pageNo);
332
		PageQueryResult<EditProfessor> queryResult = this.professorDao.queryHot(con, pageSize, pageNo);
333
		List<EditProfessor> professors = queryResult.getData();
333
		List<EditProfessor> professors = queryResult.getData();
334
		if(professors != null){
334
		if(!professors.isEmpty()){
335
			for (EditProfessor editProfessor : professors) {
335
			for (EditProfessor editProfessor : professors) {
336
				editProfessor.setHasHeadImage(this.imageService.hasProfessorImage(editProfessor.getId()));
336
				editProfessor.setHasHeadImage(this.imageService.hasProfessorImage(editProfessor.getId()));
337
				editProfessor.setResearchAreas(this.researchAreaDao.query(con, editProfessor.getId()));
337
				editProfessor.setResearchAreas(this.researchAreaDao.query(con, editProfessor.getId()));
354
		if(null!=address) {address="%"+address+"%";}
354
		if(null!=address) {address="%"+address+"%";}
355
		PageQueryResult<EditProfessor> queryResult = this.professorDao.queryAPP(con,key,subject,industry,province,address,authType,pageSize,pageNo);
355
		PageQueryResult<EditProfessor> queryResult = this.professorDao.queryAPP(con,key,subject,industry,province,address,authType,pageSize,pageNo);
356
		List<EditProfessor> editProfessors = queryResult.getData();
356
		List<EditProfessor> editProfessors = queryResult.getData();
357
		if(editProfessors != null) {
357
		if(!editProfessors.isEmpty()) {
358
			for (EditProfessor editProfessor : editProfessors) {
358
			for (EditProfessor editProfessor : editProfessors) {
359
				editProfessor.setHasHeadImage(this.imageService.hasProfessorImage(editProfessor.getId()));
359
				editProfessor.setHasHeadImage(this.imageService.hasProfessorImage(editProfessor.getId()));
360
				editProfessor.setResearchAreas(this.researchAreaDao.query(con, editProfessor.getId()));
360
				editProfessor.setResearchAreas(this.researchAreaDao.query(con, editProfessor.getId()));
429
		this.projectDao.delete(con, id);
429
		this.projectDao.delete(con, id);
430
		this.watchDao.deletePro(con, id);
430
		this.watchDao.deletePro(con, id);
431
		this.watchDao.deleteWatch(con, id);
431
		this.watchDao.deleteWatch(con, id);
432
		this.resourceDao.deletePro(con, id);
432
	}
433
	}
433
	
434
	
434
	@Get
435
	@Get
442
		if(null!=address) {address="%"+address+"%";}
443
		if(null!=address) {address="%"+address+"%";}
443
		PageQueryResult<EditProfessor> queryResult = this.professorDao.queryEditBaseInfo(con, key, subject, industry, address, authType, pageSize, pageNo);
444
		PageQueryResult<EditProfessor> queryResult = this.professorDao.queryEditBaseInfo(con, key, subject, industry, address, authType, pageSize, pageNo);
444
		List<EditProfessor> editProfessors = queryResult.getData();
445
		List<EditProfessor> editProfessors = queryResult.getData();
445
		if(editProfessors != null){
446
		if(!editProfessors.isEmpty()){
446
			for (EditProfessor editProfessor : editProfessors) {
447
			for (EditProfessor editProfessor : editProfessors) {
447
				editProfessor.setHasHeadImage(this.imageService.hasProfessorImage(editProfessor.getId()));
448
				editProfessor.setHasHeadImage(this.imageService.hasProfessorImage(editProfessor.getId()));
448
				editProfessor.setResearchAreas(this.researchAreaDao.query(con, editProfessor.getId()));
449
				editProfessor.setResearchAreas(this.researchAreaDao.query(con, editProfessor.getId()));
481
			info.setPatents(this.patentDao.query(con, id));
482
			info.setPatents(this.patentDao.query(con, id));
482
			info.setProjects(this.projectDao.query(con, id));
483
			info.setProjects(this.projectDao.query(con, id));
483
			List<EditResearchAreaLog> logs = this.researchAreaLogDao.query(con, id);
484
			List<EditResearchAreaLog> logs = this.researchAreaLogDao.query(con, id);
484
			if(logs != null){
485
			if(!logs.isEmpty()){
485
				for (EditResearchAreaLog log : logs) {
486
				for (EditResearchAreaLog log : logs) {
486
					log.setHasHeadImage(this.imageService.hasProfessorImage(log.getOpreteProfessorId()));
487
					log.setHasHeadImage(this.imageService.hasProfessorImage(log.getOpreteProfessorId()));
487
				}
488
				}
489
			info.setEditResearchAreaLogs(logs);
490
			info.setEditResearchAreaLogs(logs);
490
			info.setResearchAreas(this.researchAreaDao.query(con, id));
491
			info.setResearchAreas(this.researchAreaDao.query(con, id));
491
			List<Resource> resources = this.resourceDao.queryPro(con, id);
492
			List<Resource> resources = this.resourceDao.queryPro(con, id);
492
			if(resources != null){
493
			if(!resources.isEmpty()){
493
				for (Resource resource : resources) {
494
				for (Resource resource : resources) {
494
					resource.setImages(this.imageDao.queryRes(con, resource.getResourceId()));
495
					resource.setImages(this.imageDao.queryRes(con, resource.getResourceId()));
495
				}
496
				}

+ 4 - 4
src/main/java/com/ekexiu/portal/service/ResourceService.java

178
	public PageQueryResult<Resource> queryPageAll(@JdbcConn Connection con, @DefaultValue("10") int pageSize, @DefaultValue("1") int pageNo) throws SQLException {
178
	public PageQueryResult<Resource> queryPageAll(@JdbcConn Connection con, @DefaultValue("10") int pageSize, @DefaultValue("1") int pageNo) throws SQLException {
179
		PageQueryResult<Resource> queryResult = this.resourceDao.queryPageAll(con, pageSize, pageNo);
179
		PageQueryResult<Resource> queryResult = this.resourceDao.queryPageAll(con, pageSize, pageNo);
180
		List<Resource> resources = queryResult.getData();
180
		List<Resource> resources = queryResult.getData();
181
		if(resources != null){
181
		if(!resources.isEmpty()){
182
			for (Resource resource : resources) {
182
			for (Resource resource : resources) {
183
				resource.setImages(this.imageDao.queryRes(con, resource.getResourceId()));
183
				resource.setImages(this.imageDao.queryRes(con, resource.getResourceId()));
184
			}
184
			}
191
	@Path("/qapro")
191
	@Path("/qapro")
192
	public List<Resource> queryPro(@JdbcConn Connection con, String professorId) throws SQLException {
192
	public List<Resource> queryPro(@JdbcConn Connection con, String professorId) throws SQLException {
193
		List<Resource> resources = this.resourceDao.queryPro(con, professorId);
193
		List<Resource> resources = this.resourceDao.queryPro(con, professorId);
194
		if(resources != null) {
194
		if(!resources.isEmpty()) {
195
			for (Resource resource : resources) {
195
			for (Resource resource : resources) {
196
				resource.setImages(this.imageDao.queryRes(con, resource.getResourceId()));
196
				resource.setImages(this.imageDao.queryRes(con, resource.getResourceId()));
197
			}
197
			}
262
		if(address!=null)address="%"+address+"%";
262
		if(address!=null)address="%"+address+"%";
263
		PageQueryResult<Resource> queryResult =  this.resourceDao.queryPageRes(con, key, subject, industry, province, address, authType, pageSize, pageNo);
263
		PageQueryResult<Resource> queryResult =  this.resourceDao.queryPageRes(con, key, subject, industry, province, address, authType, pageSize, pageNo);
264
		List<Resource> resources = queryResult.getData();
264
		List<Resource> resources = queryResult.getData();
265
		if(resources != null){
265
		if(!resources.isEmpty()){
266
			for (Resource resource : resources) {
266
			for (Resource resource : resources) {
267
				resource.setProfessor(this.professorDao.queryBaseInfo(con, resource.getProfessorId()));
267
				resource.setProfessor(this.professorDao.queryBaseInfo(con, resource.getProfessorId()));
268
				resource.setImages(this.imageDao.queryRes(con, resource.getResourceId()));
268
				resource.setImages(this.imageDao.queryRes(con, resource.getResourceId()));
282
		if(address!=null)address="%"+address+"%";
282
		if(address!=null)address="%"+address+"%";
283
		PageQueryResult<Resource> queryResult = this.resourceDao.queryPage(con, key, subject, industry, address, authType, pageSize, pageNo);
283
		PageQueryResult<Resource> queryResult = this.resourceDao.queryPage(con, key, subject, industry, address, authType, pageSize, pageNo);
284
		List<Resource> resources = queryResult.getData();
284
		List<Resource> resources = queryResult.getData();
285
		if(resources != null){
285
		if(!resources.isEmpty()){
286
			for (Resource resource : resources) {
286
			for (Resource resource : resources) {
287
				resource.setImages(this.imageDao.queryRes(con, resource.getResourceId()));
287
				resource.setImages(this.imageDao.queryRes(con, resource.getResourceId()));
288
			}
288
			}