Explorar o código

Merge branch 'master' of https://git.coding.net/aft/AFT.git

Conflicts:
	schema/2017-03-13.sql
	src/main/java/com/goafanti/techservice/patent/controller/PatentApiController.java
	src/main/resources/props/config_dev.properties
	src/main/resources/props/config_local.properties
	src/main/resources/props/config_prod.properties
	src/main/resources/props/config_test.properties
albertshaw %!s(int64=8) %!d(string=hai) anos
pai
achega
1d6bccec13

+ 14 - 0
schema/2017-03-13.sql

@@ -9,3 +9,17 @@ alter table organization_identity
 MODIFY COLUMN `listed`  INT(1) NULL COMMENT '是否上市' ,
 MODIFY COLUMN `listed_type` INT(1) NULL COMMENT '上市类型';
 
+alter table patent_info 
+MODIFY COLUMN `principal`  VARCHAR(36) NULL COMMENT '负责人';
+
+alter table patent_log
+MODIFY COLUMN `principal`  VARCHAR(36) NULL COMMENT '负责人' ,
+MODIFY COLUMN `operator`  VARCHAR(36) NULL COMMENT '操作人';
+
+alter table org_cognizance
+MODIFY COLUMN `consultant`  VARCHAR(36) NULL COMMENT '咨询师';
+
+alter table org_cognizance_log
+MODIFY COLUMN `principal`  VARCHAR(36) NULL COMMENT '负责人' ,
+MODIFY COLUMN `operator`  VARCHAR(36) NULL COMMENT '操作人';
+

+ 0 - 1
src/main/java/com/goafanti/admin/controller/AdminApiController.java

@@ -988,7 +988,6 @@ public class AdminApiController extends BaseApiController {
 				cog.setIssuingDate(log.getRecordTime());
 				break;
 			}
-			cog.setConsultant(null == log.getOperator() ? "" : log.getOperator());
 			log.setId(UUID.randomUUID().toString());
 			log.setCid(cog.getId());
 			log.setOperator(TokenManager.getAdminId());

+ 5 - 0
src/main/java/com/goafanti/common/controller/BaseController.java

@@ -20,6 +20,7 @@ import org.springframework.web.bind.annotation.InitBinder;
 import org.springframework.web.bind.annotation.ModelAttribute;
 
 import com.goafanti.common.bo.Error;
+import com.goafanti.common.model.Admin;
 import com.goafanti.common.model.User;
 import com.goafanti.core.shiro.token.TokenManager;
 
@@ -93,5 +94,9 @@ public class BaseController {
 		if (SecurityUtils.getSubject().getPrincipal()  instanceof User){
 			model.addAttribute("userData", TokenManager.getToken() );
 		}
+		
+		if (SecurityUtils.getSubject().getPrincipal()  instanceof Admin){
+			model.addAttribute("adminData", TokenManager.getAdminToken() );
+		}
 	}
 }

+ 5 - 0
src/main/java/com/goafanti/common/controller/WebpageController.java

@@ -95,6 +95,11 @@ public class WebpageController extends BaseController {
 		return adminToLogin(request,modelview,"/admin/userManage");
 	}
 	
+	@RequestMapping(value = "/admin/servicesManage/technology", method = RequestMethod.GET)
+	public ModelAndView adminServicesManageTechnology(HttpServletRequest request, ModelAndView modelview) {
+		return adminToLogin(request,modelview,"/admin/servicesManage/technology");
+	}
+	
 	@RequestMapping(value = "/admin/servicesManage/patent", method = RequestMethod.GET)
 	public ModelAndView adminServicesManagePatent(HttpServletRequest request, ModelAndView modelview) {
 		return adminToLogin(request,modelview,"/admin/servicesManage/patent");

+ 9 - 4
src/main/java/com/goafanti/common/mapper/UserMapper.xml

@@ -198,8 +198,9 @@
   <select id="findUserListByPage" parameterType="String" resultType="com.goafanti.user.bo.UserListBo">
   	select u.id ,u.mobile, u.email, u.create_time as createTime, 
   	       u.number , i.aft_username as aftUsername, i.audit_status as auditStatus, a.name as adminName
-    from user u  LEFT JOIN admin a on a.id = u.aid
-   LEFT JOIN user_identity i 
+    from user u  
+    LEFT JOIN admin a on a.id = u.aid
+    LEFT JOIN user_identity i 
     ON u.id = i.uid  where u.type = 0
     <if test = "mobile != null">
 	    and u.mobile = #{mobile,jdbcType=VARCHAR}
@@ -222,6 +223,7 @@
 	<if test="auditStatus != null">
 		and i.audit_status= #{auditStatus,jdbcType=INTEGER}
 	</if>
+	order by u.create_time desc
 	<if test="page_sql!=null">
 		${page_sql}
 	</if>
@@ -257,8 +259,10 @@
   
   <select id="findOrgListByPage" parameterType="String" resultType="com.goafanti.user.bo.OrgListBo">
   select u.id ,u.mobile, u.email, u.create_time as createTime, 
-  	       u.number , o.aft_username as aftUsername, o.audit_status as auditStatus, a.name as adminName
-    from user u  LEFT JOIN admin a on a.id = u.aid 
+  	       u.number , o.aft_username as aftUsername, o.audit_status as auditStatus, a.name as adminName,
+  	       o.unit_name as unitName
+    from user u  
+    LEFT JOIN admin a on a.id = u.aid 
 	LEFT JOIN organization_identity o 
     ON u.id = o.uid 
     WHERE u.type = 1
@@ -284,6 +288,7 @@
 	<if test="auditStatus != null">
 		and o.audit_status= #{auditStatus,jdbcType=INTEGER}
 	</if>
+	order by u.create_time desc
 	<if test="page_sql!=null">
 		${page_sql}
 	</if>

+ 3 - 1
src/main/java/com/goafanti/common/model/OrganizationIdentity.java

@@ -408,6 +408,7 @@ public class OrganizationIdentity {
         this.validationAmount = validationAmount;
     }
 
+    @JsonFormat(shape = Shape.STRING)
     public Integer getIdentityType() {
         return identityType;
     }
@@ -463,7 +464,8 @@ public class OrganizationIdentity {
     public void setLastYearTaxReportUrl(String lastYearTaxReportUrl) {
         this.lastYearTaxReportUrl = lastYearTaxReportUrl;
     }
-
+    
+    @JsonFormat(shape = Shape.STRING)
     public Integer getAuditStatus() {
         return auditStatus;
     }

+ 5 - 1
src/main/java/com/goafanti/common/model/UserIdentity.java

@@ -5,6 +5,9 @@ import java.util.Date;
 
 import org.apache.commons.lang3.time.DateFormatUtils;
 
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonFormat.Shape;
+
 public class UserIdentity {
     private String id;
 
@@ -253,7 +256,8 @@ public class UserIdentity {
     public void setAmountMoney(BigDecimal amountMoney) {
         this.amountMoney = amountMoney;
     }
-
+    
+    @JsonFormat(shape = Shape.STRING)
     public Integer getAuditStatus() {
         return auditStatus;
     }

+ 1 - 1
src/main/java/com/goafanti/core/shiro/token/TokenManager.java

@@ -96,7 +96,7 @@ public class TokenManager {
 	 * @return
 	 */
 	public static String getAdminId() {
-		return getAdminToken() == null ? null : getAdminToken().getId();
+		return getToken() == null ? null : getToken().getId();
 	}
 
 	/**

+ 9 - 2
src/main/java/com/goafanti/techservice/patent/controller/PatentApiController.java

@@ -100,6 +100,8 @@ public class PatentApiController extends BaseApiController {
 			patentInfo.setDeletedSign(0);
 			patentInfo.setConfirmState(0);
 			patentInfo.setPatentState(1);
+			String p = userService.selectByPrimaryKey(TokenManager.getUserId()).getAid();
+			patentInfo.setPrincipal(p);
 			patentInfoService.insert(patentInfo);
 
 			PatentRegistration patentRegistration = new PatentRegistration();
@@ -119,7 +121,7 @@ public class PatentApiController extends BaseApiController {
 			log.setPid(patentInfo.getId());
 			log.setRecordTime(patentInfo.getCreateTime());
 			log.setState(1);
-			log.setPrincipal(userService.selectByPrimaryKey(TokenManager.getUserId()).getAid());
+			log.setPrincipal(p);
 			patentLogService.insert(log);
 			res.setData(patentInfo);
 		}
@@ -259,11 +261,15 @@ public class PatentApiController extends BaseApiController {
 			patentInfo.setDeletedSign(0);
 			patentInfo.setConfirmState(0);
 			patentInfo.setPatentState(1);
+			String p = userService.selectByPrimaryKey(TokenManager.getUserId()).getAid();
+			patentInfo.setPrincipal(p);
 			patentInfoService.insert(patentInfo);
+			
 			PatentRegistration patentRegistration = new PatentRegistration();
 			patentRegistration.setId(UUID.randomUUID().toString());
 			patentRegistration.setPid(patentInfo.getId());
 			patentRegistrationService.insert(patentRegistration);
+			
 			PatentCost patentCost = new PatentCost();
 			patentCost.setId(UUID.randomUUID().toString());
 			patentCost.setPid(patentInfo.getId());
@@ -276,7 +282,7 @@ public class PatentApiController extends BaseApiController {
 			log.setPid(patentInfo.getId());
 			log.setRecordTime(patentInfo.getCreateTime());
 			log.setState(1);
-			log.setPrincipal(userService.selectByPrimaryKey(TokenManager.getUserId()).getAid());
+			log.setPrincipal(p);
 			log.setOperator(TokenManager.getAdminId());
 			patentLogService.insert(log);
 			res.setData(patentInfo);
@@ -326,6 +332,7 @@ public class PatentApiController extends BaseApiController {
 				break;
 			}
 			patentInfo.setPatentState(patentLog.getState());
+			patentInfo.setPrincipal(patentLog.getPrincipal());
 			patentLog.setPid(xid);
 			patentLog.setId(UUID.randomUUID().toString());
 			patentLog.setRecordTime(d);

+ 12 - 0
src/main/java/com/goafanti/user/bo/OrgListBo.java

@@ -20,6 +20,8 @@ public class OrgListBo {
     private Integer auditStatus;
     
     private String adminName;
+    
+    private String unitName;
 
 	public String getId() {
 		return id;
@@ -84,6 +86,16 @@ public class OrgListBo {
 	public void setAdminName(String adminName) {
 		this.adminName = adminName;
 	}
+	
+	
+
+	public String getUnitName() {
+		return unitName;
+	}
+
+	public void setUnitName(String unitName) {
+		this.unitName = unitName;
+	}
 
 	//注册时间
 	public String getCreateTimeFormattedDate(){

+ 6 - 0
src/main/java/com/goafanti/user/controller/UserApiController.java

@@ -438,6 +438,12 @@ public class UserApiController extends BaseApiController {
 		organizationIdentity.setPostalAddress(orgIdentityBo.getPostalAddress());
 		organizationIdentity.setPostcode(orgIdentityBo.getPostcode());
 		organizationIdentity.setLegalPerson(orgIdentityBo.getLegalPerson());
+		organizationIdentity.setFirstContacts(orgIdentityBo.getFirstContacts());
+		organizationIdentity.setSecondContacts(orgIdentityBo.getSecondContacts());
+		organizationIdentity.setThirdContacts(orgIdentityBo.getThirdContacts());
+		organizationIdentity.setFirstMobile(orgIdentityBo.getFirstMobile());
+		organizationIdentity.setSecondMobile(orgIdentityBo.getSecondMobile());
+		organizationIdentity.setThirdMobile(orgIdentityBo.getThirdMobile());
 		if (identity == null) {
 			organizationIdentity.setId(UUID.randomUUID().toString());
 			organizationIdentity.setUid(TokenManager.getUserId());

+ 1 - 1
src/main/resources/props/config_dev.properties

@@ -50,7 +50,7 @@ session.timeout=12000000
 session.validate.timespan=18000000
 
 app.name=AFT
-static.host=//afts.hnzhiming.com/1.0.3
+static.host=//afts.hnzhiming.com/1.0.4
 
 upload.path=/data/wwwroot/aft/upload
 upload.private.path=/data/upload

+ 1 - 1
src/main/resources/props/config_local.properties

@@ -52,7 +52,7 @@ session.timeout=12000000
 session.validate.timespan=18000000
 
 app.name=AFT
-static.host=//afts.hnzhiming.com/1.0.3
+static.host=//afts.hnzhiming.com/1.0.4
 
 upload.path=/Users/xiaolong/Sites/upload
 upload.private.path=/Users/xiaolong/Sites/doc

+ 1 - 1
src/main/resources/props/config_prod.properties

@@ -50,4 +50,4 @@ session.timeout=12000000
 session.validate.timespan=18000000
 
 app.name=AFT
-static.host=//afts.hnzhiming.com/1.0.3
+static.host=//afts.hnzhiming.com/1.0.4

+ 1 - 1
src/main/resources/props/config_test.properties

@@ -52,7 +52,7 @@ session.timeout=12000000
 session.validate.timespan=18000000
 
 app.name=AFT
-static.host=//aftts.hnzhiming.com/1.0.3
+static.host=//aftts.hnzhiming.com/1.0.4
 
 upload.path=/data/aft/public/upload
 upload.private.path=/data/aft/private/upload

+ 11 - 0
src/main/webapp/WEB-INF/views/admin/servicesManage/technology.jsp

@@ -0,0 +1,11 @@
+<%@ page contentType="text/html;charset=UTF-8" language="java"%>
+<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
+<%@ include file="../../header.jsp"%>
+<title>科技项目申报管理页面</title>
+<link href="${staticHost}/admin/servicesManage/technology.css" rel="stylesheet">
+</head>
+<body>
+	<div id="root"></div>
+	<script type="text/javascript" src="${staticHost}/admin/servicesManage/technology.js"></script>
+</body>
+</html>

+ 74 - 61
src/main/webapp/WEB-INF/views/header.jsp

@@ -4,68 +4,81 @@
 <!DOCTYPE HTML>
 <html xmlns=http://www.w3.org/1999/xhtml>
 <head>
-	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-	<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
-	<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
-	<!--[if lt IE 9]>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
+<meta name="viewport"
+	content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
+<!--[if lt IE 9]>
     <script src="//cdn.bootcss.com/html5shiv/r29/html5.min.js"></script>
 	<script src="//cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
   	<![endif]-->
-  	<script type="text/javascript">
-  		
-  	   <c:if test="${not empty userData}">
-  		   window.userData = {
-	  		   mobile : "${userData.mobile}" ,
-	  		   nickname : "${userData.nickname}",
-	  		   number : "${userData.number}",
-	  		   type : "${userData.type}",
-	  		   email: "${userData.email}",
-	  		   createTime : "${userData.createTime}",
-	  		   lvl : "${userData.lvl}"
-  		   }
-  	   </c:if>
-  	   
-  	   <c:if test="${empty userData}">
-  	    window.userData = ""
-  	   </c:if>
-  	 
-  		window.globalConfig = {
-	  		context: "${basePath}",
-	  		staticHost: "${staticHost}",
-	  		uploadPath: "${uploadPath}",
-	  		uploadPrivatePath:"${uploadPrivatePath}"
-	  	}
-  		
-  		<!--
-  		<shiro:hasRole name="999999">
- 		window.showSystem = true;
- 		window.showConfigure = true;
- 		window.showConfigview = true;
- 		window.showSheet = true;
- 		window.showPue = true;
- 		window.showVideo = true;
- 		window.showDevice = true;
-  		</shiro:hasRole>
-  		
-  		<shiro:hasPermission name="configure">
- 		window.showConfigure = true;
-  		</shiro:hasPermission>
-  		<shiro:hasPermission name="configview">
- 		window.showConfigview = true;
-  		</shiro:hasPermission>
-  		<shiro:hasPermission name="sheet">
- 		window.showSheet = true;
-  		</shiro:hasPermission>
-  		<shiro:hasPermission name="pue">
- 		window.showPue = true;
-  		</shiro:hasPermission>
+<script type="text/javascript">
+	<c:if test="${not empty userData}">
+	window.userData = {
+		mobile : "${userData.mobile}",
+		nickname : "${userData.nickname}",
+		number : "${userData.number}",
+		type : "${userData.type}",
+		email : "${userData.email}",
+		createTime : "${userData.createTime}",
+		lvl : "${userData.lvl}"
+	}
+	</c:if>
 
-  		<shiro:hasPermission name="video">
- 		window.showVideo = true;
-  		</shiro:hasPermission>
-  		<shiro:hasPermission name="device">
- 		window.showDevice = true;
-  		</shiro:hasPermission>
-      -->
-  	</script>
-  	<script type="text/javascript" src="${staticHost}/vendors.js"></script>
+	<c:if test="${empty userData}">
+	window.userData = ""
+	</c:if>
+
+	window.globalConfig = {
+		context : "${basePath}",
+		staticHost : "${staticHost}",
+		uploadPath : "${uploadPath}",
+		uploadPrivatePath : "${uploadPrivatePath}"
+	}
+
+	<c:if test="${not empty adminData}">
+	window.adminData = {
+		mobile : "${adminData.mobile}",
+		name : "${adminData.name}",
+		email : "${adminData.email}",
+		createTime : "${adminData.createTime}"
+	}
+	</c:if>
+
+	<c:if test="${empty adminData}">
+	window.adminData = ""
+	</c:if>
+
+	<!--
+	<shiro:hasRole name="999999">
+	window.showSystem = true;
+	window.showConfigure = true;
+	window.showConfigview = true;
+	window.showSheet = true;
+	window.showPue = true;
+	window.showVideo = true;
+	window.showDevice = true;
+	</shiro:hasRole>
+
+	<shiro:hasPermission name="configure">
+	window.showConfigure = true;
+	</shiro:hasPermission>
+	<shiro:hasPermission name="configview">
+	window.showConfigview = true;
+	</shiro:hasPermission>
+	<shiro:hasPermission name="sheet">
+	window.showSheet = true;
+	</shiro:hasPermission>
+	<shiro:hasPermission name="pue">
+	window.showPue = true;
+	</shiro:hasPermission>
+
+	<shiro:hasPermission name="video">
+	window.showVideo = true;
+	</shiro:hasPermission>
+	<shiro:hasPermission name="device">
+	window.showDevice = true;
+	</shiro:hasPermission>
+	-->
+</script>
+<script type="text/javascript" src="${staticHost}/vendors.js"></script>