浏览代码

1.9version

jiapeng 7 年之前
父节点
当前提交
b9c4543ed1
共有 27 个文件被更改,包括 1316 次插入57 次删除
  1. 10 0
      src/main/java/com/ekexiu/portal/dao/ArticleDao.java
  2. 11 0
      src/main/java/com/ekexiu/portal/dao/OrgDao.java
  3. 18 0
      src/main/java/com/ekexiu/portal/dao/OrgRegInfoDao.java
  4. 36 0
      src/main/java/com/ekexiu/portal/dao/PaperAuthorDao.java
  5. 32 0
      src/main/java/com/ekexiu/portal/dao/PatentAuthorDao.java
  6. 56 0
      src/main/java/com/ekexiu/portal/dao/PpaperDao.java
  7. 55 0
      src/main/java/com/ekexiu/portal/dao/PpatentDao.java
  8. 12 0
      src/main/java/com/ekexiu/portal/dao/ResourceDao.java
  9. 24 9
      src/main/java/com/ekexiu/portal/dao/WatchDao.java
  10. 4 0
      src/main/java/com/ekexiu/portal/job/TaskJob.java
  11. 114 0
      src/main/java/com/ekexiu/portal/po/OrgRegInfo.java
  12. 83 0
      src/main/java/com/ekexiu/portal/po/Organization.java
  13. 47 0
      src/main/java/com/ekexiu/portal/po/PaperAuthor.java
  14. 44 0
      src/main/java/com/ekexiu/portal/po/PatentAuthor.java
  15. 96 0
      src/main/java/com/ekexiu/portal/po/Ppaper.java
  16. 101 0
      src/main/java/com/ekexiu/portal/po/Ppatent.java
  17. 5 6
      src/main/java/com/ekexiu/portal/po/Watch.java
  18. 40 0
      src/main/java/com/ekexiu/portal/pojo/AssedPaper.java
  19. 37 0
      src/main/java/com/ekexiu/portal/pojo/AssedPatent.java
  20. 12 0
      src/main/java/com/ekexiu/portal/service/ArticleService.java
  21. 46 41
      src/main/java/com/ekexiu/portal/service/DataDictService.java
  22. 27 0
      src/main/java/com/ekexiu/portal/service/OrgService.java
  23. 134 0
      src/main/java/com/ekexiu/portal/service/PpaperService.java
  24. 133 0
      src/main/java/com/ekexiu/portal/service/PpatentServcie.java
  25. 24 0
      src/main/java/com/ekexiu/portal/service/ResourceService.java
  26. 14 1
      src/main/java/com/ekexiu/portal/service/WatchService.java
  27. 101 0
      src/main/resources/database.sql

+ 10 - 0
src/main/java/com/ekexiu/portal/dao/ArticleDao.java

@ -92,6 +92,11 @@ public abstract class ArticleDao {
92 92
	@Where("STATUS = '1'")
93 93
	public abstract List<Article> queryProPublish(Connection con, String professorId) throws SQLException;
94 94
	
95
	@PageSelect
96
	@OrderBy(" ORDER BY MODIFY_TIME DESC ")
97
	@Where("STATUS = '1'")
98
	public abstract PageQueryResult<Article> pageQueryProPublish(Connection con, String professorId,int pageSize,int pageNo) throws SQLException;
99
	
95 100
	@SelectList
96 101
	@OrderBy(" ORDER BY MODIFY_TIME DESC ")
97 102
	@Where("STATUS IN ('0','1','2')")
@ -106,6 +111,11 @@ public abstract class ArticleDao {
106 111
	@Where("STATUS = '1'")
107 112
	public abstract List<Article> queryOrgPublish(Connection con, String orgId) throws SQLException;
108 113
	
114
	@PageSelect
115
	@OrderBy(" ORDER BY MODIFY_TIME DESC ")
116
	@Where("STATUS = '1'")
117
	public abstract PageQueryResult<Article> pageQueryOrgPublish(Connection con, String orgId,int pageSize,int pageNo) throws SQLException;
118
	
109 119
	@LimitSelect
110 120
	@OrderBy(" ORDER BY MODIFY_TIME DESC ")
111 121
	public abstract List<Article> queryLimit(Connection con,String orgId,@LessThan String modifyTime,int rows)throws SQLException;

+ 11 - 0
src/main/java/com/ekexiu/portal/dao/OrgDao.java

@ -12,6 +12,7 @@ import org.jfw.apt.orm.annotation.dao.DAO;
12 12
import org.jfw.apt.orm.annotation.dao.method.From;
13 13
import org.jfw.apt.orm.annotation.dao.method.OrderBy;
14 14
import org.jfw.apt.orm.annotation.dao.method.Select;
15
import org.jfw.apt.orm.annotation.dao.method.SetSentence;
15 16
import org.jfw.apt.orm.annotation.dao.method.operator.DeleteWith;
16 17
import org.jfw.apt.orm.annotation.dao.method.operator.Insert;
17 18
import org.jfw.apt.orm.annotation.dao.method.operator.LimitQuery;
@ -173,4 +174,14 @@ public abstract class OrgDao {
173 174
	@From(Organization.class)
174 175
	@DeleteWith
175 176
	public abstract int delete(Connection con,String id)throws SQLException;
177
	
178
	
179
	@From(Organization.class)
180
	@UpdateWith
181
	public abstract int updateSortNum(Connection con,String id ,@Set long sortNum)throws SQLException;
182
	@From(Organization.class)
183
	@UpdateWith
184
	@SetSentence("PAGE_VIEWS = PAGE_VIEWS + 1")
185
	public abstract int incPageViews(Connection con,String id)throws SQLException;
186
	
176 187
}

+ 18 - 0
src/main/java/com/ekexiu/portal/dao/OrgRegInfoDao.java

@ -0,0 +1,18 @@
1
package com.ekexiu.portal.dao;
2

3
import java.sql.Connection;
4
import java.sql.SQLException;
5

6
import org.jfw.apt.annotation.Nullable;
7
import org.jfw.apt.orm.annotation.dao.DAO;
8
import org.jfw.apt.orm.annotation.dao.method.operator.SelectOne;
9

10
import com.ekexiu.portal.po.OrgRegInfo;
11

12
@DAO
13
public interface OrgRegInfoDao {
14

15
	@SelectOne
16
	@Nullable
17
	OrgRegInfo query(Connection con ,String name)throws SQLException;
18
}

+ 36 - 0
src/main/java/com/ekexiu/portal/dao/PaperAuthorDao.java

@ -0,0 +1,36 @@
1
package com.ekexiu.portal.dao;
2

3
import java.sql.Connection;
4
import java.sql.SQLException;
5
import java.util.List;
6

7
import org.jfw.apt.orm.annotation.dao.DAO;
8
import org.jfw.apt.orm.annotation.dao.method.From;
9
import org.jfw.apt.orm.annotation.dao.method.SetSentence;
10
import org.jfw.apt.orm.annotation.dao.method.Where;
11
import org.jfw.apt.orm.annotation.dao.method.operator.SelectList;
12
import org.jfw.apt.orm.annotation.dao.method.operator.UpdateWith;
13
import org.jfw.apt.orm.annotation.dao.param.Set;
14

15
import com.ekexiu.portal.po.PaperAuthor;
16

17
@DAO
18
public interface PaperAuthorDao {
19
	
20
	@SelectList
21
	List<PaperAuthor> query(Connection con,String paperId) throws SQLException;
22
	
23
	@UpdateWith
24
	@From(PaperAuthor.class)
25
	@SetSentence("ASS_TIME=TO_CHAR(NOW(),'YYYYMMDDHH24MISS')")
26
	@Where("PROFESSOR_ID='################################'")
27
	int update(Connection con,String paperId,@Set String professorId,String name)throws SQLException;
28
	
29
	@UpdateWith
30
	@From(PaperAuthor.class)
31
	@SetSentence("PROFESSOR_ID='################################")
32
	int update(Connection con,String paperId,String professorId)throws SQLException;
33
	
34
	
35
	
36
}

+ 32 - 0
src/main/java/com/ekexiu/portal/dao/PatentAuthorDao.java

@ -0,0 +1,32 @@
1
package com.ekexiu.portal.dao;
2

3
import java.sql.Connection;
4
import java.sql.SQLException;
5
import java.util.List;
6

7
import org.jfw.apt.orm.annotation.dao.DAO;
8
import org.jfw.apt.orm.annotation.dao.method.From;
9
import org.jfw.apt.orm.annotation.dao.method.SetSentence;
10
import org.jfw.apt.orm.annotation.dao.method.Where;
11
import org.jfw.apt.orm.annotation.dao.method.operator.SelectList;
12
import org.jfw.apt.orm.annotation.dao.method.operator.UpdateWith;
13
import org.jfw.apt.orm.annotation.dao.param.Set;
14

15
import com.ekexiu.portal.po.PatentAuthor;
16
@DAO
17
public interface PatentAuthorDao {
18
	
19
	@SelectList
20
	List<PatentAuthor> query(Connection con,String patentId) throws SQLException;
21
	
22
	@UpdateWith
23
	@From(PatentAuthor.class)
24
	@SetSentence("ASS_TIME=TO_CHAR(NOW(),'YYYYMMDDHH24MISS')")
25
	@Where("PROFESSOR_ID='################################'")
26
	int update(Connection con,String patentId,@Set String professorId,String name)throws SQLException;
27
	
28
	@UpdateWith
29
	@From(PatentAuthor.class)
30
	@SetSentence("PROFESSOR_ID='################################")
31
	int update(Connection con,String patentId,String professorId)throws SQLException;
32
}

+ 56 - 0
src/main/java/com/ekexiu/portal/dao/PpaperDao.java

@ -0,0 +1,56 @@
1
package com.ekexiu.portal.dao;
2

3
import java.sql.Connection;
4
import java.sql.SQLException;
5
import java.util.List;
6

7
import org.jfw.apt.annotation.Nullable;
8
import org.jfw.apt.orm.annotation.dao.DAO;
9
import org.jfw.apt.orm.annotation.dao.method.From;
10
import org.jfw.apt.orm.annotation.dao.method.OrderBy;
11
import org.jfw.apt.orm.annotation.dao.method.SetSentence;
12
import org.jfw.apt.orm.annotation.dao.method.operator.PageQuery;
13
import org.jfw.apt.orm.annotation.dao.method.operator.SelectList;
14
import org.jfw.apt.orm.annotation.dao.method.operator.SelectOne;
15
import org.jfw.apt.orm.annotation.dao.method.operator.UpdateWith;
16
import org.jfw.apt.orm.annotation.dao.param.In;
17
import org.jfw.apt.orm.annotation.dao.param.Set;
18
import org.jfw.apt.orm.annotation.dao.param.SqlColumn;
19
import org.jfw.apt.orm.core.defaultImpl.FixLenStringHandler;
20
import org.jfw.util.PageQueryResult;
21

22
import com.ekexiu.portal.po.Ppaper;
23
import com.ekexiu.portal.pojo.AssedPaper;
24

25
@DAO
26
public interface PpaperDao {
27

28
	@SelectOne
29
	@Nullable
30
	Ppaper query(Connection con, String id) throws SQLException;
31

32
	@SelectList
33
	List<Ppaper> query(Connection con, @In String[] id) throws SQLException;
34

35
	@UpdateWith
36
	@From(Ppaper.class)
37
	int update(Connection con, String id, @Set @Nullable String keywords) throws SQLException;
38

39
	@PageQuery
40
	@OrderBy(" ORDER BY ASS_TIMIE DESC,ID ASC")
41
	PageQueryResult<AssedPaper> pageQueryWithProfessor(Connection con,
42
			@SqlColumn(handlerClass = FixLenStringHandler.class, value = { "A.PROFESSOR_ID=?" }) String professId,
43
			@SqlColumn(handlerClass = FixLenStringHandler.class, value = { "P.NAME LIKE ?" }) String name, int pageSize, int pageNo) throws SQLException;
44

45
	@PageQuery
46
	@OrderBy(" ORDER BY ASS_TIMIE DESC,ID ASC")
47
	PageQueryResult<AssedPaper> pageQueryWithAuthor(Connection con,
48
			@SqlColumn(handlerClass = FixLenStringHandler.class, value = { "A.NAME=?" }) String author,
49
			@SqlColumn(handlerClass = FixLenStringHandler.class, value = { "P.NAME LIKE ?" }) String name, int pageSize, int pageNo) throws SQLException;
50
	
51
	@From(Ppaper.class)
52
	@UpdateWith
53
	@SetSentence("PAGE_VIEWS = PAGE_VIEWS + 1")
54
	public abstract int incPageViews(Connection con,String id)throws SQLException;
55

56
}

+ 55 - 0
src/main/java/com/ekexiu/portal/dao/PpatentDao.java

@ -0,0 +1,55 @@
1
package com.ekexiu.portal.dao;
2

3
import java.sql.Connection;
4
import java.sql.SQLException;
5
import java.util.List;
6

7
import org.jfw.apt.annotation.Nullable;
8
import org.jfw.apt.orm.annotation.dao.DAO;
9
import org.jfw.apt.orm.annotation.dao.method.From;
10
import org.jfw.apt.orm.annotation.dao.method.OrderBy;
11
import org.jfw.apt.orm.annotation.dao.method.SetSentence;
12
import org.jfw.apt.orm.annotation.dao.method.operator.PageQuery;
13
import org.jfw.apt.orm.annotation.dao.method.operator.SelectList;
14
import org.jfw.apt.orm.annotation.dao.method.operator.SelectOne;
15
import org.jfw.apt.orm.annotation.dao.method.operator.UpdateWith;
16
import org.jfw.apt.orm.annotation.dao.param.In;
17
import org.jfw.apt.orm.annotation.dao.param.Set;
18
import org.jfw.apt.orm.annotation.dao.param.SqlColumn;
19
import org.jfw.apt.orm.core.defaultImpl.FixLenStringHandler;
20
import org.jfw.util.PageQueryResult;
21

22
import com.ekexiu.portal.po.Ppatent;
23
import com.ekexiu.portal.pojo.AssedPatent;
24

25
@DAO
26
public interface PpatentDao {
27
	@SelectOne
28
	@Nullable
29
	Ppatent query(Connection con, String id) throws SQLException;
30

31
	@SelectList
32
	List<Ppatent> query(Connection con, @In String[] id) throws SQLException;
33

34
	@UpdateWith
35
	@From(Ppatent.class)
36
	int update(Connection con, String id, @Set String keywords) throws SQLException;
37

38
	@PageQuery
39
	@OrderBy(" ORDER BY ASS_TIMIE DESC,ID ASC")
40
	PageQueryResult<AssedPatent> pageQueryWithProfessor(Connection con,
41
			@SqlColumn(handlerClass = FixLenStringHandler.class, value = { "A.PROFESSOR_ID=?" }) String professId,
42
			@SqlColumn(handlerClass = FixLenStringHandler.class, value = { "P.NAME LIKE ?" }) String name, int pageSize, int pageNo) throws SQLException;
43

44
	@PageQuery
45
	@OrderBy(" ORDER BY ASS_TIMIE DESC,ID ASC")
46
	PageQueryResult<AssedPatent> pageQueryWithAuthor(Connection con,
47
			@SqlColumn(handlerClass = FixLenStringHandler.class, value = { "A.NAME=?" }) String author,
48
			@SqlColumn(handlerClass = FixLenStringHandler.class, value = { "P.NAME LIKE ?" }) String name, int pageSize, int pageNo) throws SQLException;
49
	
50
	@From(Ppatent.class)
51
	@UpdateWith
52
	@SetSentence("PAGE_VIEWS = PAGE_VIEWS + 1")
53
	public abstract int incPageViews(Connection con,String id)throws SQLException;
54

55
}

+ 12 - 0
src/main/java/com/ekexiu/portal/dao/ResourceDao.java

@ -19,6 +19,7 @@ import org.jfw.apt.orm.annotation.dao.method.Where;
19 19
import org.jfw.apt.orm.annotation.dao.method.operator.DeleteWith;
20 20
import org.jfw.apt.orm.annotation.dao.method.operator.Insert;
21 21
import org.jfw.apt.orm.annotation.dao.method.operator.LimitSelect;
22
import org.jfw.apt.orm.annotation.dao.method.operator.PageSelect;
22 23
import org.jfw.apt.orm.annotation.dao.method.operator.SelectList;
23 24
import org.jfw.apt.orm.annotation.dao.method.operator.SelectOne;
24 25
import org.jfw.apt.orm.annotation.dao.method.operator.Update;
@ -1079,6 +1080,12 @@ public abstract class ResourceDao {
1079 1080
	@Where("STATUS = '1'")
1080 1081
	public abstract List<Resource> queryProPublish(Connection con,String professorId) throws SQLException;
1081 1082
	
1083
	
1084
	@PageSelect
1085
	@OrderBy("ORDER BY PUBLISH_TIME DESC")
1086
	@Where("STATUS = '1'")
1087
	public abstract PageQueryResult<Resource> pageQueryProPublish(Connection con,String professorId,int pageSize,int pageNo) throws SQLException;
1088
	
1082 1089
	@SelectList
1083 1090
	@OrderBy("ORDER BY PUBLISH_TIME DESC")
1084 1091
	@Where("STATUS IN ('0','1')")
@ -1089,6 +1096,11 @@ public abstract class ResourceDao {
1089 1096
	@Where("STATUS = '1'")
1090 1097
	public abstract List<Resource> queryOrgPublish(Connection con,String orgId) throws SQLException;
1091 1098
	
1099
	@PageSelect
1100
	@OrderBy("ORDER BY PUBLISH_TIME DESC")
1101
	@Where("STATUS = '1'")
1102
	public abstract PageQueryResult<Resource> pageQueryOrgPublish(Connection con,String orgId,int pageSize,int pageNo) throws SQLException;
1103
	
1092 1104
	/**
1093 1105
	 * 按专家ID查询发布的所有资源
1094 1106
	 * @param con

+ 24 - 9
src/main/java/com/ekexiu/portal/dao/WatchDao.java

@ -4,15 +4,19 @@ import java.sql.Connection;
4 4
import java.sql.SQLException;
5 5
import java.util.List;
6 6

7
import org.jfw.apt.annotation.DefaultValue;
7 8
import org.jfw.apt.annotation.Nullable;
9
import org.jfw.apt.orm.annotation.dao.Column;
8 10
import org.jfw.apt.orm.annotation.dao.DAO;
9 11
import org.jfw.apt.orm.annotation.dao.method.From;
10 12
import org.jfw.apt.orm.annotation.dao.method.OrderBy;
11 13
import org.jfw.apt.orm.annotation.dao.method.operator.DeleteWith;
12 14
import org.jfw.apt.orm.annotation.dao.method.operator.Insert;
13 15
import org.jfw.apt.orm.annotation.dao.method.operator.PageSelect;
16
import org.jfw.apt.orm.annotation.dao.method.operator.QueryVal;
14 17
import org.jfw.apt.orm.annotation.dao.method.operator.SelectList;
15 18
import org.jfw.apt.orm.annotation.dao.method.operator.SelectOne;
19
import org.jfw.apt.orm.core.defaultImpl.IntHandler;
16 20
import org.jfw.util.PageQueryResult;
17 21

18 22
import com.ekexiu.portal.po.Watch;
@ -21,30 +25,41 @@ import com.ekexiu.portal.po.Watch;
21 25
public abstract class WatchDao {
22 26
	@Insert
23 27
	public abstract int insert(Connection con, Watch watch) throws SQLException;
24
	
28

25 29
	@DeleteWith
26 30
	@From(Watch.class)
27 31
	public abstract int delete(Connection con, String professorId, String watchObject) throws SQLException;
28
	
32

29 33
	@DeleteWith
30 34
	@From(Watch.class)
31 35
	public abstract int deletePro(Connection con, String professorId) throws SQLException;
32
	
36

33 37
	@DeleteWith
34 38
	@From(Watch.class)
35 39
	public abstract int deleteWatch(Connection con, String watchObject) throws SQLException;
36
	
40

37 41
	@Nullable
38 42
	@SelectOne
39 43
	public abstract Watch queryOne(Connection con, String professorId, String watchObject) throws SQLException;
40
	
44

41 45
	@PageSelect
42 46
	@OrderBy(" ORDER BY CREATE_TIME DESC ")
43
	public abstract PageQueryResult<Watch> queryPro(Connection con, String professorId, 
44
			Integer watchType, int pageSize, int pageNo) throws SQLException;
45
	
47
	public abstract PageQueryResult<Watch> queryPro(Connection con, String professorId, short watchType, int pageSize, int pageNo) throws SQLException;
48

46 49
	@SelectList
47 50
	@OrderBy(" ORDER BY CREATE_TIME DESC ")
48 51
	public abstract List<Watch> queryWatch(Connection con, String watchObject) throws SQLException;
49
	
52

53
	@QueryVal
54
	@From(Watch.class)
55
	@Column(value = "COUNT(1)", handlerClass = IntHandler.class)
56
	@DefaultValue("0")
57
	public abstract int countWatchObject(Connection con, String professorId, short watchType) throws SQLException;
58

59
	@QueryVal
60
	@From(Watch.class)
61
	@Column(value = "COUNT(1)", handlerClass = IntHandler.class)
62
	@DefaultValue("0")
63
	public abstract int countProfessor(Connection con, String watchObject, short watchType) throws SQLException;
64

50 65
}

+ 4 - 0
src/main/java/com/ekexiu/portal/job/TaskJob.java

@ -52,6 +52,10 @@ public class TaskJob implements AfterBeanFactory {
52 52
		long hkjeTaskTime = hkjeTask - System.currentTimeMillis();
53 53
		hkjeTaskTime = hkjeTaskTime > 0 ? hkjeTaskTime : hkjeTaskTime + hkje.getDelayTime();
54 54
		service.scheduleAtFixedRate(hkje, hkjeTaskTime, hkje.getDelayTime(), TimeUnit.MILLISECONDS);
55
		if(hkjeTaskTime>300*1000){
56
			service.submit(hkje);
57
		}
58
		
55 59
		service.scheduleAtFixedRate(new Runnable() {
56 60
			@Override
57 61
			public void run() {

+ 114 - 0
src/main/java/com/ekexiu/portal/po/OrgRegInfo.java

@ -0,0 +1,114 @@
1
package com.ekexiu.portal.po;
2

3
import org.jfw.apt.orm.annotation.entry.Column;
4
import org.jfw.apt.orm.annotation.entry.PrimaryKey;
5
import org.jfw.apt.orm.annotation.entry.Table;
6
import org.jfw.apt.orm.core.enums.DE;
7

8
@PrimaryKey("code")
9
@Table
10
public class OrgRegInfo {
11
	
12
	private String name;
13
//	 工商注册号:330108000016033
14
	private String num;
15
//	组织机构代码:673959654 
16
	private String code;
17
//	统一信用代码:91330106673959654P 
18
	private String  creditCode;
19
//	企业类型:私营有限责任公司(自然人控股或私营性质企业控股) 
20
	private String type;
21
//	行业:软件和信息技术服务业 
22
	private  String industry;
23
//	营业期限:2008-04-08至2038-04-07 
24
	private String operatingPeriod;
25
//	核准日期:2017-05-05 
26
	private String dayOfApproval;
27
//	登记机关:杭州市西湖区市场监督管理局 
28
	private String manager;
29
//	注册地址:浙江省杭州市西湖区转塘科技经济区块16号8幢 
30
	private String addr;
31
//	经营范围: 第一类增值电信业务中的因特网数据中心业务;第二类增值电信业务中的因特网接入服务业务;第二类增值电信业务中的信息服务业务(不含固定网电话信息服务),利用自有网站发布国内网络广告(涉及前置审批项目的,在有效期内方可经营)。服务:计算机软硬件、电子产品、数码产品的技术开发、技术服务,设计、制作、代理国内广告,成年人的非文化教育培训、成年人的非证书劳动职业技能培训(涉及前置审批的项目除外);批发、零售:计算机软硬件,电子产品(除专控),数码产品;会务服务,承办展览,展览展示设计。
32
	private String scopeOfBusiness;
33
	
34
	@Column(DE.text_de)
35
	public String getName() {
36
		return name;
37
	}
38
	public void setName(String name) {
39
		this.name = name;
40
	}
41
	@Column(DE.text_de)
42
	public String getNum() {
43
		return num;
44
	}
45
	public void setNum(String num) {
46
		this.num = num;
47
	}
48
	@Column(DE.text_de)
49
	public String getCode() {
50
		return code;
51
	}
52
	public void setCode(String code) {
53
		this.code = code;
54
	}
55
	@Column(DE.Text_de)
56
	public String getCreditCode() {
57
		return creditCode;
58
	}
59
	public void setCreditCode(String creditCode) {
60
		this.creditCode = creditCode;
61
	}
62
	@Column(DE.text_de)
63
	public String getType() {
64
		return type;
65
	}
66
	public void setType(String type) {
67
		this.type = type;
68
	}
69
	@Column(DE.text_de)
70
	public String getIndustry() {
71
		return industry;
72
	}
73
	public void setIndustry(String industry) {
74
		this.industry = industry;
75
	}
76
	@Column(DE.text_de)
77
	public String getOperatingPeriod() {
78
		return operatingPeriod;
79
	}
80
	public void setOperatingPeriod(String operatingPeriod) {
81
		this.operatingPeriod = operatingPeriod;
82
	}
83
	@Column(DE.text_de)
84
	public String getDayOfApproval() {
85
		return dayOfApproval;
86
	}
87
	public void setDayOfApproval(String dayOfApproval) {
88
		this.dayOfApproval = dayOfApproval;
89
	}
90
	@Column(DE.text_de)
91
	public String getManager() {
92
		return manager;
93
	}
94
	
95
	public void setManager(String manager) {
96
		this.manager = manager;
97
	}
98
	@Column(DE.text_de)
99
	public String getAddr() {
100
		return addr;
101
	}
102
	public void setAddr(String addr) {
103
		this.addr = addr;
104
	}
105
	@Column(DE.text_de)
106
	public String getScopeOfBusiness() {
107
		return scopeOfBusiness;
108
	}
109
	public void setScopeOfBusiness(String scopeOfBusiness) {
110
		this.scopeOfBusiness = scopeOfBusiness;
111
	}
112
	
113
	
114
}

+ 83 - 0
src/main/java/com/ekexiu/portal/po/Organization.java

@ -6,6 +6,7 @@ import org.jfw.apt.orm.annotation.entry.Table;
6 6
import org.jfw.apt.orm.annotation.entry.Unique;
7 7
import org.jfw.apt.orm.annotation.entry.Uniques;
8 8
import org.jfw.apt.orm.core.defaultImpl.FixLenStringHandler;
9
import org.jfw.apt.orm.core.defaultImpl.LongHandler;
9 10
import org.jfw.apt.orm.core.defaultImpl.StringHandler;
10 11
import org.jfw.apt.orm.core.enums.DE;
11 12
@ -54,6 +55,36 @@ public class Organization extends BaseOrganization implements CreateTimeSupporte
54 55
	private String descp;
55 56
	private String createTime;
56 57
	private String modifyTime;
58
	
59
	/**
60
	 * 详细地址
61
	 */
62
	private String addr;
63
	/**
64
	 * 联系邮箱
65
	 */
66
	private String email;
67
	/**
68
	 * 联系电话
69
	 */
70
	private String contactNum;
71
	/**
72
	 * 客户领域
73
	 */
74
	private String fieldOfCustomer;
75
	/**
76
	 * 供应商领域
77
	 */
78
	private String fieldOfSupplier;
79
	/**
80
	 * 排序字段
81
	 */
82
	private long sortNum;
83
	/**
84
	 * 浏览量
85
	 */
86
	private long pageViews;
87
	
57 88
58 89
	@Column(value=DE.String_de,dbType="VARCHAR(20)")
59 90
	public String getForShort() {
@ -150,4 +181,56 @@ public class Organization extends BaseOrganization implements CreateTimeSupporte
150 181
	public void setModifyTime(String modifyTime) {
151 182
		this.modifyTime = modifyTime;
152 183
	}
184
	@Column(DE.Text_de)
185
	public String getAddr() {
186
		return addr;
187
	}
188
	public void setAddr(String addr) {
189
		this.addr = addr;
190
	}
191
	@Column(DE.Text_de)
192
	public String getEmail() {
193
		return email;
194
	}
195
	public void setEmail(String email) {
196
		this.email = email;
197
	}
198
	@Column(DE.Text_de)
199
	public String getContactNum() {
200
		return contactNum;
201
	}
202
	public void setContactNum(String contactNum) {
203
		this.contactNum = contactNum;
204
	}
205
	@Column(DE.Text_de)
206
	public String getFieldOfCustomer() {
207
		return fieldOfCustomer;
208
	}
209
	public void setFieldOfCustomer(String fieldOfCustomer) {
210
		this.fieldOfCustomer = fieldOfCustomer;
211
	}
212
	@Column(DE.Text_de)
213
	public String getFieldOfSupplier() {
214
		return fieldOfSupplier;
215
	}
216
	public void setFieldOfSupplier(String fieldOfSupplier) {
217
		this.fieldOfSupplier = fieldOfSupplier;
218
	}
219
	@Column(handlerClass=LongHandler.class,dbType="BIGINT",fixSqlValueWithInsert="0",insertable=true,renewable=false,nullable=false,queryable=true)
220
	public long getSortNum() {
221
		return sortNum;
222
	}
223
	public void setSortNum(long sortNum) {
224
		this.sortNum = sortNum;
225
	}
226
	@Column(handlerClass=LongHandler.class,dbType="BIGINT",fixSqlValueWithInsert="0",insertable=true,renewable=false,nullable=false,queryable=true)
227
	public long getPageViews() {
228
		return pageViews;
229
	}
230
	public void setPageViews(long pageViews) {
231
		this.pageViews = pageViews;
232
	}
233
	
234
	
235
	
153 236
}

+ 47 - 0
src/main/java/com/ekexiu/portal/po/PaperAuthor.java

@ -0,0 +1,47 @@
1
package com.ekexiu.portal.po;
2

3
import org.jfw.apt.orm.annotation.entry.Column;
4
import org.jfw.apt.orm.annotation.entry.PrimaryKey;
5
import org.jfw.apt.orm.annotation.entry.Table;
6
import org.jfw.apt.orm.core.enums.DE;
7

8
@PrimaryKey({"paperId","name"})
9
@Table
10
public class PaperAuthor {
11
	private String paperId;
12
	private String name;
13
	private String professorId;
14
	private String assTime;
15
	
16
	@Column(DE.id_32)
17
	public String getPaperId() {
18
		return paperId;
19
	}
20
	public void setPaperId(String paperId) {
21
		this.paperId = paperId;
22
	}
23
	@Column(DE.text_de)
24
	public String getName() {
25
		return name;
26
	}
27
	public void setName(String name) {
28
		this.name = name;
29
	}
30
	@Column(DE.id_32)
31
	public String getProfessorId() {
32
		return professorId;
33
	}
34
	public void setProfessorId(String professorId) {
35
		this.professorId = professorId;
36
	}
37
	@Column(DE.dateTime_de)
38
	public String getAssTime() {
39
		return assTime;
40
	}
41
	public void setAssTime(String assTime) {
42
		this.assTime = assTime;
43
	}
44
	
45
	
46

47
}

+ 44 - 0
src/main/java/com/ekexiu/portal/po/PatentAuthor.java

@ -0,0 +1,44 @@
1
package com.ekexiu.portal.po;
2

3
import org.jfw.apt.orm.annotation.entry.Column;
4
import org.jfw.apt.orm.annotation.entry.PrimaryKey;
5
import org.jfw.apt.orm.annotation.entry.Table;
6
import org.jfw.apt.orm.core.enums.DE;
7

8
@PrimaryKey({"patentId","name"})
9
@Table
10
public class PatentAuthor {
11
	private String patentId;
12
	private String name;
13
	private String professorId;
14
	private String assTime;
15
	
16
	@Column(DE.id_32)
17
	public String getPatentId() {
18
		return patentId;
19
	}
20
	public void setPatentId(String patentId) {
21
		this.patentId = patentId;
22
	}
23
	@Column(DE.text_de)
24
	public String getName() {
25
		return name;
26
	}
27
	public void setName(String name) {
28
		this.name = name;
29
	}
30
	@Column(DE.id_32)
31
	public String getProfessorId() {
32
		return professorId;
33
	}
34
	public void setProfessorId(String professorId) {
35
		this.professorId = professorId;
36
	}
37
	@Column(DE.dateTime_de)
38
	public String getAssTime() {
39
		return assTime;
40
	}
41
	public void setAssTime(String assTime) {
42
		this.assTime = assTime;
43
	}
44
}

+ 96 - 0
src/main/java/com/ekexiu/portal/po/Ppaper.java

@ -0,0 +1,96 @@
1
package com.ekexiu.portal.po;
2

3
import org.jfw.apt.orm.annotation.entry.Column;
4
import org.jfw.apt.orm.annotation.entry.PrimaryKey;
5
import org.jfw.apt.orm.annotation.entry.Table;
6
import org.jfw.apt.orm.core.enums.DE;
7

8
@PrimaryKey("id")
9
@Table
10
public class Ppaper {
11
	private String id; // char(32)  NOT NULL,
12
	private String name; // text COLLATE "zh_CN.utf8" NOT NULL,
13
	private long pageViews;// int8 DEFAULT 0 NOT NULL,
14
	private String cn4periodical;// text,
15
	private String en4periodical;// text,
16
	private String periodicaltype;// text,
17
	private String pubDay;// text,
18
	private String summary;// text COLLATE "zh_CN.utf8" NOT NULL,
19
	private String keywords;// text COLLATE "zh_CN.utf8",
20
	private String ref_param;// text);
21
	
22
	@Column(DE.id_32)
23
	public String getId() {
24
		return id;
25
	}
26
	public void setId(String id) {
27
		this.id = id;
28
	}
29
	@Column(DE.text_de)
30
	public String getName() {
31
		return name;
32
	}
33

34
	public void setName(String name) {
35
		this.name = name;
36
	}
37
	@Column(value=DE.long_de)
38
	public long getPageViews() {
39
		return pageViews;
40
	}
41
	public void setPageViews(long pageViews) {
42
		this.pageViews = pageViews;
43
	}
44
	@Column(DE.Text_de)
45
	public String getCn4periodical() {
46
		return cn4periodical;
47
	}
48
	public void setCn4periodical(String cn4periodical) {
49
		this.cn4periodical = cn4periodical;
50
	}
51
	@Column(DE.Text_de)
52
	public String getEn4periodical() {
53
		return en4periodical;
54
	}
55
	public void setEn4periodical(String en4periodical) {
56
		this.en4periodical = en4periodical;
57
	}
58
	@Column(DE.Text_de)
59
	public String getPeriodicaltype() {
60
		return periodicaltype;
61
	}
62
	public void setPeriodicaltype(String periodicaltype) {
63
		this.periodicaltype = periodicaltype;
64
	}
65
	@Column(DE.text_de)
66
	public String getPubDay() {
67
		return pubDay;
68
	}
69
	public void setPubDay(String pubDay) {
70
		this.pubDay = pubDay;
71
	}
72
	@Column(DE.text_de)
73
	public String getSummary() {
74
		return summary;
75
	}
76
	public void setSummary(String summary) {
77
		this.summary = summary;
78
	}
79
	@Column(DE.Text_de)
80
	public String getKeywords() {
81
		return keywords;
82
	}
83
	public void setKeywords(String keywords) {
84
		this.keywords = keywords;
85
	}
86
	@Column(DE.Text_de)
87
	public String getRef_param() {
88
		return ref_param;
89
	}
90
	public void setRef_param(String ref_param) {
91
		this.ref_param = ref_param;
92
	}
93
	
94
	
95
	
96
}

+ 101 - 0
src/main/java/com/ekexiu/portal/po/Ppatent.java

@ -0,0 +1,101 @@
1
package com.ekexiu.portal.po;
2

3
import org.jfw.apt.orm.annotation.entry.Column;
4
import org.jfw.apt.orm.annotation.entry.PrimaryKey;
5
import org.jfw.apt.orm.annotation.entry.Table;
6
import org.jfw.apt.orm.core.enums.DE;
7

8
@PrimaryKey("id")
9
@Table
10
public class Ppatent {
11
	private String id;// char(32)  NOT NULL,
12
	private String name;// text COLLATE "zh_CN.utf8" NOT NULL,
13
	private long pageViews;// int8 DEFAULT 0 NOT NULL,
14
	private String code;// text  NOT NULL,
15
	private String  reqCode;// text NOT NULL,
16
	private String reqPerson;// text COLLATE "zh_CN.utf8",
17
	private String reqDay;// char(8) NOT NULL,
18
	private String pubDay;// char(8) NOT NULL,
19
	private String summary;// text COLLATE "zh_CN.utf8" NOT NULL,
20
	private String ref_param;// text ,
21
	private String keywords;// text COLLATE "zh_CN.utf8"
22
	
23
	@Column(DE.id_32)
24
	public String getId() {
25
		return id;
26
	}
27
	public void setId(String id) {
28
		this.id = id;
29
	}
30
	@Column(DE.text_de)
31
	public String getName() {
32
		return name;
33
	}
34
	public void setName(String name) {
35
		this.name = name;
36
	}
37
	@Column(DE.long_de)
38
	public long getPageViews() {
39
		return pageViews;
40
	}
41
	public void setPageViews(long pageViews) {
42
		this.pageViews = pageViews;
43
	}
44
	@Column(DE.Text_de)
45
	public String getCode() {
46
		return code;
47
	}
48
	public void setCode(String code) {
49
		this.code = code;
50
	}
51
	@Column(DE.Text_de)
52
	public String getReqCode() {
53
		return reqCode;
54
	}
55
	public void setReqCode(String reqCode) {
56
		this.reqCode = reqCode;
57
	}
58
	@Column(DE.Text_de)
59
	public String getReqPerson() {
60
		return reqPerson;
61
	}
62
	public void setReqPerson(String reqPerson) {
63
		this.reqPerson = reqPerson;
64
	}
65
	@Column(DE.Text_de)
66
	public String getReqDay() {
67
		return reqDay;
68
	}
69
	public void setReqDay(String reqDay) {
70
		this.reqDay = reqDay;
71
	}
72
	@Column(DE.Text_de)
73
	public String getPubDay() {
74
		return pubDay;
75
	}
76
	public void setPubDay(String pubDay) {
77
		this.pubDay = pubDay;
78
	}
79
	@Column(DE.text_de)
80
	public String getSummary() {
81
		return summary;
82
	}
83
	public void setSummary(String summary) {
84
		this.summary = summary;
85
	}
86
	@Column(DE.Text_de)
87
	public String getRef_param() {
88
		return ref_param;
89
	}
90
	public void setRef_param(String ref_param) {
91
		this.ref_param = ref_param;
92
	}
93
	@Column(DE.Text_de)
94
	public String getKeywords() {
95
		return keywords;
96
	}
97
	public void setKeywords(String keywords) {
98
		this.keywords = keywords;
99
	}
100
	
101
}

+ 5 - 6
src/main/java/com/ekexiu/portal/po/Watch.java

@ -5,7 +5,6 @@ import org.jfw.apt.orm.annotation.entry.PrimaryKey;
5 5
import org.jfw.apt.orm.annotation.entry.Table;
6 6
import org.jfw.apt.orm.annotation.entry.Unique;
7 7
import org.jfw.apt.orm.annotation.entry.Uniques;
8
import org.jfw.apt.orm.core.defaultImpl.WIntHandler;
9 8
import org.jfw.apt.orm.core.enums.DE;
10 9

11 10
import com.ekexiu.portal.basepo.CreateTimeSupported;
@ -18,7 +17,7 @@ public class Watch implements CreateTimeSupported {
18 17
	private String professorId;
19 18
	private String watchObject;
20 19
	private String createTime;
21
	private Integer watchType;
20
	private short watchType;
22 21
	private EditProfessor professor;
23 22
	private Resource resource;
24 23
	private Article article;
@ -50,7 +49,7 @@ public class Watch implements CreateTimeSupported {
50 49
		this.professorId = professorId;
51 50
	}
52 51
	
53
	@Column(DE.id_32)
52
	@Column(DE.string_de)
54 53
	public String getWatchObject() {
55 54
		return watchObject;
56 55
	}
@ -65,11 +64,11 @@ public class Watch implements CreateTimeSupported {
65 64
		this.createTime = createTime;
66 65
	}
67 66
	
68
	@Column(handlerClass=WIntHandler.class,dbType="INT",insertable=true,nullable=false,renewable=true,queryable=true)
69
	public Integer getWatchType() {
67
	@Column(DE.short_de)
68
	public short getWatchType() {
70 69
		return watchType;
71 70
	}
72
	public void setWatchType(Integer watchType) {
71
	public void setWatchType(short watchType) {
73 72
		this.watchType = watchType;
74 73
	}
75 74
	

+ 40 - 0
src/main/java/com/ekexiu/portal/pojo/AssedPaper.java

@ -0,0 +1,40 @@
1
package com.ekexiu.portal.pojo;
2

3
import org.jfw.apt.orm.annotation.entry.CalcColumn;
4
import org.jfw.apt.orm.annotation.entry.ExtendView;
5
import org.jfw.apt.orm.core.defaultImpl.FixLenStringHandler;
6
import org.jfw.apt.orm.core.defaultImpl.StringHandler;
7

8
import com.ekexiu.portal.po.Ppaper;
9

10
@ExtendView(fromSentence = "PPAPER P INNER JOIN PAPER_AUTHOR A ON P.ID=A.PAPER_ID", tableAlias = "P")
11
public class AssedPaper extends Ppaper {
12
	
13
	private String professorId;
14
	private String authorName;
15
	private String assTime;
16
	
17
	@CalcColumn(column = "A.PROFESSOR_ID PROFESSOR_ID",handlerClass=FixLenStringHandler.class,nullable=false)
18
	public String getProfessorId() {
19
		return professorId;
20
	}
21
	public void setProfessorId(String professorId) {
22
		this.professorId = professorId;
23
	}
24
	@CalcColumn(column = "A.NAME AUTHOR_NAME",handlerClass=StringHandler.class,nullable=false)
25
	public String getAuthorName() {
26
		return authorName;
27
	}
28
	public void setAuthorName(String authorName) {
29
		this.authorName = authorName;
30
	}
31
	@CalcColumn(column="A.ASS_TIME ASS_TIME",handlerClass=StringHandler.class,nullable=false)
32
	public String getAssTime() {
33
		return assTime;
34
	}
35
	public void setAssTime(String assTime) {
36
		this.assTime = assTime;
37
	}
38
	
39
	
40
}

+ 37 - 0
src/main/java/com/ekexiu/portal/pojo/AssedPatent.java

@ -0,0 +1,37 @@
1
package com.ekexiu.portal.pojo;
2

3
import org.jfw.apt.orm.annotation.entry.CalcColumn;
4
import org.jfw.apt.orm.annotation.entry.ExtendView;
5
import org.jfw.apt.orm.core.defaultImpl.FixLenStringHandler;
6
import org.jfw.apt.orm.core.defaultImpl.StringHandler;
7

8
import com.ekexiu.portal.po.Ppatent;
9

10
@ExtendView(fromSentence = "PPATENT P INNER JOIN PATENT_AUTHOR A ON P.ID=A.PATENT_ID", tableAlias = "P")
11
public class AssedPatent extends Ppatent {
12
	private String professorId;
13
	private String authorName;
14
	private String assTime;
15
	
16
	@CalcColumn(column = "A.PROFESSOR_ID PROFESSOR_ID",handlerClass=FixLenStringHandler.class,nullable=false)
17
	public String getProfessorId() {
18
		return professorId;
19
	}
20
	public void setProfessorId(String professorId) {
21
		this.professorId = professorId;
22
	}
23
	@CalcColumn(column = "A.NAME AUTHOR_NAME",handlerClass=StringHandler.class,nullable=false)
24
	public String getAuthorName() {
25
		return authorName;
26
	}
27
	public void setAuthorName(String authorName) {
28
		this.authorName = authorName;
29
	}
30
	@CalcColumn(column="A.ASS_TIME ASS_TIME",handlerClass=StringHandler.class,nullable=false)
31
	public String getAssTime() {
32
		return assTime;
33
	}
34
	public void setAssTime(String assTime) {
35
		this.assTime = assTime;
36
	}
37
}

+ 12 - 0
src/main/java/com/ekexiu/portal/service/ArticleService.java

@ -592,6 +592,12 @@ public class ArticleService {
592 592
		return this.articleDao.queryProPublish(con, professorId);
593 593
	}
594 594
	
595
	@Get
596
	@Path("/pqProPublish")
597
	public PageQueryResult<Article> pageQueryProPublish(@JdbcConn Connection con, String professorId,@DefaultValue("10") int pageSize,@DefaultValue("1") int pageNo) throws SQLException{
598
		return this.articleDao.pageQueryProPublish(con, professorId,pageSize,pageNo);
599
	}
600
	
595 601
	@Get
596 602
	@Path("/qaForDesk")
597 603
	public List<Article> queryForDesk(@JdbcConn Connection con, String professorId) throws SQLException{
@ -610,6 +616,12 @@ public class ArticleService {
610 616
		return this.articleDao.queryOrgPublish(con, orgId);
611 617
	}
612 618
	
619
	@Get
620
	@Path("/pgOrgPublish")
621
	public PageQueryResult<Article> pageQueryOrgPublish(@JdbcConn Connection con,String orgId,@DefaultValue("10") int pageSize,@DefaultValue("1") int pageNo)throws SQLException{
622
		return this.articleDao.pageQueryOrgPublish(con, orgId,pageSize,pageNo);
623
	}
624
	
613 625
	@Get
614 626
	@Path("/qlOrg")
615 627
	public List<Article> queryLimitOrg(@JdbcConn Connection con,String orgId,@DefaultValue("com.ekexiu.portal.service.ArticleService.MAX_MODIFYTIME") String modifyTime,@DefaultValue("20") int rows)throws SQLException{

+ 46 - 41
src/main/java/com/ekexiu/portal/service/DataDictService.java

@ -4,6 +4,7 @@ import java.sql.Connection;
4 4
import java.sql.SQLException;
5 5
import java.util.ArrayList;
6 6
import java.util.List;
7
import java.util.ListIterator;
7 8
8 9
import org.jfw.apt.annotation.Autowrie;
9 10
import org.jfw.apt.annotation.DefaultValue;
@ -23,17 +24,16 @@ import com.ekexiu.portal.pojo.DataDictCode;
23 24
24 25
@Path("/dataDict")
25 26
public class DataDictService {
26
	
27
27 28
	private volatile List<DataDictCode> hotSubjects = new ArrayList<DataDictCode>();
28 29
	private volatile List<DataDictCode> hotIndustries = new ArrayList<DataDictCode>();
29 30
	private volatile List<DataDictCode> hotKey = new ArrayList<DataDictCode>();
30
	
31
31 32
	@Autowrie
32 33
	private DataDictDao dataDictDao;
33
	
34
34 35
	private int defautLimitQuerySize = 5;
35
	
36
	
36
37 37
	public DataDictDao getDataDictDao() {
38 38
		return dataDictDao;
39 39
	}
@ -47,8 +47,8 @@ public class DataDictService {
47 47
	}
48 48
49 49
	public void setDefautLimitQuerySize(int defautLimitQuerySize) {
50
		if(defautLimitQuerySize>0)
51
		   this.defautLimitQuerySize = defautLimitQuerySize;
50
		if (defautLimitQuerySize > 0)
51
			this.defautLimitQuerySize = defautLimitQuerySize;
52 52
	}
53 53
54 54
	public List<DataDictCode> getHotSubjects() {
@ -77,9 +77,9 @@ public class DataDictService {
77 77
78 78
	@Post
79 79
	@Path
80
	public void insert(@JdbcConn(true) Connection con,String dictCode,String code,@Nullable String parentCode,String caption,String descp ) throws SQLException
81
	{
82
		DataDict  dd = new DataDict();
80
	public void insert(@JdbcConn(true) Connection con, String dictCode, String code, @Nullable String parentCode, String caption, String descp)
81
			throws SQLException {
82
		DataDict dd = new DataDict();
83 83
		dd.setDescp(descp);
84 84
		dd.setCaption(caption);
85 85
		dd.setCode(code);
@ -87,82 +87,87 @@ public class DataDictService {
87 87
		dd.setParentCode(parentCode);
88 88
		dataDictDao.insert(con, dd);
89 89
	}
90
	
90
91 91
	@Put
92 92
	@Path
93
	public void update(@JdbcConn(true) Connection con,@RequestBody DataDict dict) throws SQLException{
93
	public void update(@JdbcConn(true) Connection con, @RequestBody DataDict dict) throws SQLException {
94 94
		this.dataDictDao.update(con, dict);
95 95
	}
96
	
96
97 97
	@Get
98 98
	@Path("/{dictCode}")
99
	List<DataDict> query(@JdbcConn(false) Connection con,@PathVar String dictCode) throws SQLException{
100
		 return this.dataDictDao.query(con, dictCode);
99
	List<DataDict> query(@JdbcConn(false) Connection con, @PathVar String dictCode) throws SQLException {
100
		return this.dataDictDao.query(con, dictCode);
101 101
	}
102
	
102
103 103
	@Get
104 104
	@Path("/qa/{dictCode}")
105
	public List<DataDictCode> queryDict( @PathVar String dictCode) throws SQLException{
106
		 return this.queryDictCode(dictCode.equals("SUBJECT"));
105
	public List<DataDictCode> queryDict(@PathVar String dictCode) throws SQLException {
106
		return this.queryDictCode(dictCode.equals("SUBJECT"));
107 107
	}
108
	
108
109 109
	@Get
110 110
	@Path("/qaDictCode")
111
	public List<DataDictCode> queryDictCode(String dictCode) throws SQLException{
112
		 return this.queryDictCode(dictCode.equals("SUBJECT"));
111
	public List<DataDictCode> queryDictCode(String dictCode) throws SQLException {
112
		return this.queryDictCode(dictCode.equals("SUBJECT"));
113 113
	}
114
	
114
115 115
	@Get
116 116
	@Path("/qaHotKey")
117
	public List<DataDictCode> queryHotKey(String key){
117
	public List<DataDictCode> queryHotKey(String key) {
118 118
		List<DataDictCode> hotKeys = this.getHotKey();
119 119
		List<DataDictCode> keys = new ArrayList<DataDictCode>();
120 120
		for (DataDictCode hotKey : hotKeys) {
121
			if(hotKey.getCaption().indexOf(key) != -1){
121
			if (hotKey.getCaption().indexOf(key) != -1) {
122 122
				keys.add(hotKey);
123 123
			}
124 124
		}
125 125
		return keys;
126 126
	}
127
	
127
128 128
	@Get
129 129
	@Path("/qlHotKey")
130
	public List<DataDictCode> hotKey(@DefaultValue("10") int rows){
130
	public List<DataDictCode> hotKey(@DefaultValue("10") int rows) {
131 131
		List<DataDictCode> hotKeys = this.getHotKey();
132 132
		List<DataDictCode> keys = new ArrayList<DataDictCode>();
133
		for (int i = 0; i < rows; i++) {
134
			keys.add(hotKeys.get(i));
133
		ListIterator<DataDictCode> it = hotKeys.listIterator();
134
135
		while (it.hasNext() && (rows > 0)) {
136
			--rows;
137
			keys.add(it.next());
135 138
		}
136 139
		return keys;
137 140
	}
138
	
139
	private List<DataDictCode> queryDictCode(boolean isSubject){
141
142
	private List<DataDictCode> queryDictCode(boolean isSubject) {
140 143
		List<DataDictCode> ret = null;
141
		if(isSubject){
144
		if (isSubject) {
142 145
			ret = this.getHotSubjects();
143
		}else{
146
		} else {
144 147
			ret = this.getHotIndustries();
145 148
		}
146 149
		return ret;
147 150
	}
148
	
151
149 152
	@Get
150 153
	@Path("/qaCity")
151
	public List<DataDictCode> queryCity(@JdbcConn(false) Connection con,String dictCode,@Nullable String province) throws SQLException{
154
	public List<DataDictCode> queryCity(@JdbcConn(false) Connection con, String dictCode, @Nullable String province) throws SQLException {
152 155
		return this.dataDictDao.queryCity(con, dictCode, province);
153 156
	}
154
	
157
155 158
	@Get
156 159
	@Path("/{dictCode}/{code}")
157
	public DataDict query(@JdbcConn(false) Connection con,@PathVar String dictCode,@PathVar String code)throws SQLException{
158
		return this.dataDictDao.query(con, dictCode, code);	
160
	public DataDict query(@JdbcConn(false) Connection con, @PathVar String dictCode, @PathVar String code) throws SQLException {
161
		return this.dataDictDao.query(con, dictCode, code);
159 162
	}
160
	
163
161 164
	@Get
162 165
	@Path("/lq")
163
	List<LogicDict> limitQuery(@JdbcConn(false) Connection con,String dictCode,@Nullable String caption,@DefaultValue("5") int rows) throws SQLException{
164
		if(rows<=0) rows = this.defautLimitQuerySize;
165
		if(caption!=null) caption="%"+caption+"%";
166
	List<LogicDict> limitQuery(@JdbcConn(false) Connection con, String dictCode, @Nullable String caption, @DefaultValue("5") int rows) throws SQLException {
167
		if (rows <= 0)
168
			rows = this.defautLimitQuerySize;
169
		if (caption != null)
170
			caption = "%" + caption + "%";
166 171
		return this.dataDictDao.limitQuery(con, dictCode, caption, rows);
167 172
	}
168 173

+ 27 - 0
src/main/java/com/ekexiu/portal/service/OrgService.java

@ -16,6 +16,8 @@ import org.jfw.apt.web.annotation.param.PathVar;
16 16
import org.jfw.util.StringUtil;
17 17
18 18
import com.ekexiu.portal.dao.OrgDao;
19
import com.ekexiu.portal.dao.OrgRegInfoDao;
20
import com.ekexiu.portal.po.OrgRegInfo;
19 21
import com.ekexiu.portal.po.Organization;
20 22
import com.ekexiu.portal.pojo.EditOrganization;
21 23
@ -33,6 +35,19 @@ public class OrgService {
33 35
	@Autowrie
34 36
	private OrgDao orgDao;
35 37
	
38
	@Autowrie
39
	private OrgRegInfoDao orgRegInfoDao;
40
	
41
	
42
	
43
	public OrgRegInfoDao getOrgRegInfoDao() {
44
		return orgRegInfoDao;
45
	}
46
47
	public void setOrgRegInfoDao(OrgRegInfoDao orgRegInfoDao) {
48
		this.orgRegInfoDao = orgRegInfoDao;
49
	}
50
36 51
	public ImageService getImageService() {
37 52
		return imageService;
38 53
	}
@ -151,4 +166,16 @@ public class OrgService {
151 166
		return id;
152 167
	}
153 168
	
169
	@Path("/incPageViews")
170
	@Post
171
	public void incPageViews(@JdbcConn(true) Connection con ,String id)throws SQLException{
172
		this.orgDao.incPageViews(con, id);
173
	}
174
	
175
	@Get
176
	@Path("/regInfo")
177
	public OrgRegInfo queryRegInfo(@JdbcConn Connection con,String name) throws SQLException{
178
		return this.orgRegInfoDao.query(con, name);
179
	}
180
	
154 181
}

+ 134 - 0
src/main/java/com/ekexiu/portal/service/PpaperService.java

@ -0,0 +1,134 @@
1
package com.ekexiu.portal.service;
2

3
import java.sql.Connection;
4
import java.sql.SQLException;
5
import java.util.List;
6

7
import org.jfw.apt.annotation.Autowrie;
8
import org.jfw.apt.annotation.DefaultValue;
9
import org.jfw.apt.annotation.Nullable;
10
import org.jfw.apt.web.annotation.Path;
11
import org.jfw.apt.web.annotation.operate.Get;
12
import org.jfw.apt.web.annotation.operate.Post;
13
import org.jfw.apt.web.annotation.param.JdbcConn;
14
import org.jfw.util.PageQueryResult;
15

16
import com.ekexiu.portal.dao.PaperAuthorDao;
17
import com.ekexiu.portal.dao.PpaperDao;
18
import com.ekexiu.portal.po.PaperAuthor;
19
import com.ekexiu.portal.po.Ppaper;
20
import com.ekexiu.portal.pojo.AssedPaper;
21

22
@Path("/ppaper")
23
public class PpaperService {
24
	
25
	@Autowrie
26
	private PpaperDao ppaperDao;
27
	@Autowrie
28
	private PaperAuthorDao paperAuthorDao;
29
	
30
	
31
	
32
	public PpaperDao getPpaperDao() {
33
		return ppaperDao;
34
	}
35

36

37

38
	public void setPpaperDao(PpaperDao ppaperDao) {
39
		this.ppaperDao = ppaperDao;
40
	}
41

42

43

44
	public PaperAuthorDao getPaperAuthorDao() {
45
		return paperAuthorDao;
46
	}
47

48

49

50
	public void setPaperAuthorDao(PaperAuthorDao paperAuthorDao) {
51
		this.paperAuthorDao = paperAuthorDao;
52
	}
53

54

55

56
	@Get
57
	@Path("/qo")
58
	public Ppaper query(@JdbcConn Connection con,String id)throws SQLException{
59
		return this.ppaperDao.query(con, id);
60
	}
61
	@Get
62
	@Path("/qm")
63
	public List<Ppaper> query(@JdbcConn Connection con,String[] id)throws SQLException{
64
		return this.ppaperDao.query(con, id);
65
	}
66
	
67
	@Get
68
	@Path("/byProfessor")
69
	public PageQueryResult<AssedPaper> queryByProfessor(@JdbcConn Connection con,String id,@Nullable String name,@DefaultValue("10") int pageSize,@DefaultValue("1") int pageNo)throws SQLException{
70
		if(name == null ){
71
			name ="%";
72
		}else{
73
			name ="%"+name+"%";
74
		}
75
		return this.ppaperDao.pageQueryWithProfessor(con, id, name, pageSize, pageNo);
76
	}
77
	@Get
78
	@Path("/byAuthor")
79
	public PageQueryResult<AssedPaper> queryByAuthor(@JdbcConn Connection con,String author,@Nullable String name,@DefaultValue("10") int pageSize,@DefaultValue("1") int pageNo)throws SQLException{
80
		if(name == null ){
81
			name ="%";
82
		}else{
83
			name ="%"+name+"%";
84
		}
85
		return this.ppaperDao.pageQueryWithAuthor(con, author, name, pageSize, pageNo);
86
	}
87
	
88
	@Get
89
	@Path("/authors")
90
	public List<PaperAuthor> queryAuthors(@JdbcConn Connection con,String id)throws SQLException{
91
		return this.paperAuthorDao.query(con,id);
92
	}
93
	
94
	/**
95
	 * 
96
	 * @param con
97
	 * @param uid 专家ID(用户ID) 
98
	 * @param id  论文ID
99
	 * @param author 作者名称
100
	 * @return
101
	 * @throws SQLException
102
	 */
103
	@Post
104
	@Path("/ass")
105
	public int ass(@JdbcConn(true) Connection con,String uid,String id,String author)throws SQLException{
106
		return this.paperAuthorDao.update(con, id, uid, author);
107
	}
108
	/**
109
	 * 
110
	 * @param con
111
	 * @param uid 专家ID(用户ID) 
112
	 * @param id  论文ID
113
	 * @return
114
	 * @throws SQLException
115
	 */
116
	@Post
117
	@Path("/cAss")
118
	public int cAss(@JdbcConn(true) Connection con,String uid,String id)throws SQLException{
119
		return this.paperAuthorDao.update(con, id, uid);
120
	}	
121
	
122
	@Post
123
	@Path("/incPageViews")
124
	public void incPageViews(@JdbcConn(true) Connection con,String id)throws SQLException{
125
		this.ppaperDao.incPageViews(con, id);
126
	}
127
	
128
	@Post
129
	@Path("/kw")
130
	public void update(@JdbcConn(true) Connection con,String id,@Nullable String keywords)throws SQLException{
131
		this.ppaperDao.update(con, id, keywords);
132
	}
133
	
134
}

+ 133 - 0
src/main/java/com/ekexiu/portal/service/PpatentServcie.java

@ -0,0 +1,133 @@
1
package com.ekexiu.portal.service;
2

3
import java.sql.Connection;
4
import java.sql.SQLException;
5
import java.util.List;
6

7
import org.jfw.apt.annotation.Autowrie;
8
import org.jfw.apt.annotation.DefaultValue;
9
import org.jfw.apt.annotation.Nullable;
10
import org.jfw.apt.web.annotation.Path;
11
import org.jfw.apt.web.annotation.operate.Get;
12
import org.jfw.apt.web.annotation.operate.Post;
13
import org.jfw.apt.web.annotation.param.JdbcConn;
14
import org.jfw.util.PageQueryResult;
15

16
import com.ekexiu.portal.dao.PatentAuthorDao;
17
import com.ekexiu.portal.dao.PpatentDao;
18
import com.ekexiu.portal.po.PatentAuthor;
19
import com.ekexiu.portal.po.Ppatent;
20
import com.ekexiu.portal.pojo.AssedPatent;
21

22
@Path("/ppatent")
23
public class PpatentServcie {
24

25
	@Autowrie
26
	private PpatentDao ppatentDao;
27
	@Autowrie
28
	private PatentAuthorDao patentAuthorDao;
29
	
30
	
31
	
32
	public PpatentDao getPpatentDao() {
33
		return ppatentDao;
34
	}
35

36

37

38
	public void setPpatentDao(PpatentDao ppatentDao) {
39
		this.ppatentDao = ppatentDao;
40
	}
41

42

43

44
	public PatentAuthorDao getpatentAuthorDao() {
45
		return patentAuthorDao;
46
	}
47

48

49

50
	public void setPatentAuthorDao(PatentAuthorDao paperAuthorDao) {
51
		this.patentAuthorDao = paperAuthorDao;
52
	}
53

54

55

56
	@Get
57
	@Path("/qo")
58
	public Ppatent query(@JdbcConn Connection con,String id)throws SQLException{
59
		return this.ppatentDao.query(con, id);
60
	}
61
	@Get
62
	@Path("/qm")
63
	public List<Ppatent> query(@JdbcConn Connection con,String[] id)throws SQLException{
64
		return this.ppatentDao.query(con, id);
65
	}
66
	
67
	@Get
68
	@Path("/byProfessor")
69
	public PageQueryResult<AssedPatent> queryByProfessor(@JdbcConn Connection con,String id,@Nullable String name,@DefaultValue("10") int pageSize,@DefaultValue("1") int pageNo)throws SQLException{
70
		if(name == null ){
71
			name ="%";
72
		}else{
73
			name ="%"+name+"%";
74
		}
75
		return this.ppatentDao.pageQueryWithProfessor(con, id, name, pageSize, pageNo);
76
	}
77
	@Get
78
	@Path("/byAuthor")
79
	public PageQueryResult<AssedPatent> queryByAuthor(@JdbcConn Connection con,String author,@Nullable String name,@DefaultValue("10") int pageSize,@DefaultValue("1") int pageNo)throws SQLException{
80
		if(name == null ){
81
			name ="%";
82
		}else{
83
			name ="%"+name+"%";
84
		}
85
		return this.ppatentDao.pageQueryWithAuthor(con, author, name, pageSize, pageNo);
86
	}
87
	
88
	@Get
89
	@Path("/authors")
90
	public List<PatentAuthor> queryAuthors(@JdbcConn Connection con,String id)throws SQLException{
91
		return this.patentAuthorDao.query(con,id);
92
	}
93
	
94
	/**
95
	 * 
96
	 * @param con
97
	 * @param uid 专家ID(用户ID) 
98
	 * @param id  论文ID
99
	 * @param author 作者名称
100
	 * @return
101
	 * @throws SQLException
102
	 */
103
	@Post
104
	@Path("/ass")
105
	public int ass(@JdbcConn(true) Connection con,String uid,String id,String author)throws SQLException{
106
		return this.patentAuthorDao.update(con, id, uid, author);
107
	}
108
	/**
109
	 * 
110
	 * @param con
111
	 * @param uid 专家ID(用户ID) 
112
	 * @param id  论文ID
113
	 * @return
114
	 * @throws SQLException
115
	 */
116
	@Post
117
	@Path("/cAss")
118
	public int cAss(@JdbcConn(true) Connection con,String uid,String id)throws SQLException{
119
		return this.patentAuthorDao.update(con, id, uid);
120
	}	
121
	
122
	@Post
123
	@Path("/incPageViews")
124
	public void incPageViews(@JdbcConn(true) Connection con,String id)throws SQLException{
125
		this.ppatentDao.incPageViews(con, id);
126
	}
127
	
128
	@Post
129
	@Path("/kw")
130
	public void update(@JdbcConn(true) Connection con,String id,@Nullable String keywords)throws SQLException{
131
		this.ppatentDao.update(con, id, keywords);
132
	}
133
}

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

@ -776,6 +776,18 @@ public class ResourceService {
776 776
		}
777 777
		return resources;
778 778
	}
779
	@Get
780
	@Path("/pqProPublish")
781
	public PageQueryResult<Resource> pageQueryProPublish(@JdbcConn Connection con, String professorId,@DefaultValue("10") int pageSize,@DefaultValue("1") int pageNo) throws SQLException {
782
		PageQueryResult<Resource> resources = this.resourceDao.pageQueryProPublish(con, professorId,pageSize,pageNo);
783
		List<Resource> list = resources.getData();
784
		if(list!=null && list.size()>0) {
785
			for (Resource resource : list) {
786
				resource.setImages(this.imageDao.queryRes(con, resource.getResourceId()));
787
			}
788
		}
789
		return resources;
790
	}
779 791
	
780 792
	@Get
781 793
	@Path("/qaForDesk")
@ -800,6 +812,18 @@ public class ResourceService {
800 812
		}
801 813
		return resources;
802 814
	}
815
	@Get
816
	@Path("/pqOrgPublish")
817
	public PageQueryResult<Resource> pageQueryOrgPublish(@JdbcConn Connection con, String orgId,@DefaultValue("10") int pageSize,@DefaultValue("1") int pageNo) throws SQLException {
818
		PageQueryResult<Resource> resources = this.resourceDao.pageQueryOrgPublish(con, orgId,pageSize,pageNo);
819
		List<Resource> list = resources.getData();
820
		if(list!=null && list.size()>0) {
821
			for (Resource resource : list) {
822
				resource.setImages(this.imageDao.queryRes(con, resource.getResourceId()));
823
			}
824
		}
825
		return resources;
826
	}
803 827
	
804 828
	@Post
805 829
	@Path("/nameAndSupport")

+ 14 - 1
src/main/java/com/ekexiu/portal/service/WatchService.java

@ -111,9 +111,11 @@ public class WatchService {
111 111
		return this.watchDao.queryOne(con, professorId, watchObject);
112 112
	}
113 113
	
114

115
	
114 116
	@Get
115 117
	@Path("/qaPro")
116
	public PageQueryResult<Watch> queryPro(@JdbcConn Connection con, String professorId, Integer watchType, 
118
	public PageQueryResult<Watch> queryPro(@JdbcConn Connection con, String professorId, short watchType, 
117 119
			@DefaultValue("10") int pageSize, @DefaultValue("1") int pageNo) throws SQLException {
118 120
		PageQueryResult<Watch> queryResult = this.watchDao.queryPro(con, professorId, watchType, pageSize, pageNo);
119 121
		List<Watch> watchs = queryResult.getData();
@ -172,4 +174,15 @@ public class WatchService {
172 174
		return watchs;
173 175
	}
174 176
	
177
	@Get
178
	@Path("/countObject")
179
	public int countObject(@JdbcConn Connection con,String id,short type)throws SQLException{
180
		return this.watchDao.countWatchObject(con, id, type);
181
	}
182
	@Get
183
	@Path("/countProfessor")
184
	public int countProfessor(@JdbcConn Connection con,String id,short type)throws SQLException{
185
		return this.watchDao.countProfessor(con, id, type);
186
	}
187
	
175 188
}

+ 101 - 0
src/main/resources/database.sql

@ -1348,3 +1348,104 @@ ALTER TABLE article_pro ADD PRIMARY KEY (article_id, professor_id);
1348 1348

1349 1349
update resource set resource_type='1';
1350 1350

1351
-----begin version 1.9------------------------
1352
ALTER TABLE organization ADD COLUMN addr  text COLLATE "zh_CN.utf8";
1353
COMMENT ON COLUMN organization.addr IS '企为地址';
1354
ALTER TABLE organization ADD COLUMN email  text;
1355
COMMENT ON COLUMN organization.email IS '联系邮箱';
1356
ALTER TABLE organization ADD COLUMN contact_num  text;
1357
COMMENT ON COLUMN organization.contact_num IS '联系电话';
1358
ALTER TABLE organization ADD COLUMN field_of_customer  text  COLLATE "zh_CN.utf8";
1359
COMMENT ON COLUMN organization.field_of_customer IS '客户领域';
1360
ALTER TABLE organization ADD COLUMN field_of_supplier  text  COLLATE "zh_CN.utf8";
1361
COMMENT ON COLUMN organization.field_of_supplier IS '供应商领域';
1362
ALTER TABLE organization ADD COLUMN sort_num  int8 default 0 not null;
1363
COMMENT ON COLUMN organization.sort_num IS '排序值';
1364
ALTER TABLE organization ADD COLUMN page_views  int8 default 0 not null;
1365
COMMENT ON COLUMN organization.page_views IS '浏览量';
1366

1367

1368
COMMENT ON COLUMN watch.watch_type IS '关注类型(专家-1,资源-2,3-文章,4-专利 ,5-论文)';
1369
CREATE TABLE ppatent (
1370
id char(32)  NOT NULL,
1371
name text COLLATE "zh_CN.utf8" NOT NULL,
1372
page_views int8 DEFAULT 0 NOT NULL,
1373
code text  NOT NULL,
1374
req_code text NOT NULL,
1375
req_person text COLLATE "zh_CN.utf8",
1376
req_day char(8) NOT NULL,
1377
pub_day char(8) NOT NULL,
1378
summary text COLLATE "zh_CN.utf8" NOT NULL,
1379
ref_param text ,
1380
keywords text COLLATE "zh_CN.utf8"
1381
);
1382
COMMENT ON COLUMN ppatent.name IS '名称';
1383
COMMENT ON COLUMN ppatent.page_views IS '浏览量';
1384
COMMENT ON COLUMN ppatent.code IS '专利号';
1385
COMMENT ON COLUMN ppatent.req_code IS '申请号';
1386
COMMENT ON COLUMN ppatent.req_person IS '申请人';
1387
COMMENT ON COLUMN ppatent.summary IS '摘要';
1388
COMMENT ON COLUMN ppatent.keywords IS '关键词';
1389
CREATE UNIQUE INDEX ppatent_pkey ON ppatent USING btree (id);
1390
ALTER TABLE ppatent ADD PRIMARY KEY (id);
1391

1392
CREATE TABLE patent_author (
1393
patent_id char(32) NOT NULL,
1394
professor_id char(32) DEFAULT '################################'::bpchar NOT NULL,
1395
name text COLLATE "zh_CN.utf8" NOT NULL,
1396
ass_time char(14) DEFAULT '00010101010101'::bpchar NOT NULL);
1397
COMMENT ON COLUMN patent_author.patent_id IS '专利ID';
1398
COMMENT ON COLUMN patent_author.professor_id IS '专家id(=32个#时,还没有关专家)';
1399
COMMENT ON COLUMN patent_author.name IS '作者姓名';
1400
COMMENT ON COLUMN patent_author.ass_time IS '关联专家时间';
1401
CREATE UNIQUE INDEX patent_author_pkey ON patent_author USING btree (patent_id,name COLLATE "zh_CN.utf8");
1402
ALTER TABLE patent_author ADD PRIMARY KEY (patent_id,name);
1403

1404
CREATE TABLE ppaper (
1405
id char(32)  NOT NULL,
1406
name text COLLATE "zh_CN.utf8" NOT NULL,
1407
page_views int8 DEFAULT 0 NOT NULL,
1408
cn4periodical text,
1409
en4periodical text,
1410
periodicaltype text,
1411
pub_day text,
1412
summary text COLLATE "zh_CN.utf8" NOT NULL,
1413
keywords text COLLATE "zh_CN.utf8",
1414
ref_param text);
1415
COMMENT ON COLUMN ppaper.name IS '名称';
1416
COMMENT ON COLUMN ppaper.page_views IS '浏览量';
1417
COMMENT ON COLUMN ppaper.cn4periodical IS '期刊中文名';
1418
COMMENT ON COLUMN ppaper.en4periodical IS '期刊英文名';
1419
COMMENT ON COLUMN ppaper.pub_day IS '发表期数';
1420
COMMENT ON COLUMN ppaper.summary IS '摘要';
1421
COMMENT ON COLUMN ppaper.keywords IS '关键词';
1422
CREATE UNIQUE INDEX ppaper_pkey ON ppaper USING btree (id);
1423
ALTER TABLE ppaper ADD PRIMARY KEY (id);
1424

1425
CREATE TABLE paper_author (
1426
paper_id char(32) NOT NULL,
1427
professor_id char(32) DEFAULT '################################'::bpchar NOT NULL,
1428
name text COLLATE "zh_CN.utf8" NOT NULL,
1429
ass_time char(14) DEFAULT '00010101010101'::bpchar NOT NULL);
1430
COMMENT ON COLUMN paper_author.paper_id IS '专利ID';
1431
COMMENT ON COLUMN paper_author.professor_id IS '专家id(=32个#时,还没有关专家)';
1432
COMMENT ON COLUMN paper_author.name IS '作者姓名';
1433
COMMENT ON COLUMN paper_author.ass_time IS '关联专家时间';
1434
CREATE UNIQUE INDEX paper_author_pkey ON paper_author USING btree (paper_id,name COLLATE "zh_CN.utf8");
1435
ALTER TABLE paper_author ADD PRIMARY KEY (paper_id,name);
1436

1437

1438

1439
update organization set org_type = null;
1440

1441

1442

1443

1444

1445

1446

1447

1448

1449

1450

1451