Просмотр исходного кода

Accept Merge Request #100 merge v1.0.15 : (master -> test)

Merge Request: merge v1.0.15
Created By: @Antiloveg
Accepted By: @Antiloveg
URL: https://coding.net/t/aft/p/AFT/git/merge/100
Antiloveg лет назад: 9
Родитель
Сommit
d67823589d
41 измененных файлов с 769 добавлено и 511 удалено
  1. 12 6
      schema/permission.sql
  2. 27 6
      src/main/java/com/goafanti/admin/controller/AdminApiController.java
  3. 1 1
      src/main/java/com/goafanti/admin/controller/AdminCopyrightApiController.java
  4. 95 61
      src/main/java/com/goafanti/admin/controller/AdminPatentApiController.java
  5. 2 2
      src/main/java/com/goafanti/admin/controller/AdminTechProjectApiController.java
  6. 2 0
      src/main/java/com/goafanti/admin/service/AdminService.java
  7. 5 0
      src/main/java/com/goafanti/admin/service/impl/AdminServiceImpl.java
  8. 2 0
      src/main/java/com/goafanti/common/constant/ErrorConstants.java
  9. 80 0
      src/main/java/com/goafanti/common/controller/PreviewController.java
  10. 2 0
      src/main/java/com/goafanti/common/dao/AdminMapper.java
  11. 5 0
      src/main/java/com/goafanti/common/dao/UserMapper.java
  12. 1 1
      src/main/java/com/goafanti/common/enums/CopyrightStatus.java
  13. 1 1
      src/main/java/com/goafanti/common/enums/OrgCognizanceStatus.java
  14. 1 1
      src/main/java/com/goafanti/common/enums/PatentInfoStatus.java
  15. 1 1
      src/main/java/com/goafanti/common/enums/TechProjectStatus.java
  16. 4 1
      src/main/java/com/goafanti/common/mapper/AdminMapper.xml
  17. 2 1
      src/main/java/com/goafanti/common/mapper/CopyrightLogMapper.xml
  18. 11 0
      src/main/java/com/goafanti/common/mapper/UserMapper.xml
  19. 1 1
      src/main/java/com/goafanti/common/model/Notice.java
  20. 3 3
      src/main/java/com/goafanti/common/model/OrgCognizance.java
  21. 380 378
      src/main/java/com/goafanti/common/model/PatentInfo.java
  22. 1 1
      src/main/java/com/goafanti/common/model/PatentLog.java
  23. 15 0
      src/main/java/com/goafanti/common/model/TechProjectLog.java
  24. 22 1
      src/main/java/com/goafanti/common/utils/DateUtils.java
  25. 9 6
      src/main/java/com/goafanti/common/utils/FileUtils.java
  26. 9 0
      src/main/java/com/goafanti/common/utils/SHA256Util.java
  27. 3 3
      src/main/java/com/goafanti/copyright/bo/CopyrightInfoSummary.java
  28. 5 2
      src/main/java/com/goafanti/copyright/bo/CopyrightLogBO.java
  29. 1 1
      src/main/java/com/goafanti/copyright/service/impl/CopyrightInfoServiceImpl.java
  30. 4 2
      src/main/java/com/goafanti/patent/bo/PatentInfoDetailBo.java
  31. 1 1
      src/main/java/com/goafanti/patent/controller/PatentApiController.java
  32. 2 1
      src/main/java/com/goafanti/permission/controller/PermissionApiController.java
  33. 15 1
      src/main/java/com/goafanti/user/bo/OrgListBo.java
  34. 3 0
      src/main/java/com/goafanti/user/service/UserService.java
  35. 6 0
      src/main/java/com/goafanti/user/service/impl/UserServiceImpl.java
  36. 1 1
      src/main/resources/props/config_dev.properties
  37. 1 1
      src/main/resources/props/config_local.properties
  38. 1 1
      src/main/resources/props/config_prod.properties
  39. 1 1
      src/main/resources/props/config_test.properties
  40. 26 24
      src/main/resources/props/error.properties
  41. 5 0
      src/main/webapp/WEB-INF/views/header.jsp

+ 12 - 6
schema/permission.sql

@@ -5,12 +5,14 @@ values
 (UUID(), 'achievement', '管理中心页面--科技成果管理页面'), 
 (UUID(), 'demand', '管理中心页面--科技需求管理页面'), 
 (UUID(), 'idea', '管理中心页面--科技思想管理页面'), 
-(UUID(), 'system', '管理中心页面--系统设置页面');
+(UUID(), 'system', '管理中心页面--系统设置页面'),
+(UUID(), 'customer', '管理中心页面--"我的客户"页面');
 
 insert into `permission`(`id`, `url`, `name`) 
 values 
 (UUID(), 'api/admin/adminInfo', '管理员本人信息详情'), 
-(UUID(), 'api/admin/updateAdminInfo', '管理员修改本人信息');
+(UUID(), 'api/admin/updateAdminInfo', '管理员修改本人信息'),
+(UUID(), 'api/admin/customer', '管理员我的客户列表');
 
 insert into `permission`(`id`, `url`, `name`) 
 values 
@@ -18,7 +20,8 @@ values
 (UUID(), 'api/admin/insertAdmin', '系统设置--新增管理员'), 
 (UUID(), 'api/admin/adminDetail', '系统设置--管理员详情'), 
 (UUID(), 'api/admin/updateAdmin', '系统设置--修改管理员信息'), 
-(UUID(), 'api/admin/resetPwd', '系统设置--重置管理员密码');
+(UUID(), 'api/admin/resetPwd', '系统设置--重置管理员密码'),
+(UUID(), 'api/admin/role', '系统设置--获取管理员角色');
 
 insert into `permission`(`id`, `url`, `name`) 
 values 
@@ -90,16 +93,19 @@ values
 
 insert into `permission`(`id`, `url`, `name`) 
 values 
-(UUID(), 'api/admin/finance', '财务报表--财务报表信息列表'), (UUID(), 'api/admin/disposeFinance', '财务报表--财务报表录入及修改'), 
+(UUID(), 'api/admin/finance', '财务报表--财务报表信息列表'), 
+(UUID(), 'api/admin/disposeFinance', '财务报表--财务报表录入及修改'), 
 (UUID(), 'api/admin/uploadFinance', '财务报表--财务报表上传'), 
-(UUID(), 'api/admin/downloadFinance', '财务报表--财务报表下载'), (UUID(), 'api/admin/deleteFinance', '财务报表--删除财务报表');
+(UUID(), 'api/admin/downloadFinance', '财务报表--财务报表下载'), 
+(UUID(), 'api/admin/deleteFinance', '财务报表--删除财务报表');
  
 insert into `permission`(`id`, `url`, `name`) 
 values  
 (UUID(), 'api/admin/achievementList', '科技成果转化--科技成果转化情况列表'), 
 (UUID(), 'api/admin/disposeAchievement', '科技成果转化--科技成果转化情况新增及修改'), 
 (UUID(), 'api/admin/uploadAchievement', '科技成果转化--科技成果附件上传'), 
-(UUID(), 'api/admin/downloadAchievement', '科技成果转化--科技成果附件下载'), (UUID(), 'api/admin/deleteAchievement', '科技成果转化--删除科技成果转化情况记录'); 
+(UUID(), 'api/admin/downloadAchievement', '科技成果转化--科技成果附件下载'), 
+(UUID(), 'api/admin/deleteAchievement', '科技成果转化--删除科技成果转化情况记录'); 
 
 insert into `permission`(`id`, `url`, `name`) 
 values 

+ 27 - 6
src/main/java/com/goafanti/admin/controller/AdminApiController.java

@@ -164,6 +164,32 @@ public class AdminApiController extends CertifyApiController {
 	private AdminService					adminService;
 	@Resource
 	private OrgTechCenterDetailService		orgTechCenterDetailService;
+	
+	/**
+	 * 
+	 */
+	
+	@RequestMapping(value = "/role", method = RequestMethod.GET)
+	public Result getRole(String uid){
+		Result res = new Result();
+		if (StringUtils.isBlank(uid)){
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "管理员ID"));
+			return res;
+		}
+		res.setData(adminService.selectRoleByPrimaryKey(uid));
+		return res;
+	}
+	
+	/**
+	 * 管理员"我的客户"列表
+	 * @return
+	 */
+	@RequestMapping(value = "/customer", method = RequestMethod.GET)
+	public Result getCustomer(){
+		Result res = new Result();
+		res.setData(userService.selectUserByAid(TokenManager.getAdminId()));
+		return res;
+	}
 
 	/**
 	 * 管理员本人信息详情
@@ -2574,15 +2600,10 @@ public class AdminApiController extends CertifyApiController {
 			res.getError().add(buildError(ErrorConstants.DUPLICATE_DATA_ERROR, "当年度高企认定已申请!"));
 			return res;
 		}
-		User u = userService.selectByPrimaryKey(cog.getUid());
-		String aid = null;
-		if (!StringUtils.isBlank(u.getAid())) {
-			aid = u.getAid();
-		}
 
 		OrgCognizance oc = new OrgCognizance();
 		BeanUtils.copyProperties(cog, oc);
-		orgCognizanceService.insertCognizance(oc, aid);
+		orgCognizanceService.insertCognizance(oc, TokenManager.getAdminId());
 
 		return res;
 	}

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

@@ -69,7 +69,7 @@ public class AdminCopyrightApiController extends CertifyApiController {
 		ci.setUid(curUser.getId());
 		if (StringUtils.isBlank(ci.getPrincipal())) {
 			ci.setStatus(CopyrightStatus.CREATE.getCode());
-			ci.setPrincipal(curUser.getAid());
+			ci.setPrincipal(TokenManager.getAdminId());
 		} else {
 			ci.setStatus(CopyrightStatus.DELIVERD.getCode());
 		}

+ 95 - 61
src/main/java/com/goafanti/admin/controller/AdminPatentApiController.java

@@ -22,6 +22,7 @@ import org.apache.poi.hssf.usermodel.HSSFSheet;
 import org.apache.poi.hssf.usermodel.HSSFWorkbook;
 import org.apache.poi.ss.util.CellRangeAddress;
 import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.validation.BindingResult;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
@@ -53,6 +54,7 @@ import com.goafanti.common.model.PatentRegistration;
 import com.goafanti.common.model.User;
 import com.goafanti.common.utils.FileUtils;
 import com.goafanti.common.utils.LoggerUtils;
+import com.goafanti.common.utils.SHA256Util;
 import com.goafanti.common.utils.StringUtils;
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.core.shiro.token.TokenManager;
@@ -92,7 +94,10 @@ public class AdminPatentApiController extends CertifyApiController {
 	private AftFileService					aftFileService;
 	@Resource
 	private OrgRatepayService				orgRatepayService;
-	
+
+	@Value(value = "${aesSecretKey}")
+	private String							secretKey	= null;
+
 	/**
 	 * 专利列表
 	 * 
@@ -118,7 +123,7 @@ public class AdminPatentApiController extends CertifyApiController {
 				pSize));
 		return res;
 	}
-	
+
 	/**
 	 * 新增专利申请
 	 */
@@ -140,14 +145,12 @@ public class AdminPatentApiController extends CertifyApiController {
 		if (!checkCertify(res, curUser)) {
 			return res;
 		}
-
-		String aid = curUser.getAid();
 		PatentInfo pi = new PatentInfo();
 		BeanUtils.copyProperties(patentInfo, pi);
-		res.setData(patentInfoService.savePatentInfo(pi, aid));
+		res.setData(patentInfoService.savePatentInfo(pi, TokenManager.getAdminId()));
 		return res;
 	}
-	
+
 	/**
 	 * 专利详情
 	 * 
@@ -164,7 +167,7 @@ public class AdminPatentApiController extends CertifyApiController {
 		}
 		return res;
 	}
-	
+
 	/**
 	 * 管理端logs
 	 */
@@ -179,7 +182,6 @@ public class AdminPatentApiController extends CertifyApiController {
 		return res;
 	}
 
-	
 	/**
 	 * 专利详情修改保存
 	 * 
@@ -195,7 +197,6 @@ public class AdminPatentApiController extends CertifyApiController {
 			return res;
 		}
 
-
 		if (StringUtils.isBlank(patentInfo.getId())) {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到专利申请", "专利记录ID"));
 			return res;
@@ -210,7 +211,7 @@ public class AdminPatentApiController extends CertifyApiController {
 		Date recordTime = null;
 		if (!StringUtils.isBlank(recordTimeFormattedDate)) {
 			try {
-				recordTime = DateUtils.parseDate(recordTimeFormattedDate, AFTConstants.YYYYMMDD);
+				recordTime = DateUtils.parseDate(recordTimeFormattedDate, AFTConstants.YYYYMMDDHHMMSS);
 			} catch (ParseException e) {
 			}
 		}
@@ -224,52 +225,51 @@ public class AdminPatentApiController extends CertifyApiController {
 		return res;
 	}
 
-
 	/**
 	 * 专利状态流转下拉
+	 * 
 	 * @return
 	 */
 	@RequestMapping(value = "/patentStatus", method = RequestMethod.GET)
-	public Result patentStatus(){
+	public Result patentStatus() {
 		Result res = new Result();
 		res.setData(disposePatentStatus());
 		return res;
 	}
-	
-	
+
 	/**
 	 * 上年度纳税申报报表是否存在
+	 * 
 	 * @param uid
 	 * @param sign
 	 * @return
 	 */
 	@RequestMapping(value = "/lastYearTax", method = RequestMethod.GET)
-	public Result lastYearTax(String uid, String sign){
+	public Result lastYearTax(String uid, String sign) {
 		Result res = new Result();
-		
-		if (StringUtils.isBlank(uid)){
+
+		if (StringUtils.isBlank(uid)) {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到用户", "用户"));
 			return res;
 		}
-		
+
 		AttachmentType attachmentType = AttachmentType.getField(sign);
 		if (attachmentType == AttachmentType.LAST_YEAR_RATEPAY) {
 			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "附件标示"));
 			return res;
 		}
-		
+
 		Calendar cal = Calendar.getInstance();
-		OrgRatepay ratepay = orgRatepayService.selectRatepayByUidAndYear(uid, cal.get(Calendar.YEAR)-1);
-		
-		if (null == ratepay){
+		OrgRatepay ratepay = orgRatepayService.selectRatepayByUidAndYear(uid, cal.get(Calendar.YEAR) - 1);
+
+		if (null == ratepay) {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到上年度纳税申报表", "上年度纳税申报表"));
 			return res;
 		}
-		
+
 		return res;
 	}
-	
-	
+
 	/**
 	 * 专利相关材料上传
 	 * 
@@ -339,6 +339,39 @@ public class AdminPatentApiController extends CertifyApiController {
 	}
 
 	/**
+	 * 预览专利相关材料
+	 * 
+	 * @param id
+	 * @param sign
+	 * @param response
+	 * @return
+	 */
+	@RequestMapping(value = "/preview", method = RequestMethod.GET)
+	public Result preview(String id, String sign) {
+		Result res = new Result();
+		if (StringUtils.isEmpty(id)) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "专利id"));
+			return res;
+		}
+		PatentInfo pi = patentInfoService.selectByPrimaryKey(id);
+		if (pi == null) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "专利id"));
+			return res;
+		}
+		AttachmentType attachmentType = AttachmentType.getField(sign);
+		if (attachmentType == AttachmentType.PATENT_PRORY_STATEMENT || attachmentType == AttachmentType.PATENT_WRITING
+				|| attachmentType == AttachmentType.AUTHORIZATION_NOTICE
+				|| attachmentType == AttachmentType.PATENT_CERTIFICATE) {
+			String time = String.valueOf(Calendar.getInstance().getTime().getTime());
+			String auth = SHA256Util.toHash(sign + "|" + id + "|" + secretKey, time);
+			res.setData("sign=" + sign + "&token=" + id + "&auth=" + auth + "&temp=" + time);
+		} else {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "附件标示"));
+		}
+		return res;
+	}
+
+	/**
 	 * 下载模版文件(专利代理委托书)
 	 * 
 	 * @param response
@@ -367,6 +400,7 @@ public class AdminPatentApiController extends CertifyApiController {
 
 	/**
 	 * 下载上年度纳税申报表
+	 * 
 	 * @param response
 	 * @param uid
 	 * @param year
@@ -376,19 +410,19 @@ public class AdminPatentApiController extends CertifyApiController {
 	@RequestMapping(value = "/downloadRatepay", method = RequestMethod.GET)
 	public Result downloadRatepay(HttpServletResponse response, String uid, String sign) {
 		Result res = new Result();
-		if (StringUtils.isBlank(uid)){
+		if (StringUtils.isBlank(uid)) {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到用户", "用户"));
 			return res;
 		}
-		
+
 		Calendar cal = Calendar.getInstance();
-		OrgRatepay ratepay = orgRatepayService.selectRatepayByUidAndYear(uid, cal.get(Calendar.YEAR)-1);
-		
-		if (null == ratepay){
+		OrgRatepay ratepay = orgRatepayService.selectRatepayByUidAndYear(uid, cal.get(Calendar.YEAR) - 1);
+
+		if (null == ratepay) {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到上年度纳税申报表", "上年度纳税申报表"));
 			return res;
 		}
-		
+
 		AttachmentType attachmentType = AttachmentType.getField(sign);
 		if (attachmentType == AttachmentType.LAST_YEAR_RATEPAY) {
 			downloadFile(response, ratepay.getTaxReturnDownloadFileName(), ratepay.getTaxReturnUrl());
@@ -456,7 +490,6 @@ public class AdminPatentApiController extends CertifyApiController {
 		return res;
 	}
 
-
 	/**
 	 * 待缴费专利管理列表
 	 */
@@ -710,13 +743,14 @@ public class AdminPatentApiController extends CertifyApiController {
 
 		return res;
 	}
-	
+
 	/**
 	 * 获取资料撰写人下拉
+	 * 
 	 * @return
 	 */
 	@RequestMapping(value = "/getAuthor", method = RequestMethod.GET)
-	public Result getAuthor(){
+	public Result getAuthor() {
 		Result res = new Result();
 		List<Admin> list = adminService.selectPatentAuthor();
 		Map<String, String> map = new TreeMap<String, String>();
@@ -726,13 +760,14 @@ public class AdminPatentApiController extends CertifyApiController {
 		res.setData(map);
 		return res;
 	}
-	
+
 	/**
 	 * 专利负责人下拉
+	 * 
 	 * @return
 	 */
 	@RequestMapping(value = "/getPrincipal", method = RequestMethod.GET)
-	public Result getPrincipal(){
+	public Result getPrincipal() {
 		Result res = new Result();
 		List<Admin> list = adminService.selectPatentPrincipal();
 		Map<String, String> map = new TreeMap<String, String>();
@@ -742,8 +777,6 @@ public class AdminPatentApiController extends CertifyApiController {
 		res.setData(map);
 		return res;
 	}
-	
-	
 
 	// 专利申请费用管理报表
 	private void exportFees(HttpServletResponse response, List<PatentApplicationFeeBo> fees) {
@@ -1042,7 +1075,7 @@ public class AdminPatentApiController extends CertifyApiController {
 			state = "已结款";
 			break;
 		case 14:
-			state = "撤销";
+			state = "退单";
 			break;
 		}
 		return state;
@@ -1065,63 +1098,64 @@ public class AdminPatentApiController extends CertifyApiController {
 		}
 		return fileName;
 	}
-	
-	private Map<String, String> disposePatentStatus(){
-		Map<String, String> status = new  TreeMap<String, String>();
+
+	private Map<String, String> disposePatentStatus() {
+		Map<String, String> status = new TreeMap<String, String>();
 		if (TokenManager.hasRole(AFTConstants.SUPERADMIN)) {
-			for (PatentInfoStatus p :  PatentInfoStatus.values()){
+			for (PatentInfoStatus p : PatentInfoStatus.values()) {
 				status.put(p.getCode().toString(), p.getDesc());
 				status.remove(PatentInfoStatus.OTHER.getCode().toString());
 			}
 		} else {
-			if (TokenManager.hasPermission("PatentInfoStatus" + PatentInfoStatus.CREATE.getCode())){
+			if (TokenManager.hasPermission("PatentInfoStatus" + PatentInfoStatus.CREATE.getCode())) {
 				status.put(PatentInfoStatus.CREATE.getCode().toString(), PatentInfoStatus.CREATE.getDesc());
 			}
-			if (TokenManager.hasPermission("PatentInfoStatus" + PatentInfoStatus.SIGN.getCode())){
+			if (TokenManager.hasPermission("PatentInfoStatus" + PatentInfoStatus.SIGN.getCode())) {
 				status.put(PatentInfoStatus.SIGN.getCode().toString(), PatentInfoStatus.SIGN.getDesc());
 			}
-			if (TokenManager.hasPermission("PatentInfoStatus" + PatentInfoStatus.DELIVERD.getCode())){
+			if (TokenManager.hasPermission("PatentInfoStatus" + PatentInfoStatus.DELIVERD.getCode())) {
 				status.put(PatentInfoStatus.DELIVERD.getCode().toString(), PatentInfoStatus.DELIVERD.getDesc());
 			}
-			if (TokenManager.hasPermission("PatentInfoStatus" + PatentInfoStatus.CIRCULATION.getCode())){
+			if (TokenManager.hasPermission("PatentInfoStatus" + PatentInfoStatus.CIRCULATION.getCode())) {
 				status.put(PatentInfoStatus.CIRCULATION.getCode().toString(), PatentInfoStatus.CIRCULATION.getDesc());
 			}
-			if (TokenManager.hasPermission("PatentInfoStatus" + PatentInfoStatus.COMPOSE.getCode())){
+			if (TokenManager.hasPermission("PatentInfoStatus" + PatentInfoStatus.COMPOSE.getCode())) {
 				status.put(PatentInfoStatus.COMPOSE.getCode().toString(), PatentInfoStatus.COMPOSE.getDesc());
 			}
-			if (TokenManager.hasPermission("PatentInfoStatus" + PatentInfoStatus.ACCEPT.getCode())){
+			if (TokenManager.hasPermission("PatentInfoStatus" + PatentInfoStatus.ACCEPT.getCode())) {
 				status.put(PatentInfoStatus.ACCEPT.getCode().toString(), PatentInfoStatus.ACCEPT.getDesc());
 			}
-			if (TokenManager.hasPermission("PatentInfoStatus" + PatentInfoStatus.REVIEWNOTICE.getCode())){
+			if (TokenManager.hasPermission("PatentInfoStatus" + PatentInfoStatus.REVIEWNOTICE.getCode())) {
 				status.put(PatentInfoStatus.REVIEWNOTICE.getCode().toString(), PatentInfoStatus.REVIEWNOTICE.getDesc());
 			}
-			if (TokenManager.hasPermission("PatentInfoStatus" + PatentInfoStatus.REVIEWREPLY.getCode())){
+			if (TokenManager.hasPermission("PatentInfoStatus" + PatentInfoStatus.REVIEWREPLY.getCode())) {
 				status.put(PatentInfoStatus.REVIEWREPLY.getCode().toString(), PatentInfoStatus.REVIEWREPLY.getDesc());
 			}
-			if (TokenManager.hasPermission("PatentInfoStatus" + PatentInfoStatus.CORRECTIONNOTICE.getCode())){
-				status.put(PatentInfoStatus.CORRECTIONNOTICE.getCode().toString(), PatentInfoStatus.CORRECTIONNOTICE.getDesc());
+			if (TokenManager.hasPermission("PatentInfoStatus" + PatentInfoStatus.CORRECTIONNOTICE.getCode())) {
+				status.put(PatentInfoStatus.CORRECTIONNOTICE.getCode().toString(),
+						PatentInfoStatus.CORRECTIONNOTICE.getDesc());
 			}
-			if (TokenManager.hasPermission("PatentInfoStatus" + PatentInfoStatus.CORRECTIONREPLY.getCode())){
-				status.put(PatentInfoStatus.CORRECTIONREPLY.getCode().toString(), PatentInfoStatus.CORRECTIONREPLY.getDesc());
+			if (TokenManager.hasPermission("PatentInfoStatus" + PatentInfoStatus.CORRECTIONREPLY.getCode())) {
+				status.put(PatentInfoStatus.CORRECTIONREPLY.getCode().toString(),
+						PatentInfoStatus.CORRECTIONREPLY.getDesc());
 			}
-			if (TokenManager.hasPermission("PatentInfoStatus" + PatentInfoStatus.AUTHORIZE.getCode())){
+			if (TokenManager.hasPermission("PatentInfoStatus" + PatentInfoStatus.AUTHORIZE.getCode())) {
 				status.put(PatentInfoStatus.AUTHORIZE.getCode().toString(), PatentInfoStatus.AUTHORIZE.getDesc());
 			}
-			if (TokenManager.hasPermission("PatentInfoStatus" + PatentInfoStatus.REJECT.getCode())){
+			if (TokenManager.hasPermission("PatentInfoStatus" + PatentInfoStatus.REJECT.getCode())) {
 				status.put(PatentInfoStatus.REJECT.getCode().toString(), PatentInfoStatus.REJECT.getDesc());
 			}
-			if (TokenManager.hasPermission("PatentInfoStatus" + PatentInfoStatus.LICENSE.getCode())){
+			if (TokenManager.hasPermission("PatentInfoStatus" + PatentInfoStatus.LICENSE.getCode())) {
 				status.put(PatentInfoStatus.LICENSE.getCode().toString(), PatentInfoStatus.LICENSE.getDesc());
 			}
-			if (TokenManager.hasPermission("PatentInfoStatus" + PatentInfoStatus.SETTLEMENT.getCode())){
+			if (TokenManager.hasPermission("PatentInfoStatus" + PatentInfoStatus.SETTLEMENT.getCode())) {
 				status.put(PatentInfoStatus.SETTLEMENT.getCode().toString(), PatentInfoStatus.SETTLEMENT.getDesc());
 			}
-			if (TokenManager.hasPermission("PatentInfoStatus" + PatentInfoStatus.CALLBACK.getCode())){
+			if (TokenManager.hasPermission("PatentInfoStatus" + PatentInfoStatus.CALLBACK.getCode())) {
 				status.put(PatentInfoStatus.CALLBACK.getCode().toString(), PatentInfoStatus.CALLBACK.getDesc());
 			}
 		}
 		return status;
 	}
-	
 
 }

+ 2 - 2
src/main/java/com/goafanti/admin/controller/AdminTechProjectApiController.java

@@ -158,7 +158,7 @@ public class AdminTechProjectApiController extends CertifyApiController {
 		}
 		TechProject tp = new TechProject();
 		BeanUtils.copyProperties(techProject, tp);
-		techProjectService.saveTechProject(tp, userService.selectByPrimaryKey(tp.getUid()).getAid());
+		techProjectService.saveTechProject(tp, TokenManager.getAdminId());
 		return res;
 
 	}
@@ -229,7 +229,7 @@ public class AdminTechProjectApiController extends CertifyApiController {
 		Date recordTime = null;
 		if (!StringUtils.isBlank(recordTimeFormattedDate)) {
 			try {
-				recordTime = DateUtils.parseDate(recordTimeFormattedDate, AFTConstants.YYYYMMDD);
+				recordTime = DateUtils.parseDate(recordTimeFormattedDate, AFTConstants.YYYYMMDDHHMMSS);
 			} catch (ParseException e) {
 			}
 		}

+ 2 - 0
src/main/java/com/goafanti/admin/service/AdminService.java

@@ -41,4 +41,6 @@ public interface AdminService {
 
 	List<Admin> selectTechprojectPrincipal();
 
+	List<String> selectRoleByPrimaryKey(String aid);
+
 }

+ 5 - 0
src/main/java/com/goafanti/admin/service/impl/AdminServiceImpl.java

@@ -158,4 +158,9 @@ public class AdminServiceImpl extends BaseMybatisDao<AdminMapper> implements Adm
 		return adminMapper.selectTechprojectPrincipal();
 	}
 
+	@Override
+	public List<String> selectRoleByPrimaryKey(String uid) {
+		return adminMapper.selectRoleByPrimaryKey(uid);
+	}
+
 }

+ 2 - 0
src/main/java/com/goafanti/common/constant/ErrorConstants.java

@@ -6,6 +6,8 @@ public class ErrorConstants {
 
 	public static final String	VCODE_ERROR						= "VCODE_ERROR";
 
+	public static final String	NO_AUTH_ERROR					= "NO_AUTH_ERROR";
+
 	public static final String	PARAM_ERROR						= "PARAM_ERROR";
 
 	public static final String	PARAM_INTEGER_ERROR				= "PARAM_INTEGER_ERROR";

+ 80 - 0
src/main/java/com/goafanti/common/controller/PreviewController.java

@@ -0,0 +1,80 @@
+package com.goafanti.common.controller;
+
+import java.util.Calendar;
+import java.util.Date;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
+
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+
+import com.goafanti.common.bo.Result;
+import com.goafanti.common.constant.ErrorConstants;
+import com.goafanti.common.enums.AttachmentType;
+import com.goafanti.common.model.PatentInfo;
+import com.goafanti.common.utils.DateUtils;
+import com.goafanti.common.utils.SHA256Util;
+import com.goafanti.common.utils.StringUtils;
+import com.goafanti.patent.service.PatentInfoService;
+import com.goafanti.user.service.UserService;
+
+@Controller
+@RequestMapping("/open/")
+public class PreviewController extends BaseApiController {
+
+	@Resource
+	private PatentInfoService	patentInfoService;
+	@Resource
+	private UserService			userService;
+
+	@Value(value = "${aesSecretKey}")
+	private String				secretKey	= null;
+
+	@RequestMapping(value = "/preview", method = RequestMethod.GET)
+	public Result preview(HttpServletResponse response, String sign, String temp, String token, String auth) {
+		Result res = new Result();
+		if (!StringUtils.isNumeric(temp)) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "预览"));
+		} else if (DateUtils.truncatedMinuteDiffTo(Calendar.getInstance().getTime(),
+				new Date(Long.parseLong(temp))) > 19) {
+			res.getError().add(buildError(ErrorConstants.NO_AUTH_ERROR));
+		} else if (!SHA256Util.toHash(sign + "|" + token + "|" + secretKey, temp).equals(auth)) {
+			res.getError().add(buildError(ErrorConstants.NO_AUTH_ERROR));
+		} else {
+			AttachmentType attachmentType = AttachmentType.getField(sign);
+			switch (attachmentType) {
+			case PATENT_PRORY_STATEMENT:
+			case PATENT_WRITING:
+			case AUTHORIZATION_NOTICE:
+			case PATENT_CERTIFICATE:
+				PatentInfo pi = patentInfoService.selectByPrimaryKey(token);
+				if (pi == null) {
+					res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "预览"));
+					return res;
+				} else {
+					handlePatentPreview(response, pi, attachmentType);
+				}
+				break;
+			default:
+				res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "预览"));
+			}
+		}
+		return res;
+	}
+
+	private void handlePatentPreview(HttpServletResponse response, PatentInfo pi, AttachmentType attachmentType) {
+		if (attachmentType == AttachmentType.PATENT_PRORY_STATEMENT) {
+			downloadFile(response, pi.getPatentProryStatementDownloadFileName(), pi.getPatentProryStatementUrl());
+		} else if (attachmentType == AttachmentType.PATENT_WRITING) {
+			downloadFile(response, pi.getPatentWritingDownloadFileName(), pi.getPatentWritingUrl());
+		} else if (attachmentType == AttachmentType.AUTHORIZATION_NOTICE) {
+			downloadFile(response, pi.getAuthorizationNoticeDownloadFileName(), pi.getAuthorizationNoticeUrl());
+		} else if (attachmentType == AttachmentType.PATENT_CERTIFICATE) {
+			downloadFile(response, pi.getPatentCertificateDownloadFileName(), pi.getPatentCertificateUrl());
+		}
+	}
+
+}

+ 2 - 0
src/main/java/com/goafanti/common/dao/AdminMapper.java

@@ -39,4 +39,6 @@ public interface AdminMapper {
 	List<Admin> selectTechprojectConsultant();
 
 	List<Admin> selectTechprojectPrincipal();
+
+	List<String> selectRoleByPrimaryKey(String uid);
 }

+ 5 - 0
src/main/java/com/goafanti/common/dao/UserMapper.java

@@ -1,6 +1,9 @@
 package com.goafanti.common.dao;
 
+import java.util.List;
+
 import com.goafanti.common.model.User;
+import com.goafanti.user.bo.OrgListBo;
 import com.goafanti.user.bo.UserDownLoadBo;
 import com.goafanti.user.bo.UserPageHomeBo;
 
@@ -23,4 +26,6 @@ public interface UserMapper {
 	UserPageHomeBo selectUserPageHomeBoByUserId(String uid);
 
 	UserDownLoadBo selectUserDownLoadBoByUserId(String id);
+
+	List<OrgListBo> selectUserByAid(String aid);
 }

+ 1 - 1
src/main/java/com/goafanti/common/enums/CopyrightStatus.java

@@ -16,7 +16,7 @@ public enum CopyrightStatus {
 	REJECT(7, "驳回"),
 	AUTHORIZED(8, "已下证"),
 	SETTLEMENT(9, "已结款"),
-	CALLBACK(10, "撤销"),
+	CALLBACK(10, "退单"),
 	OTHER(11, "其他");
 
 	private CopyrightStatus(Integer code, String desc) {

+ 1 - 1
src/main/java/com/goafanti/common/enums/OrgCognizanceStatus.java

@@ -20,7 +20,7 @@ public enum OrgCognizanceStatus {
 	EXPIRED(10, "已到期"),
 	FOSTER(11, "培育中"),
 	SETTLEMENT(12, "已结款"),
-	CALLBACK(13, "撤销"),
+	CALLBACK(13, "退单"),
 	OTHER(14, "其他");
 	
 	private Integer	code;

+ 1 - 1
src/main/java/com/goafanti/common/enums/PatentInfoStatus.java

@@ -20,7 +20,7 @@ public enum PatentInfoStatus {
 	REJECT(11, "驳回"),
 	LICENSE(12, "发证"),
 	SETTLEMENT(13, "已结款"),
-	CALLBACK(14, "撤销"),
+	CALLBACK(14, "退单"),
 	OTHER(15, "其他");
 	
 	

+ 1 - 1
src/main/java/com/goafanti/common/enums/TechProjectStatus.java

@@ -15,7 +15,7 @@ public enum TechProjectStatus {
 	APPRVOVED(6, "审批通过"),
 	REJECT(7, "审批不通过"),
 	SETTLEMENT(8, "已结款"),
-	CALLBACK(9, "撤销"),
+	CALLBACK(9, "退单"),
 	OTHER(10, "其他");
 	
 	private Integer	code;

+ 4 - 1
src/main/java/com/goafanti/common/mapper/AdminMapper.xml

@@ -242,6 +242,9 @@
     where id  <![CDATA[ <> ]]> '1'
   </select>
   
-   
+   <select id="selectRoleByPrimaryKey" parameterType="java.lang.String" resultType="String">
+   	SELECT rid FROM user_role 
+   	where uid = #{uid,jdbcType=VARCHAR}
+   </select>
   
 </mapper>

+ 2 - 1
src/main/java/com/goafanti/common/mapper/CopyrightLogMapper.xml

@@ -119,6 +119,7 @@
     from copyright_log cl
    	left join admin a on cl.principal = a.id
    	left join admin b on cl.operator = b.id
-    where cl.cid = #{id,jdbcType=VARCHAR}
+    where cl.cid = #{id,jdbcType=VARCHAR} 
+    order by cl.record_time desc
   </select>
 </mapper>

+ 11 - 0
src/main/java/com/goafanti/common/mapper/UserMapper.xml

@@ -329,4 +329,15 @@
 		and o.audit_status= #{auditStatus,jdbcType=INTEGER}
 	</if>
   </select>  
+  
+   <select id="selectUserByAid" parameterType="java.lang.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, u.type,
+  	       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.aid = #{aid,jdbcType=VARCHAR}
+  </select>
 </mapper>

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

@@ -108,7 +108,7 @@ public class Notice {
 		if (this.createTime == null) {
 			return null;
 		} else {
-			return DateFormatUtils.format(this.getCreateTime(), AFTConstants.YYYYMMDD);
+			return DateFormatUtils.format(this.getCreateTime(), AFTConstants.YYYYMMDDHHMMSS);
 		}
 	}
 

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

@@ -271,7 +271,7 @@ public class OrgCognizance {
 		if (this.createTime == null) {
 			return null;
 		} else {
-			return DateFormatUtils.format(this.getCreateTime(), AFTConstants.YYYYMMDD);
+			return DateFormatUtils.format(this.getCreateTime(), AFTConstants.YYYYMMDDHHMMSS);
 		}
 	}
 	
@@ -283,7 +283,7 @@ public class OrgCognizance {
 		if (this.acceptDate == null) {
 			return null;
 		} else {
-			return DateFormatUtils.format(this.getCreateTime(), AFTConstants.YYYYMMDD);
+			return DateFormatUtils.format(this.getCreateTime(), AFTConstants.YYYYMMDDHHMMSS);
 		}
 	}
 	
@@ -295,7 +295,7 @@ public class OrgCognizance {
 		if (this.issuingDate == null) {
 			return null;
 		} else {
-			return DateFormatUtils.format(this.getCreateTime(), AFTConstants.YYYYMMDD);
+			return DateFormatUtils.format(this.getCreateTime(), AFTConstants.YYYYMMDDHHMMSS);
 		}
 	}
 	

+ 380 - 378
src/main/java/com/goafanti/common/model/PatentInfo.java

@@ -5,186 +5,189 @@ import java.util.Date;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.time.DateFormatUtils;
 
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonFormat.Shape;
 import com.fasterxml.jackson.annotation.JsonIgnore;
 import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.utils.FileUtils;
+
 public class PatentInfo {
-    private String id;
-
-    private String uid;
-
-    /**
-    * 编号
-    */
-    private Integer serialNumber;
-
-    /**
-    * 申请号/专利号
-    */
-    private String patentNumber;
-
-    /**
-    * 专利名称
-    */
-    private String patentName;
-
-    /**
-    * 专利类型
-    */
-    private Integer patentCatagory;
-
-    /**
-    * 专利状态
-    */
-    private Integer patentState;
-
-    /**
-    * 专利领域
-    */
-    private Integer patentField;
-
-    /**
-    * 专利简介
-    */
-    private String patentDes;
-
-    /**
-    * 专利代理委托书
-    */
-    private String patentProryStatementUrl;
-
-    /**
-    * 专利稿件
-    */
-    private String patentWritingUrl;
-
-    /**
-    * 授权通知书
-    */
-    private String authorizationNoticeUrl;
-
-    /**
-    * 专利证书
-    */
-    private String patentCertificateUrl;
-    
-    /**
-     * 申请日/受理日
-     */
-    private Date patentApplicationDate;
-
-    /**
-    * 第一发明人
-    */
-    private String firstInventorName;
-
-    /**
-    * 第一发明人国籍
-    */
-    private String firstInventorNationality;
-
-    /**
-    * 第一发明人身份证号
-    */
-    private String firstInventorIdNumber;
-
-    /**
-    * 第一发明人是否公布(0--不公布,1--公布)
-    */
-    private Integer firstInventorIsPublish;
-
-    /**
-    * 第二发明人姓名
-    */
-    private String secondInventorName;
-
-    /**
-    * 第二发明人国际
-    */
-    private String secondInventorNationality;
-
-    /**
-    * 第二发明人是否公布(0--不公布,1--公布)
-    */
-    private Integer secondInventorIsPublish;
-
-    /**
-    * 第三发明人姓名
-    */
-    private String thirdInventorName;
-
-    /**
-    * 第三发明人国籍
-    */
-    private String thirdInventorNationality;
-
-    /**
-    * 第三发明人是否公布(0--不公布,1--公布)
-    */
-    private Integer thirdInventorIsPublish;
-
-    /**
-    * 创建时间
-    */
-    private Date createTime;
-
-    /**
-    * 撰写人
-    */
-    private String author;
-    
-    /**
-     * 授权日/发文日
-     */
-    private Date authorizedDate;
-
-    /**
-    * 事务所
-    */
-    private String office;
-
-    /**
-    * 负责人
-    */
-    private String principal;
-    
-    /**
-     * 用户确认申报材料
-     */
-    private Integer confirmState;
-    
-    /**
-     * 专利申请时间
-     */
-    private Date recordTime;
-    
-    /**
-     * 删除标记
-     */
-    private Integer deletedSign;
-    
-    /**
-     * 联系人及联系方式
-     */
-    private Integer contacts;
-
-    public String getId() {
-        return id;
-    }
-
-    public void setId(String id) {
-        this.id = id;
-    }
-
-    public String getUid() {
-        return uid;
-    }
-
-    public void setUid(String uid) {
-        this.uid = uid;
-    }
-    
-    public Integer getSerialNumber() {
+	private String	id;
+
+	private String	uid;
+
+	/**
+	 * 编号
+	 */
+	private Integer	serialNumber;
+
+	/**
+	 * 申请号/专利号
+	 */
+	private String	patentNumber;
+
+	/**
+	 * 专利名称
+	 */
+	private String	patentName;
+
+	/**
+	 * 专利类型
+	 */
+	private Integer	patentCatagory;
+
+	/**
+	 * 专利状态
+	 */
+	private Integer	patentState;
+
+	/**
+	 * 专利领域
+	 */
+	private Integer	patentField;
+
+	/**
+	 * 专利简介
+	 */
+	private String	patentDes;
+
+	/**
+	 * 专利代理委托书
+	 */
+	private String	patentProryStatementUrl;
+
+	/**
+	 * 专利稿件
+	 */
+	private String	patentWritingUrl;
+
+	/**
+	 * 授权通知书
+	 */
+	private String	authorizationNoticeUrl;
+
+	/**
+	 * 专利证书
+	 */
+	private String	patentCertificateUrl;
+
+	/**
+	 * 申请日/受理日
+	 */
+	private Date	patentApplicationDate;
+
+	/**
+	 * 第一发明人
+	 */
+	private String	firstInventorName;
+
+	/**
+	 * 第一发明人国籍
+	 */
+	private String	firstInventorNationality;
+
+	/**
+	 * 第一发明人身份证号
+	 */
+	private String	firstInventorIdNumber;
+
+	/**
+	 * 第一发明人是否公布(0--不公布,1--公布)
+	 */
+	private Integer	firstInventorIsPublish;
+
+	/**
+	 * 第二发明人姓名
+	 */
+	private String	secondInventorName;
+
+	/**
+	 * 第二发明人国际
+	 */
+	private String	secondInventorNationality;
+
+	/**
+	 * 第二发明人是否公布(0--不公布,1--公布)
+	 */
+	private Integer	secondInventorIsPublish;
+
+	/**
+	 * 第三发明人姓名
+	 */
+	private String	thirdInventorName;
+
+	/**
+	 * 第三发明人国籍
+	 */
+	private String	thirdInventorNationality;
+
+	/**
+	 * 第三发明人是否公布(0--不公布,1--公布)
+	 */
+	private Integer	thirdInventorIsPublish;
+
+	/**
+	 * 创建时间
+	 */
+	private Date	createTime;
+
+	/**
+	 * 撰写人
+	 */
+	private String	author;
+
+	/**
+	 * 授权日/发文日
+	 */
+	private Date	authorizedDate;
+
+	/**
+	 * 事务所
+	 */
+	private String	office;
+
+	/**
+	 * 负责人
+	 */
+	private String	principal;
+
+	/**
+	 * 用户确认申报材料
+	 */
+	private Integer	confirmState;
+
+	/**
+	 * 专利申请时间
+	 */
+	private Date	recordTime;
+
+	/**
+	 * 删除标记
+	 */
+	private Integer	deletedSign;
+
+	/**
+	 * 联系人及联系方式
+	 */
+	private Integer	contacts;
+
+	public String getId() {
+		return id;
+	}
+
+	public void setId(String id) {
+		this.id = id;
+	}
+
+	public String getUid() {
+		return uid;
+	}
+
+	public void setUid(String uid) {
+		this.uid = uid;
+	}
+
+	public Integer getSerialNumber() {
 		return serialNumber;
 	}
 
@@ -193,204 +196,207 @@ public class PatentInfo {
 	}
 
 	public String getPatentNumber() {
-        return patentNumber;
-    }
+		return patentNumber;
+	}
 
-    public void setPatentNumber(String patentNumber) {
-        this.patentNumber = patentNumber;
-    }
+	public void setPatentNumber(String patentNumber) {
+		this.patentNumber = patentNumber;
+	}
 
-    public String getPatentName() {
-        return patentName;
-    }
+	public String getPatentName() {
+		return patentName;
+	}
 
-    public void setPatentName(String patentName) {
-        this.patentName = patentName;
-    }
+	public void setPatentName(String patentName) {
+		this.patentName = patentName;
+	}
 
-    public Integer getPatentCatagory() {
-        return patentCatagory;
-    }
+	@JsonFormat(shape = Shape.STRING)
+	public Integer getPatentCatagory() {
+		return patentCatagory;
+	}
 
-    public void setPatentCatagory(Integer patentCatagory) {
-        this.patentCatagory = patentCatagory;
-    }
+	public void setPatentCatagory(Integer patentCatagory) {
+		this.patentCatagory = patentCatagory;
+	}
 
-    public Integer getPatentState() {
-        return patentState;
-    }
+	@JsonFormat(shape = Shape.STRING)
+	public Integer getPatentState() {
+		return patentState;
+	}
 
-    public void setPatentState(Integer patentState) {
-        this.patentState = patentState;
-    }
+	public void setPatentState(Integer patentState) {
+		this.patentState = patentState;
+	}
 
-    public Integer getPatentField() {
-        return patentField;
-    }
+	@JsonFormat(shape = Shape.STRING)
+	public Integer getPatentField() {
+		return patentField;
+	}
 
-    public void setPatentField(Integer patentField) {
-        this.patentField = patentField;
-    }
+	public void setPatentField(Integer patentField) {
+		this.patentField = patentField;
+	}
 
-    public String getPatentDes() {
-        return patentDes;
-    }
+	public String getPatentDes() {
+		return patentDes;
+	}
 
-    public void setPatentDes(String patentDes) {
-        this.patentDes = patentDes;
-    }
+	public void setPatentDes(String patentDes) {
+		this.patentDes = patentDes;
+	}
 
-    public String getPatentProryStatementUrl() {
-        return patentProryStatementUrl;
-    }
+	public String getPatentProryStatementUrl() {
+		return patentProryStatementUrl;
+	}
 
-    public void setPatentProryStatementUrl(String patentProryStatementUrl) {
-        this.patentProryStatementUrl = patentProryStatementUrl;
-    }
+	public void setPatentProryStatementUrl(String patentProryStatementUrl) {
+		this.patentProryStatementUrl = patentProryStatementUrl;
+	}
 
-    public String getPatentWritingUrl() {
-        return patentWritingUrl;
-    }
+	public String getPatentWritingUrl() {
+		return patentWritingUrl;
+	}
 
-    public void setPatentWritingUrl(String patentWritingUrl) {
-        this.patentWritingUrl = patentWritingUrl;
-    }
+	public void setPatentWritingUrl(String patentWritingUrl) {
+		this.patentWritingUrl = patentWritingUrl;
+	}
 
-    public String getAuthorizationNoticeUrl() {
-        return authorizationNoticeUrl;
-    }
+	public String getAuthorizationNoticeUrl() {
+		return authorizationNoticeUrl;
+	}
 
-    public void setAuthorizationNoticeUrl(String authorizationNoticeUrl) {
-        this.authorizationNoticeUrl = authorizationNoticeUrl;
-    }
+	public void setAuthorizationNoticeUrl(String authorizationNoticeUrl) {
+		this.authorizationNoticeUrl = authorizationNoticeUrl;
+	}
 
-    public String getPatentCertificateUrl() {
-        return patentCertificateUrl;
-    }
+	public String getPatentCertificateUrl() {
+		return patentCertificateUrl;
+	}
 
-    public void setPatentCertificateUrl(String patentCertificateUrl) {
-        this.patentCertificateUrl = patentCertificateUrl;
-    }
+	public void setPatentCertificateUrl(String patentCertificateUrl) {
+		this.patentCertificateUrl = patentCertificateUrl;
+	}
 
-    public Date getPatentApplicationDate() {
-        return patentApplicationDate;
-    }
+	public Date getPatentApplicationDate() {
+		return patentApplicationDate;
+	}
 
-    public void setPatentApplicationDate(Date patentApplicationDate) {
-        this.patentApplicationDate = patentApplicationDate;
-    }
+	public void setPatentApplicationDate(Date patentApplicationDate) {
+		this.patentApplicationDate = patentApplicationDate;
+	}
 
-    public String getFirstInventorName() {
-        return firstInventorName;
-    }
+	public String getFirstInventorName() {
+		return firstInventorName;
+	}
 
-    public void setFirstInventorName(String firstInventorName) {
-        this.firstInventorName = firstInventorName;
-    }
+	public void setFirstInventorName(String firstInventorName) {
+		this.firstInventorName = firstInventorName;
+	}
 
-    public String getFirstInventorNationality() {
-        return firstInventorNationality;
-    }
+	public String getFirstInventorNationality() {
+		return firstInventorNationality;
+	}
 
-    public void setFirstInventorNationality(String firstInventorNationality) {
-        this.firstInventorNationality = firstInventorNationality;
-    }
+	public void setFirstInventorNationality(String firstInventorNationality) {
+		this.firstInventorNationality = firstInventorNationality;
+	}
 
-    public String getFirstInventorIdNumber() {
-        return firstInventorIdNumber;
-    }
+	public String getFirstInventorIdNumber() {
+		return firstInventorIdNumber;
+	}
 
-    public void setFirstInventorIdNumber(String firstInventorIdNumber) {
-        this.firstInventorIdNumber = firstInventorIdNumber;
-    }
+	public void setFirstInventorIdNumber(String firstInventorIdNumber) {
+		this.firstInventorIdNumber = firstInventorIdNumber;
+	}
 
-    public Integer getFirstInventorIsPublish() {
-        return firstInventorIsPublish;
-    }
+	public Integer getFirstInventorIsPublish() {
+		return firstInventorIsPublish;
+	}
 
-    public void setFirstInventorIsPublish(Integer firstInventorIsPublish) {
-        this.firstInventorIsPublish = firstInventorIsPublish;
-    }
+	public void setFirstInventorIsPublish(Integer firstInventorIsPublish) {
+		this.firstInventorIsPublish = firstInventorIsPublish;
+	}
 
-    public String getSecondInventorName() {
-        return secondInventorName;
-    }
+	public String getSecondInventorName() {
+		return secondInventorName;
+	}
 
-    public void setSecondInventorName(String secondInventorName) {
-        this.secondInventorName = secondInventorName;
-    }
+	public void setSecondInventorName(String secondInventorName) {
+		this.secondInventorName = secondInventorName;
+	}
 
-    public String getSecondInventorNationality() {
-        return secondInventorNationality;
-    }
+	public String getSecondInventorNationality() {
+		return secondInventorNationality;
+	}
 
-    public void setSecondInventorNationality(String secondInventorNationality) {
-        this.secondInventorNationality = secondInventorNationality;
-    }
+	public void setSecondInventorNationality(String secondInventorNationality) {
+		this.secondInventorNationality = secondInventorNationality;
+	}
 
-    public Integer getSecondInventorIsPublish() {
-        return secondInventorIsPublish;
-    }
+	public Integer getSecondInventorIsPublish() {
+		return secondInventorIsPublish;
+	}
 
-    public void setSecondInventorIsPublish(Integer secondInventorIsPublish) {
-        this.secondInventorIsPublish = secondInventorIsPublish;
-    }
+	public void setSecondInventorIsPublish(Integer secondInventorIsPublish) {
+		this.secondInventorIsPublish = secondInventorIsPublish;
+	}
 
-    public String getThirdInventorName() {
-        return thirdInventorName;
-    }
+	public String getThirdInventorName() {
+		return thirdInventorName;
+	}
 
-    public void setThirdInventorName(String thirdInventorName) {
-        this.thirdInventorName = thirdInventorName;
-    }
+	public void setThirdInventorName(String thirdInventorName) {
+		this.thirdInventorName = thirdInventorName;
+	}
 
-    public String getThirdInventorNationality() {
-        return thirdInventorNationality;
-    }
+	public String getThirdInventorNationality() {
+		return thirdInventorNationality;
+	}
 
-    public void setThirdInventorNationality(String thirdInventorNationality) {
-        this.thirdInventorNationality = thirdInventorNationality;
-    }
+	public void setThirdInventorNationality(String thirdInventorNationality) {
+		this.thirdInventorNationality = thirdInventorNationality;
+	}
 
-    public Integer getThirdInventorIsPublish() {
-        return thirdInventorIsPublish;
-    }
+	public Integer getThirdInventorIsPublish() {
+		return thirdInventorIsPublish;
+	}
 
-    public void setThirdInventorIsPublish(Integer thirdInventorIsPublish) {
-        this.thirdInventorIsPublish = thirdInventorIsPublish;
-    }
+	public void setThirdInventorIsPublish(Integer thirdInventorIsPublish) {
+		this.thirdInventorIsPublish = thirdInventorIsPublish;
+	}
 
-    public Date getCreateTime() {
-        return createTime;
-    }
+	public Date getCreateTime() {
+		return createTime;
+	}
 
-    public void setCreateTime(Date createTime) {
-        this.createTime = createTime;
-    }
+	public void setCreateTime(Date createTime) {
+		this.createTime = createTime;
+	}
 
-    public String getAuthor() {
-        return author;
-    }
+	public String getAuthor() {
+		return author;
+	}
 
-    public void setAuthor(String author) {
-        this.author = author;
-    }
+	public void setAuthor(String author) {
+		this.author = author;
+	}
 
-    public String getOffice() {
-        return office;
-    }
+	public String getOffice() {
+		return office;
+	}
 
-    public void setOffice(String office) {
-        this.office = office;
-    }
+	public void setOffice(String office) {
+		this.office = office;
+	}
 
-    public String getPrincipal() {
-        return principal;
-    }
+	public String getPrincipal() {
+		return principal;
+	}
 
-    public void setPrincipal(String principal) {
-        this.principal = principal;
-    }
+	public void setPrincipal(String principal) {
+		this.principal = principal;
+	}
 
 	public Date getAuthorizedDate() {
 		return authorizedDate;
@@ -399,9 +405,7 @@ public class PatentInfo {
 	public void setAuthorizedDate(Date authorizedDate) {
 		this.authorizedDate = authorizedDate;
 	}
-	
-	
-	
+
 	public Integer getConfirmState() {
 		return confirmState;
 	}
@@ -409,9 +413,9 @@ public class PatentInfo {
 	public void setConfirmState(Integer confirmState) {
 		this.confirmState = confirmState;
 	}
-	
+
 	@JsonIgnore
-    public Date getRecordTime() {
+	public Date getRecordTime() {
 		return recordTime;
 	}
 
@@ -428,8 +432,7 @@ public class PatentInfo {
 		this.deletedSign = deletedSign;
 	}
 	
-	
-
+	@JsonFormat(shape = Shape.STRING)
 	public Integer getContacts() {
 		return contacts;
 	}
@@ -438,96 +441,95 @@ public class PatentInfo {
 		this.contacts = contacts;
 	}
 
-	//授权日/发文日
+	// 授权日/发文日
 	public String getAuthorizedFormattedDate() {
 		if (this.authorizedDate == null) {
 			return null;
 		} else {
-			return DateFormatUtils.format(this.getAuthorizedDate(), AFTConstants.YYYYMMDD);
+			return DateFormatUtils.format(this.getAuthorizedDate(), AFTConstants.YYYYMMDDHHMMSS);
 		}
 	}
 
 	public void setAuthorizedFormattedDate(String authorizedFormattedDate) {
 
 	}
-	
-	//申请日/受理日
-	public String getPatentApplicationFormattedDate(){
+
+	// 申请日/受理日
+	public String getPatentApplicationFormattedDate() {
 		if (this.patentApplicationDate == null) {
 			return null;
 		} else {
-			return DateFormatUtils.format(this.getPatentApplicationDate(), AFTConstants.YYYYMMDD);
+			return DateFormatUtils.format(this.getPatentApplicationDate(), AFTConstants.YYYYMMDDHHMMSS);
 		}
 	}
-	
-	public void setPatentApplicationFormattedDate(String patentApplicationFormattedDate){
-		
+
+	public void setPatentApplicationFormattedDate(String patentApplicationFormattedDate) {
+
 	}
-	
-	//创建时间
-	public String getCreateTimeFormattedDate(){
+
+	// 创建时间
+	public String getCreateTimeFormattedDate() {
 		if (this.createTime == null) {
 			return null;
 		} else {
-			return DateFormatUtils.format(this.getCreateTime(), AFTConstants.YYYYMMDD);
+			return DateFormatUtils.format(this.getCreateTime(), AFTConstants.YYYYMMDDHHMMSS);
 		}
 	}
-	
-	public void setCreateTimeFormattedDate(String createTimeFormattedDate){
-		
+
+	public void setCreateTimeFormattedDate(String createTimeFormattedDate) {
+
 	}
-	
-	//专利代理委托书
-	public String getPatentProryStatementDownloadFileName(){
-		if (StringUtils.isBlank(this.patentProryStatementUrl)){
+
+	// 专利代理委托书
+	public String getPatentProryStatementDownloadFileName() {
+		if (StringUtils.isBlank(this.patentProryStatementUrl)) {
 			return null;
 		} else {
 			return FileUtils.getDownloadFileName(this.patentProryStatementUrl);
 		}
 	}
-	
-	public void setPatentProryStatementDownloadFileName(String patentProryStatementDownloadFileName){
-		
+
+	public void setPatentProryStatementDownloadFileName(String patentProryStatementDownloadFileName) {
+
 	}
-	
-	//专利稿件
-	public String getPatentWritingDownloadFileName(){
-		if (StringUtils.isBlank(this.patentWritingUrl)){
+
+	// 专利稿件
+	public String getPatentWritingDownloadFileName() {
+		if (StringUtils.isBlank(this.patentWritingUrl)) {
 			return null;
 		} else {
 			return FileUtils.getDownloadFileName(this.patentWritingUrl);
 		}
 	}
-	
-	public void setPatentWritingDownloadFileName(String patentWritingDownloadFileName){
-		
+
+	public void setPatentWritingDownloadFileName(String patentWritingDownloadFileName) {
+
 	}
-	
-	//授权通知书
-	public String getAuthorizationNoticeDownloadFileName(){
-		if (StringUtils.isBlank(this.authorizationNoticeUrl)){
+
+	// 授权通知书
+	public String getAuthorizationNoticeDownloadFileName() {
+		if (StringUtils.isBlank(this.authorizationNoticeUrl)) {
 			return null;
 		} else {
 			return FileUtils.getDownloadFileName(this.authorizationNoticeUrl);
 		}
 	}
-	
-	public void setAuthorizationNoticeDownloadFileName(String authorizationNoticeDownloadFileName){
-		
+
+	public void setAuthorizationNoticeDownloadFileName(String authorizationNoticeDownloadFileName) {
+
 	}
-	
-	//专利证书
-	public String getPatentCertificateDownloadFileName(){
-		if (StringUtils.isBlank(this.patentCertificateUrl)){
+
+	// 专利证书
+	public String getPatentCertificateDownloadFileName() {
+		if (StringUtils.isBlank(this.patentCertificateUrl)) {
 			return null;
 		} else {
 			return FileUtils.getDownloadFileName(this.patentCertificateUrl);
 		}
 	}
-	
-	public void setPatentCertificateDownloadFileName(String patentCertificateDownloadFileName){
-		
+
+	public void setPatentCertificateDownloadFileName(String patentCertificateDownloadFileName) {
+
 	}
-    
-    
+
 }

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

@@ -101,7 +101,7 @@ public class PatentLog {
 		if (this.recordTime == null) {
 			return null;
 		} else {
-			return DateFormatUtils.format(this.getRecordTime(), AFTConstants.YYYYMMDD);
+			return DateFormatUtils.format(this.getRecordTime(), AFTConstants.YYYYMMDDHHMMSS);
 		}
 	}
 	

+ 15 - 0
src/main/java/com/goafanti/common/model/TechProjectLog.java

@@ -2,8 +2,11 @@ package com.goafanti.common.model;
 
 import java.util.Date;
 
+import org.apache.commons.lang3.time.DateFormatUtils;
+
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.fasterxml.jackson.annotation.JsonFormat.Shape;
+import com.goafanti.common.constant.AFTConstants;
 
 public class TechProjectLog {
     private String id;
@@ -91,4 +94,16 @@ public class TechProjectLog {
     public void setComment(String comment) {
         this.comment = comment;
     }
+    
+    public String getRecordTimeFormattedDate(){
+		if (this.recordTime == null) {
+			return null;
+		} else {
+			return DateFormatUtils.format(this.getRecordTime(), AFTConstants.YYYYMMDDHHMMSS);
+		}
+	}
+	
+	public void setRecordTimeFormattedDate(String createTimeFormattedDate){
+		
+	}
 }

+ 22 - 1
src/main/java/com/goafanti/common/utils/DateUtils.java

@@ -50,5 +50,26 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils {
 	public static long truncatedHourDiffTo(final Date date1, final Date date2) {
 		return truncatedDiffTo(date1, date2, Calendar.HOUR) / 3600000;
 	}
-	
+
+	/**
+	 * Determines how two dates compare up to no more than the specified most
+	 * significant field.
+	 * 
+	 * @param date1
+	 *            the first date, not <code>null</code>
+	 * @param date2
+	 *            the second date, not <code>null</code>
+	 * @param field
+	 *            the field from <code>Calendar</code>
+	 * @return diff millis
+	 * @throws IllegalArgumentException
+	 *             if any argument is <code>null</code>
+	 * @see #truncate(Calendar, int)
+	 * @see #truncatedCompareTo(Date, Date, int)
+	 * @since 3.0
+	 */
+	public static long truncatedMinuteDiffTo(final Date date1, final Date date2) {
+		return truncatedDiffTo(date1, date2, Calendar.MINUTE) / 60000;
+	}
+
 }

+ 9 - 6
src/main/java/com/goafanti/common/utils/FileUtils.java

@@ -97,10 +97,9 @@ public class FileUtils {
 		if (sign.indexOf("protocol") != -1 || sign.indexOf("achievement") != -1 || sign.indexOf("honor") != -1
 				|| sign.indexOf("proof") != -1 || sign.indexOf("activity_cost_account") != -1
 				|| sign.indexOf("tech_product") != -1 || sign.indexOf("property_ritht") != -1
-				|| sign.indexOf("tech_project") != -1 || sign.indexOf("patent_prory_statement") != -1 
-				|| sign.indexOf("patent_writing") != -1 || sign.indexOf("authorization_notice") != -1 
-				|| sign.indexOf("patent_certificate") != -1 
-				) {
+				|| sign.indexOf("tech_project") != -1 || sign.indexOf("patent_prory_statement") != -1
+				|| sign.indexOf("patent_writing") != -1 || sign.indexOf("authorization_notice") != -1
+				|| sign.indexOf("patent_certificate") != -1) {
 			uniq = true;
 		}
 		String fileName = "";
@@ -270,13 +269,17 @@ public class FileUtils {
 			LoggerUtils.fmtError(FileUtils.class, e, "IO错误:%s", e.getMessage());
 		} finally {
 			try {
-				in.close();
+				if (in != null) {
+					in.close();
+				}
 			} catch (IOException e) {
 				in = null;
 				LoggerUtils.fmtError(FileUtils.class, e, "IO错误:%s", e.getMessage());
 			}
 			try {
-				out.close();
+				if (out != null) {
+					out.close();
+				}
 			} catch (IOException e) {
 				out = null;
 				LoggerUtils.fmtError(FileUtils.class, e, "IO错误:%s", e.getMessage());

+ 9 - 0
src/main/java/com/goafanti/common/utils/SHA256Util.java

@@ -0,0 +1,9 @@
+package com.goafanti.common.utils;
+
+import org.apache.shiro.crypto.hash.SimpleHash;
+
+public class SHA256Util {
+	public static String toHash(String source, String salt) {
+		return new SimpleHash("sha-256", source, salt, 1).toHex();
+	}
+}

+ 3 - 3
src/main/java/com/goafanti/copyright/bo/CopyrightInfoSummary.java

@@ -235,7 +235,7 @@ public class CopyrightInfoSummary {
 		if (this.acceptTime == null) {
 			return null;
 		} else {
-			return DateFormatUtils.format(this.acceptTime, AFTConstants.YYYYMMDD);
+			return DateFormatUtils.format(this.acceptTime, AFTConstants.YYYYMMDDHHMMSS);
 		}
 	}
 
@@ -247,7 +247,7 @@ public class CopyrightInfoSummary {
 		if (this.authorizedDate == null) {
 			return null;
 		} else {
-			return DateFormatUtils.format(this.authorizedDate, AFTConstants.YYYYMMDD);
+			return DateFormatUtils.format(this.authorizedDate, AFTConstants.YYYYMMDDHHMMSS);
 		}
 	}
 
@@ -259,7 +259,7 @@ public class CopyrightInfoSummary {
 		if (this.createTime == null) {
 			return null;
 		} else {
-			return DateFormatUtils.format(this.createTime, AFTConstants.YYYYMMDD);
+			return DateFormatUtils.format(this.createTime, AFTConstants.YYYYMMDDHHMMSS);
 		}
 	}
 

+ 5 - 2
src/main/java/com/goafanti/copyright/bo/CopyrightLogBO.java

@@ -4,6 +4,8 @@ import java.util.Date;
 
 import org.apache.commons.lang3.time.DateFormatUtils;
 
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonFormat.Shape;
 import com.goafanti.common.constant.AFTConstants;
 
 public class CopyrightLogBO {
@@ -40,7 +42,8 @@ public class CopyrightLogBO {
 	public void setRecordTime(Date recordTime) {
 		this.recordTime = recordTime;
 	}
-
+	
+	@JsonFormat(shape = Shape.STRING)
 	public Integer getStatus() {
 		return status;
 	}
@@ -77,7 +80,7 @@ public class CopyrightLogBO {
 		if (this.recordTime == null) {
 			return null;
 		} else {
-			return DateFormatUtils.format(this.recordTime, AFTConstants.YYYYMMDD);
+			return DateFormatUtils.format(this.recordTime, AFTConstants.YYYYMMDDHHMMSS);
 		}
 	}
 

+ 1 - 1
src/main/java/com/goafanti/copyright/service/impl/CopyrightInfoServiceImpl.java

@@ -51,7 +51,7 @@ public class CopyrightInfoServiceImpl extends BaseMybatisDao<CopyrightInfoMapper
 		log.setRecordTime(copyrightInfo.getCreateTime());
 		log.setComment(copyrightInfo.getComment());
 		log.setOperator(TokenManager.getAdminId());
-		log.setPrincipal(copyrightInfo.getPrincipal());
+		log.setPrincipal(TokenManager.getAdminId());
 		log.setStatus(copyrightInfo.getStatus());
 		copyrightInfoMapper.insertSelective(copyrightInfo);
 		copyrightLogMapper.insertSelective(log);

+ 4 - 2
src/main/java/com/goafanti/patent/bo/PatentInfoDetailBo.java

@@ -150,7 +150,8 @@ public class PatentInfoDetailBo {
 	public void setPatentCatagory(String patentCatagory) {
 		this.patentCatagory = patentCatagory;
 	}
-
+	
+	@JsonFormat(shape = Shape.STRING)
 	public Integer getPatentState() {
 		return patentState;
 	}
@@ -158,7 +159,8 @@ public class PatentInfoDetailBo {
 	public void setPatentState(Integer patentState) {
 		this.patentState = patentState;
 	}
-
+	
+	@JsonFormat(shape = Shape.STRING)
 	public Integer getPatentField() {
 		return patentField;
 	}

+ 1 - 1
src/main/java/com/goafanti/patent/controller/PatentApiController.java

@@ -272,7 +272,7 @@ public class PatentApiController extends CertifyApiController {
 			}
 			res.setData(list);
 		} else {
-			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "专利d"));
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "专利id"));
 		}
 		return res;
 	}

+ 2 - 1
src/main/java/com/goafanti/permission/controller/PermissionApiController.java

@@ -16,6 +16,7 @@ import com.alibaba.fastjson.JSONArray;
 import com.goafanti.common.bo.Result;
 import com.goafanti.common.controller.BaseApiController;
 import com.goafanti.common.model.Permission;
+import com.goafanti.common.utils.StringUtils;
 import com.goafanti.permission.service.PermissionService;
 
 @RestController
@@ -40,7 +41,7 @@ public class PermissionApiController extends BaseApiController {
 				records.add(ja.getJSONObject(idx).toJavaObject(Permission.class));
 			}
 			for (Permission p : records){
-				if (null == p.getId()){
+				if (StringUtils.isBlank(p.getId())){
 					p.setId(UUID.randomUUID().toString());
 				}
 			}

+ 15 - 1
src/main/java/com/goafanti/user/bo/OrgListBo.java

@@ -4,6 +4,8 @@ import java.util.Date;
 
 import org.apache.commons.lang3.time.DateFormatUtils;
 
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonFormat.Shape;
 import com.goafanti.common.constant.AFTConstants;
 
 public class OrgListBo {
@@ -24,6 +26,8 @@ public class OrgListBo {
     private String adminName;
     
     private String unitName;
+    
+    private Integer type;
 
 	public String getId() {
 		return id;
@@ -98,13 +102,23 @@ public class OrgListBo {
 	public void setUnitName(String unitName) {
 		this.unitName = unitName;
 	}
+	
+	
+	@JsonFormat(shape = Shape.STRING)
+	public Integer getType() {
+		return type;
+	}
+
+	public void setType(Integer type) {
+		this.type = type;
+	}
 
 	//注册时间
 	public String getCreateTimeFormattedDate(){
 		if (this.createTime == null) {
 			 return null;
 		   } else {
-			 return DateFormatUtils.format(this.getCreateTime(), AFTConstants.YYYYMMDD);
+			 return DateFormatUtils.format(this.getCreateTime(), AFTConstants.YYYYMMDDHHMMSS);
 		   }
 	}
 			

+ 3 - 0
src/main/java/com/goafanti/user/service/UserService.java

@@ -1,6 +1,7 @@
 package com.goafanti.user.service;
 
 import java.text.ParseException;
+import java.util.List;
 
 import com.goafanti.common.model.User;
 import com.goafanti.core.mybatis.page.Pagination;
@@ -33,4 +34,6 @@ public interface UserService {
 	Pagination<OrgListBo> listOrg(String uid, String mobile, String email, String[] createTime, Integer number, String unitName,
 			Integer auditStatus, Integer pNo, Integer pSize) throws ParseException;
 
+	List<OrgListBo> selectUserByAid(String adminId);
+
 }

+ 6 - 0
src/main/java/com/goafanti/user/service/impl/UserServiceImpl.java

@@ -3,6 +3,7 @@ package com.goafanti.user.service.impl;
 import java.text.ParseException;
 import java.util.Date;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import java.util.UUID;
 
@@ -210,6 +211,11 @@ public class UserServiceImpl extends BaseMybatisDao<UserMapper> implements UserS
 				pageSize);
 	}
 
+	@Override
+	public List<OrgListBo> selectUserByAid(String aid) {
+		return userMapper.selectUserByAid(aid);
+	}
+
 
 
 

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

@@ -51,7 +51,7 @@ session.validate.timespan=18000000
 
 app.name=AFT
 
-static.host=//afts.hnzhiming.com/1.0.14
+static.host=//afts.hnzhiming.com/1.0.15
 
 upload.path=/data/wwwroot/aft/upload
 upload.private.path=/data/upload

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

@@ -53,7 +53,7 @@ session.validate.timespan=18000000
 
 app.name=AFT
 
-static.host=//afts.hnzhiming.com/1.0.14
+static.host=//afts.hnzhiming.com/1.0.15
 
 upload.path=/Users/xiaolong/Sites/upload
 upload.private.path=/Users/xiaolong/Sites/doc

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

@@ -51,4 +51,4 @@ session.validate.timespan=18000000
 
 app.name=AFT
 
-static.host=//afts.hnzhiming.com/1.0.14
+static.host=//afts.hnzhiming.com/1.0.15

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

@@ -53,7 +53,7 @@ session.validate.timespan=18000000
 
 app.name=AFT
 
-static.host=//aftts.hnzhiming.com/1.0.14
+static.host=//aftts.hnzhiming.com/1.0.15
 
 upload.path=/data/aft/public/upload
 upload.private.path=/data/aft/private/upload

+ 26 - 24
src/main/resources/props/error.properties

@@ -1,39 +1,41 @@
-org.apache.shiro.authc.UnknownAccountException=\u8d26\u53f7\u6216\u5bc6\u7801\u4e0d\u5339\u914d\u3002
-org.apache.shiro.authc.IncorrectCredentialsException=\u8d26\u53f7\u6216\u5bc6\u7801\u4e0d\u5339\u914d\u3002
-org.apache.shiro.authc.LockedAccountException=\u8be5\u8d26\u53f7\u5df2\u51bb\u7ed3\uff0c\u8bf7\u8054\u7cfb\u7ba1\u7406\u5458\u3002
-org.apache.shiro.authc.DisabledAccountException=\u8be5\u8d26\u53f7\u5df2\u51bb\u7ed3\uff0c\u8bf7\u8054\u7cfb\u7ba1\u7406\u5458\u3002
-org.apache.shiro.authc.ExcessiveAttemptsException=\u5c1d\u8bd5\u6b21\u6570\u8fc7\u591a\uff0c\u8d26\u53f7\u6682\u65f6\u88ab\u9501\u5b9a\uff0c\u8bf7\u7a0d\u540e\u518d\u8bd5\u3002
-org.apache.shiro.session.ExpiredSessionException=\u767b\u5f55\u4fe1\u606f\u5df2\u8fc7\u671f\uff0c\u8bf7\u91cd\u65b0\u767b\u5f55\u3002
-org.springframework.dao.DataIntegrityViolationException=\u670d\u52a1\u5668\u6253\u4e86\u4e2a\u76f9\u513f\uff0c\u8bf7\u8054\u7cfb\u7ba1\u7406\u5458\u6216\u7a0d\u540e\u518d\u8bd5\u3002
-org.springframework.jdbc.BadSqlGrammarException=\u6570\u636e\u5f02\u5e38\uff0c\u8bf7\u8054\u7cfb\u7ba1\u7406\u5458\u6216\u7a0d\u540e\u518d\u8bd5\u3002
-java.text.ParseException=\u53c2\u6570\u683c\u5f0f\u9519\u8bef\uff0c\u8bf7\u6838\u5bf9\u8f93\u5165\u6570\u636e\u540e\u518d\u8bd5\u3002
+org.apache.shiro.authc.UnknownAccountException=\u8D26\u53F7\u6216\u5BC6\u7801\u4E0D\u5339\u914D\u3002
+org.apache.shiro.authc.IncorrectCredentialsException=\u8D26\u53F7\u6216\u5BC6\u7801\u4E0D\u5339\u914D\u3002
+org.apache.shiro.authc.LockedAccountException=\u8BE5\u8D26\u53F7\u5DF2\u51BB\u7ED3\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u3002
+org.apache.shiro.authc.DisabledAccountException=\u8BE5\u8D26\u53F7\u5DF2\u51BB\u7ED3\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u3002
+org.apache.shiro.authc.ExcessiveAttemptsException=\u5C1D\u8BD5\u6B21\u6570\u8FC7\u591A\uFF0C\u8D26\u53F7\u6682\u65F6\u88AB\u9501\u5B9A\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5\u3002
+org.apache.shiro.session.ExpiredSessionException=\u767B\u5F55\u4FE1\u606F\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55\u3002
+org.springframework.dao.DataIntegrityViolationException=\u670D\u52A1\u5668\u6253\u4E86\u4E2A\u76F9\u513F\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u6216\u7A0D\u540E\u518D\u8BD5\u3002
+org.springframework.jdbc.BadSqlGrammarException=\u6570\u636E\u5F02\u5E38\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u6216\u7A0D\u540E\u518D\u8BD5\u3002
+java.text.ParseException=\u53C2\u6570\u683C\u5F0F\u9519\u8BEF\uFF0C\u8BF7\u6838\u5BF9\u8F93\u5165\u6570\u636E\u540E\u518D\u8BD5\u3002
 
-NON_LOGIN=\u7528\u6237\u672a\u767b\u5f55\u3002
+NON_LOGIN=\u7528\u6237\u672A\u767B\u5F55\u3002
 
-VCODE_ERROR=\u9a8c\u8bc1\u7801\u8f93\u5165\u9519\u8bef\uff01
+VCODE_ERROR=\u9A8C\u8BC1\u7801\u8F93\u5165\u9519\u8BEF\uFF01
 
-PARAM_ERROR={0}\u53c2\u6570\u9519\u8bef
+NO_AUTH_ERROR=\u672A\u6388\u6743\u6216\u6388\u6743\u8FC7\u671F\u3002
 
-PARAM_INTEGER_ERROR={0}\u53c2\u6570\u5fc5\u987b\u4e3a\u6570\u5b57\u3002
+PARAM_ERROR={0}\u53C2\u6570\u9519\u8BEF
 
-PARAM_EMPTY_ERROR={0}\u5fc5\u987b\u6307\u5b9a\u3002
+PARAM_INTEGER_ERROR={0}\u53C2\u6570\u5FC5\u987B\u4E3A\u6570\u5B57\u3002
 
-PARAM_SIZE_ERROR={0}\u53c2\u6570\u957f\u5ea6\u4e0d\u6b63\u786e\uff0c\u5fc5\u987b\u5728{min}\u548c{max}\u4e4b\u95f4\u3002
+PARAM_EMPTY_ERROR={0}\u5FC5\u987B\u6307\u5B9A\u3002
 
-PARAM_PATTERN_ERROR={0}\u53c2\u6570\u683c\u5f0f\u987b\u6b63\u786e\u6307\u5b9a{1}\u3002
+PARAM_SIZE_ERROR={0}\u53C2\u6570\u957F\u5EA6\u4E0D\u6B63\u786E\uFF0C\u5FC5\u987B\u5728{min}\u548C{max}\u4E4B\u95F4\u3002
 
-EMAIL_SIZE_ERROR=\u90ae\u7bb1\u5730\u5740\u957f\u5ea6\u9519\u8bef\uff01
+PARAM_PATTERN_ERROR={0}\u53C2\u6570\u683C\u5F0F\u987B\u6B63\u786E\u6307\u5B9A{1}\u3002
 
-EMAIL_PATTERN_ERROR=\u90ae\u7bb1\u5730\u5740\u683c\u5f0f\u9519\u8bef\uff01
+EMAIL_SIZE_ERROR=\u90AE\u7BB1\u5730\u5740\u957F\u5EA6\u9519\u8BEF\uFF01
 
-MOBILE_SIZE_ERROR=\u624b\u673a\u53f7\u957f\u5ea6\u9519\u8bef\uff01
+EMAIL_PATTERN_ERROR=\u90AE\u7BB1\u5730\u5740\u683C\u5F0F\u9519\u8BEF\uFF01
 
-MOBILE_PATTERN_ERROR=\u624b\u673a\u53f7\u683c\u5f0f\u9519\u8bef\uff01
+MOBILE_SIZE_ERROR=\u624B\u673A\u53F7\u957F\u5EA6\u9519\u8BEF\uFF01
 
-DUNPLICATE_KAY_ERROR={0}\u5df2\u88ab\u4ed6\u4eba\u6ce8\u518c\uff01
+MOBILE_PATTERN_ERROR=\u624B\u673A\u53F7\u683C\u5F0F\u9519\u8BEF\uFF01
 
-DATA_EMPTY_ERROR=\u5f53\u524d{0}\u6ca1\u6709\u6570\u636e\u3002
+DUNPLICATE_KAY_ERROR={0}\u5DF2\u88AB\u4ED6\u4EBA\u6CE8\u518C\uFF01
 
-PWD_NOT_MATCH_ERROR=\u539f\u5bc6\u7801\u8f93\u5165\u4e0d\u5339\u914d\u3002
+DATA_EMPTY_ERROR=\u5F53\u524D{0}\u6CA1\u6709\u6570\u636E\u3002
 
-NON_CERTIFIED=\u672a\u901a\u8fc7\u5b9e\u540d\u8ba4\u8bc1\uff0c\u65e0\u6cd5\u64cd\u4f5c\uff01
+PWD_NOT_MATCH_ERROR=\u539F\u5BC6\u7801\u8F93\u5165\u4E0D\u5339\u914D\u3002
+
+NON_CERTIFIED=\u672A\u901A\u8FC7\u5B9E\u540D\u8BA4\u8BC1\uFF0C\u65E0\u6CD5\u64CD\u4F5C\uFF01

+ 5 - 0
src/main/webapp/WEB-INF/views/header.jsp

@@ -57,6 +57,7 @@
 	window.showAchievement = true;
 	window.showDemand = true;
 	window.showIdea = true;
+	window.showCustomer = true;
 	</shiro:hasRole>
 
 	<shiro:hasPermission name="userManage">
@@ -74,5 +75,9 @@
 	<shiro:hasPermission name="idea">
 	window.showIdea = true;
 	</shiro:hasPermission>
+	<shiro:hasPermission name="customer">
+	window.showCustomer = true;
+	</shiro:hasPermission>
+	
 </script>
 <script type="text/javascript" src="${staticHost}/vendors.js"></script>