Browse Source

Accept Merge Request #133 v1.0.24 : (master -> test)

Merge Request: v1.0.24
Created By: @Antiloveg
Accepted By: @Antiloveg
URL: https://coding.net/t/aft/p/AFT/git/merge/133
Antiloveg 9 years ago
parent
commit
685af28c10
81 changed files with 2766 additions and 904 deletions
  1. 16 0
      schema/2017-04-25.sql
  2. 42 0
      schema/2017-04-26.sql
  3. 20 0
      schema/2017-04-27.sql
  4. 20 0
      schema/2017-04-28.sql
  5. 17 0
      schema/permission.sql
  6. 13 0
      src/main/java/com/goafanti/admin/bo/InputAdmin.java
  7. 34 68
      src/main/java/com/goafanti/admin/controller/AdminApiController.java
  8. 1 1
      src/main/java/com/goafanti/admin/controller/AdminCopyrightApiController.java
  9. 15 13
      src/main/java/com/goafanti/admin/controller/AdminPatentApiController.java
  10. 77 0
      src/main/java/com/goafanti/admin/controller/AdminSummaryApiController.java
  11. 1 1
      src/main/java/com/goafanti/admin/controller/AdminTechProjectApiController.java
  12. 239 0
      src/main/java/com/goafanti/admin/controller/AdminUserCertifyApiController.java
  13. 2 0
      src/main/java/com/goafanti/admin/service/AdminService.java
  14. 6 5
      src/main/java/com/goafanti/admin/service/impl/AdminServiceImpl.java
  15. 94 0
      src/main/java/com/goafanti/cognizance/bo/BusinessCountBo.java
  16. 12 0
      src/main/java/com/goafanti/cognizance/bo/CultivationListBo.java
  17. 1 1
      src/main/java/com/goafanti/cognizance/bo/InputApplyCognizance.java
  18. 2 2
      src/main/java/com/goafanti/cognizance/controller/CognizanceApiController.java
  19. 2 0
      src/main/java/com/goafanti/cognizance/service/OrgActivityService.java
  20. 3 0
      src/main/java/com/goafanti/cognizance/service/OrgCognizanceService.java
  21. 6 1
      src/main/java/com/goafanti/cognizance/service/OrgIntellectualPropertyService.java
  22. 5 0
      src/main/java/com/goafanti/cognizance/service/impl/OrgActivityServiceImpl.java
  23. 33 13
      src/main/java/com/goafanti/cognizance/service/impl/OrgCognizanceServiceImpl.java
  24. 57 2
      src/main/java/com/goafanti/cognizance/service/impl/OrgIntellectualPropertyServiceImpl.java
  25. 2 1
      src/main/java/com/goafanti/common/constant/AFTConstants.java
  26. 8 4
      src/main/java/com/goafanti/common/controller/PreviewController.java
  27. 5 0
      src/main/java/com/goafanti/common/controller/WebpageController.java
  28. 2 0
      src/main/java/com/goafanti/common/dao/CopyrightInfoMapper.java
  29. 2 0
      src/main/java/com/goafanti/common/dao/OrgActivityMapper.java
  30. 1 0
      src/main/java/com/goafanti/common/dao/OrgCognizanceMapper.java
  31. 2 0
      src/main/java/com/goafanti/common/dao/OrgIntellectualPropertyMapper.java
  32. 6 0
      src/main/java/com/goafanti/common/dao/OrganizationIdentityMapper.java
  33. 4 0
      src/main/java/com/goafanti/common/dao/PatentInfoMapper.java
  34. 2 0
      src/main/java/com/goafanti/common/dao/RoleMapper.java
  35. 4 0
      src/main/java/com/goafanti/common/dao/TechProjectMapper.java
  36. 3 0
      src/main/java/com/goafanti/common/dao/UserIdentityMapper.java
  37. 2 0
      src/main/java/com/goafanti/common/dao/UserRoleMapper.java
  38. 1 1
      src/main/java/com/goafanti/common/enums/AttachmentType.java
  39. 1 0
      src/main/java/com/goafanti/common/enums/NoticeStatus.java
  40. 16 4
      src/main/java/com/goafanti/common/mapper/AdminMapper.xml
  41. 12 0
      src/main/java/com/goafanti/common/mapper/CopyrightInfoMapper.xml
  42. 17 1
      src/main/java/com/goafanti/common/mapper/OrgActivityMapper.xml
  43. 20 7
      src/main/java/com/goafanti/common/mapper/OrgCognizanceMapper.xml
  44. 22 0
      src/main/java/com/goafanti/common/mapper/OrgIntellectualPropertyMapper.xml
  45. 314 134
      src/main/java/com/goafanti/common/mapper/OrganizationIdentityMapper.xml
  46. 21 3
      src/main/java/com/goafanti/common/mapper/PatentInfoMapper.xml
  47. 7 0
      src/main/java/com/goafanti/common/mapper/RoleMapper.xml
  48. 12 0
      src/main/java/com/goafanti/common/mapper/TechProjectMapper.xml
  49. 12 0
      src/main/java/com/goafanti/common/mapper/UserIdentityMapper.xml
  50. 23 7
      src/main/java/com/goafanti/common/mapper/UserMapper.xml
  51. 4 0
      src/main/java/com/goafanti/common/mapper/UserRoleMapper.xml
  52. 14 1
      src/main/java/com/goafanti/common/model/Admin.java
  53. 11 9
      src/main/java/com/goafanti/common/model/AftUser.java
  54. 15 0
      src/main/java/com/goafanti/common/model/OrgCognizance.java
  55. 554 544
      src/main/java/com/goafanti/common/model/OrganizationIdentity.java
  56. 20 0
      src/main/java/com/goafanti/common/model/User.java
  57. 3 1
      src/main/java/com/goafanti/common/task/PatentTask.java
  58. 9 0
      src/main/java/com/goafanti/core/shiro/token/TokenManager.java
  59. 2 2
      src/main/java/com/goafanti/patent/bo/InputPatentInfo.java
  60. 16 13
      src/main/java/com/goafanti/patent/controller/PatentApiController.java
  61. 1 1
      src/main/java/com/goafanti/patent/service/PatentInfoService.java
  62. 21 8
      src/main/java/com/goafanti/patent/service/impl/PatentInfoServiceImpl.java
  63. 8 1
      src/main/java/com/goafanti/permission/service/impl/RoleServiceImpl.java
  64. 2 2
      src/main/java/com/goafanti/techproject/bo/InputTechProject.java
  65. 26 0
      src/main/java/com/goafanti/user/bo/AuditorOrgIdentityDetailBo.java
  66. 29 0
      src/main/java/com/goafanti/user/bo/AuditorUserIdentityDetailBo.java
  67. 13 12
      src/main/java/com/goafanti/user/bo/InputOrgBasicInfo.java
  68. 13 12
      src/main/java/com/goafanti/user/bo/OrgBasicInfoBo.java
  69. 424 0
      src/main/java/com/goafanti/user/bo/OrgIdentityDetailBo.java
  70. 12 0
      src/main/java/com/goafanti/user/bo/OrgListBo.java
  71. 12 0
      src/main/java/com/goafanti/user/bo/UserListBo.java
  72. 9 1
      src/main/java/com/goafanti/user/service/OrganizationIdentityService.java
  73. 7 1
      src/main/java/com/goafanti/user/service/UserIdentityService.java
  74. 147 18
      src/main/java/com/goafanti/user/service/impl/OrganizationIdentityServiceImpl.java
  75. 128 4
      src/main/java/com/goafanti/user/service/impl/UserIdentityServiceImpl.java
  76. 1 1
      src/main/resources/props/config_dev.properties
  77. 1 1
      src/main/resources/props/config_local.properties
  78. 1 1
      src/main/resources/props/config_prod.properties
  79. 1 1
      src/main/resources/props/config_test.properties
  80. 11 0
      src/main/webapp/WEB-INF/views/admin/servicesManage/highTechInfo.jsp
  81. 12 1
      src/main/webapp/WEB-INF/views/header.jsp

+ 16 - 0
schema/2017-04-25.sql

@@ -0,0 +1,16 @@
+
+alter table `org_cognizance`
+ADD COLUMN  `tech_principal` VARCHAR(36) NULL COMMENT '高企技术负责人';
+
+
+
+
+
+
+
+
+
+
+
+
+

+ 42 - 0
schema/2017-04-26.sql

@@ -0,0 +1,42 @@
+
+alter table `admin`
+ADD COLUMN  `position` VARCHAR(32) NULL COMMENT '职位';
+
+alter table `organization_identity` 
+change  `consultant`  `tech_principal` VARCHAR(36) NULL COMMENT '高企技术负责人';
+
+alter table `copyright_log` 
+MODIFY COLUMN  `comment`  VARCHAR(128) NULL COMMENT '备注';
+
+alter table `patent_log`
+MODIFY COLUMN  `comment`  VARCHAR(128) NULL COMMENT '备注';
+
+alter table `patent_info`
+MODIFY COLUMN  `patent_des`  VARCHAR(128) NULL COMMENT '专利简介';
+
+alter table `tech_project_log`
+MODIFY COLUMN  `comment`  VARCHAR(128) NULL COMMENT '备注';
+
+alter table `tech_project`
+MODIFY COLUMN  `dispatch_info`  VARCHAR(128) NULL COMMENT '派单信息';
+
+alter table `org_cognizance_log`
+MODIFY COLUMN  `comment`  VARCHAR(128) NULL COMMENT '备注';
+
+alter table `org_cognizance`
+MODIFY COLUMN  `comment`  VARCHAR(128) NULL COMMENT '派单信息';
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

+ 20 - 0
schema/2017-04-27.sql

@@ -0,0 +1,20 @@
+
+alter table `user`
+ADD COLUMN  `mid` VARCHAR(36) NULL COMMENT '客户经理ID';
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

+ 20 - 0
schema/2017-04-28.sql

@@ -0,0 +1,20 @@
+
+alter table `organization_identity`
+ADD COLUMN  `patent_prory_statement_url` VARCHAR(255) NULL COMMENT '专利代理委托书URL';
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

+ 17 - 0
schema/permission.sql

@@ -357,6 +357,23 @@ values
 (UUID(), '/api/admin/preview/honor', '文件预览--企业荣誉及其他证明材料预览授权'), 
 (UUID(), '/api/admin/preview/standard', '文件预览--标准制定情况附件预览授权');
 
+insert into `permission`(`id`, `url`, `name`) 
+values
+(UUID(), 'api/admin/getBusinessCount', '高企认定--统计专利、软著及科技项目申报业务情况');
+
+insert into `permission`(`id`, `url`, `name`) 
+values
+(UUID(), 'api/admin/permissionList', '系统设置--权限列表'),
+(UUID(), 'api/admin/roleList', '系统设置--角色列表');
+
+insert into `permission`(`id`, `url`, `name`) 
+values
+(UUID(), 'api/admin/roles', '系统设置--获取角色下拉');
+
+
+
+
+
 
 
 

+ 13 - 0
src/main/java/com/goafanti/admin/bo/InputAdmin.java

@@ -22,6 +22,9 @@ public class InputAdmin {
 
 	@Size(min = 0, max = 12, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
 	private String	province;
+	
+	@Size(min = 0, max = 32, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
+	private String	position;
 
 	public String getId() {
 		return id;
@@ -71,4 +74,14 @@ public class InputAdmin {
 		this.province = province;
 	}
 
+	public String getPosition() {
+		return position;
+	}
+
+	public void setPosition(String position) {
+		this.position = position;
+	}
+	
+	
+
 }

+ 34 - 68
src/main/java/com/goafanti/admin/controller/AdminApiController.java

@@ -191,6 +191,20 @@ public class AdminApiController extends CertifyApiController {
 	private OrgCognizanceProportionService	orgCognizanceProportionService;
 
 	/**
+	 * 统计专利、软著及科技项目申报业务情况
+	 */
+	@RequestMapping(value = "/getBusinessCount", method = RequestMethod.GET)
+	public Result countBusiness(String uid) {
+		Result res = new Result();
+		if (StringUtils.isBlank(uid)) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到用户", "用户ID"));
+			return res;
+		}
+		res.setData(orgCognizanceService.countBusiness(uid));
+		return res;
+	}
+
+	/**
 	 * 更改资料填写完成状态
 	 * 
 	 * @param id
@@ -655,6 +669,7 @@ public class AdminApiController extends CertifyApiController {
 					UserIdentityFields.getFieldDesc(bindingResult.getFieldError().getField())));
 			return res;
 		}
+		
 
 		if (null == userIdentity.getUid()) {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到用户", "用户"));
@@ -671,35 +686,14 @@ public class AdminApiController extends CertifyApiController {
 		UserIdentity ui = new UserIdentity();
 		BeanUtils.copyProperties(userIdentity, ui);
 
+		ui.setProcess(IdentityProcess.COMMITTED.getCode());
+		ui.setAuditStatus(IdentityAuditStatus.COMMITTED.getCode());
+		
 		if (StringUtils.isBlank(ui.getId())) {
 			ui.setId(UUID.randomUUID().toString());
-			ui.setAuditStatus(null == ui.getAuditStatus() ? 0 : ui.getAuditStatus());
-			if (IdentityAuditStatus.UNCOMMITTED.getCode() == ui.getAuditStatus()) {
-				ui.setProcess(IdentityProcess.UNCOMMITTED.getCode());
-			} else if (IdentityAuditStatus.COMMITTED.getCode() == ui.getAuditStatus()
-					|| IdentityAuditStatus.UNPAID.getCode() == ui.getAuditStatus()) {
-				ui.setProcess(IdentityProcess.COMMITTED.getCode());
-			} else if (IdentityAuditStatus.PAID.getCode() == ui.getAuditStatus()) {
-				ui.setProcess(IdentityProcess.FILLIN.getCode());
-			} else if (IdentityAuditStatus.NOTPASSED.getCode() == ui.getAuditStatus()
-					|| IdentityAuditStatus.PASSED.getCode() == ui.getAuditStatus()) {
-				ui.setProcess(IdentityProcess.RESULTS.getCode());
-			}
-			res.setData(userIdentityService.insert(ui));
+			res.setData(userIdentityService.insertByAdmin(ui, null, null));
 		} else {
-			ui.setAuditStatus(null == ui.getAuditStatus() ? 0 : ui.getAuditStatus());
-			if (IdentityAuditStatus.UNCOMMITTED.getCode() == ui.getAuditStatus()) {
-				ui.setProcess(IdentityProcess.UNCOMMITTED.getCode());
-			} else if (IdentityAuditStatus.COMMITTED.getCode() == ui.getAuditStatus()
-					|| IdentityAuditStatus.UNPAID.getCode() == ui.getAuditStatus()) {
-				ui.setProcess(IdentityProcess.COMMITTED.getCode());
-			} else if (IdentityAuditStatus.PAID.getCode() == ui.getAuditStatus()) {
-				ui.setProcess(IdentityProcess.FILLIN.getCode());
-			} else if (IdentityAuditStatus.NOTPASSED.getCode() == ui.getAuditStatus()
-					|| IdentityAuditStatus.PASSED.getCode() == ui.getAuditStatus()) {
-				ui.setProcess(IdentityProcess.RESULTS.getCode());
-			}
-			res.setData(userIdentityService.updateUserDetail(ui));
+			res.setData(userIdentityService.updateUserDetail(ui, null, null));
 		}
 		return res;
 	}
@@ -747,7 +741,7 @@ public class AdminApiController extends CertifyApiController {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到用户", "用户"));
 			return res;
 		}
-		res.setData(organizationIdentityService.selectOrgIdentityByUserId(uid));
+		res.setData(organizationIdentityService.selectOrgIdentityDetailByUserId(uid));
 		return res;
 	}
 
@@ -785,36 +779,9 @@ public class AdminApiController extends CertifyApiController {
 
 		if (StringUtils.isBlank(oi.getId())) {
 			oi.setId(UUID.randomUUID().toString());
-			oi.setIdentityType(null == oi.getIdentityType() ? 0 : oi.getIdentityType());
-			oi.setAuditStatus(null == oi.getAuditStatus() ? 0 : oi.getAuditStatus());
-			if (IdentityAuditStatus.UNCOMMITTED.getCode() == oi.getAuditStatus()) {
-				oi.setProcess(IdentityProcess.UNCOMMITTED.getCode());
-			} else if (IdentityAuditStatus.COMMITTED.getCode() == oi.getAuditStatus()
-					|| IdentityAuditStatus.UNPAID.getCode() == oi.getAuditStatus()) {
-				oi.setProcess(IdentityProcess.COMMITTED.getCode());
-			} else if (IdentityAuditStatus.PAID.getCode() == oi.getAuditStatus()) {
-				oi.setProcess(IdentityProcess.FILLIN.getCode());
-			} else if (IdentityAuditStatus.NOTPASSED.getCode() == oi.getAuditStatus()
-					|| IdentityAuditStatus.PASSED.getCode() == oi.getAuditStatus()) {
-				oi.setProcess(IdentityProcess.RESULTS.getCode());
-			}
-			oi.setListed(null == oi.getListed() ? 0 : oi.getListed());
-			oi.setListedType(null == oi.getListedType() ? 0 : oi.getListedType());
-			res.setData(organizationIdentityService.insert(oi));
+			res.setData(organizationIdentityService.insertByAdmin(oi, null, null));
 		} else {
-			oi.setAuditStatus(null == oi.getAuditStatus() ? 0 : oi.getAuditStatus());
-			if (IdentityAuditStatus.UNCOMMITTED.getCode() == oi.getAuditStatus()) {
-				oi.setProcess(IdentityProcess.UNCOMMITTED.getCode());
-			} else if (IdentityAuditStatus.COMMITTED.getCode() == oi.getAuditStatus()
-					|| IdentityAuditStatus.UNPAID.getCode() == oi.getAuditStatus()) {
-				oi.setProcess(IdentityProcess.COMMITTED.getCode());
-			} else if (IdentityAuditStatus.PAID.getCode() == oi.getAuditStatus()) {
-				oi.setProcess(IdentityProcess.FILLIN.getCode());
-			} else if (IdentityAuditStatus.NOTPASSED.getCode() == oi.getAuditStatus()
-					|| IdentityAuditStatus.PASSED.getCode() == oi.getAuditStatus()) {
-				oi.setProcess(IdentityProcess.RESULTS.getCode());
-			}
-			res.setData(organizationIdentityService.updateOrgDetail(oi));
+			res.setData(organizationIdentityService.updateOrgDetail(oi, null, null));
 		}
 		return res;
 	}
@@ -1157,7 +1124,7 @@ public class AdminApiController extends CertifyApiController {
 	 * @return
 	 */
 	@RequestMapping(value = "/intellectualList", method = RequestMethod.POST)
-	public Result intellectualList(String pageNo, String pageSize, String uid) {
+	public Result intellectualList(String pageNo, String pageSize, String uid, String startDate, String endDate) {
 		Result res = new Result();
 
 		if (StringUtils.isBlank(uid)) {
@@ -1175,7 +1142,7 @@ public class AdminApiController extends CertifyApiController {
 		if (StringUtils.isNumeric(pageNo)) {
 			pNo = Integer.parseInt(pageNo);
 		}
-		res.setData(orgIntellectualPropertyService.listIntellectual(pNo, pSize, uid));
+		res.setData(orgIntellectualPropertyService.listIntellectual(pNo, pSize, uid, startDate, endDate));
 		return res;
 	}
 
@@ -2755,15 +2722,14 @@ public class AdminApiController extends CertifyApiController {
 	public Result disposeCenterDetail(@Valid InputOrgTechCenterDetail orgTechCenterDetail, BindingResult bindingResult,
 			String projectTimeFormattedDate, String termStartTimeFormattedDate, String termEndTimeFormattedDate) {
 		Result res = new Result();
-		
 
 		if (bindingResult.hasErrors()) {
 			res.getError().add(buildErrorByMsg(bindingResult.getFieldError().getDefaultMessage(),
 					OrgTechCenterDetailFields.getFieldDesc(bindingResult.getFieldError().getField())));
 			return res;
 		}
-		
-		if (StringUtils.isBlank(orgTechCenterDetail.getCid())){
+
+		if (StringUtils.isBlank(orgTechCenterDetail.getCid())) {
 			res.getError().add(buildError(ErrorConstants.STATUS_ERROR, "研发部门相关信息未保存,无法保存!"));
 			return res;
 		}
@@ -2967,7 +2933,7 @@ public class AdminApiController extends CertifyApiController {
 		List<Admin> list = adminService.selectCognizancePrincipal();
 		Map<String, String> map = new TreeMap<String, String>();
 		for (Admin o : list) {
-			map.put(o.getId(), o.getName());
+			map.put(o.getId(), o.getName() + " " + o.getPosition());
 		}
 		res.setData(map);
 		return res;
@@ -3066,16 +3032,16 @@ public class AdminApiController extends CertifyApiController {
 			return res;
 		}
 		OrgCognizance oc = orgCognizanceService.selectByPrimaryKey(cid);
-		if (null == oc){
+		if (null == oc) {
 			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "高企ID"));
 			return res;
 		}
-		
-		if (year - oc.getYear() != 0){
+
+		if (year - oc.getYear() != 0) {
 			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "高企ID及年份"));
 			return res;
 		}
-		
+
 		res.setData(handleCognizanceDetail(uid, cid, year));
 		return res;
 	}
@@ -3130,8 +3096,8 @@ public class AdminApiController extends CertifyApiController {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到", "高企认定"));
 			return res;
 		}
-		
-		if (null == cog.getYear()){
+
+		if (null == cog.getYear()) {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到", "年份"));
 			return res;
 		}

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

@@ -334,7 +334,7 @@ public class AdminCopyrightApiController extends CertifyApiController {
 		List<Admin> list = adminService.selectCopyrightPrincipal();
 		Map<String, String> map = new TreeMap<String, String>();
 		for (Admin o : list) {
-			map.put(o.getId(), o.getName());
+			map.put(o.getId(), o.getName()+ " " + o.getPosition());
 		}
 		res.setData(map);
 		return res;

+ 15 - 13
src/main/java/com/goafanti/admin/controller/AdminPatentApiController.java

@@ -47,6 +47,7 @@ import com.goafanti.common.enums.PatentRegistrationFields;
 import com.goafanti.common.model.Admin;
 import com.goafanti.common.model.AftFile;
 import com.goafanti.common.model.OrgRatepay;
+import com.goafanti.common.model.OrganizationIdentity;
 import com.goafanti.common.model.PatentCost;
 import com.goafanti.common.model.PatentInfo;
 import com.goafanti.common.model.PatentLog;
@@ -93,6 +94,8 @@ public class AdminPatentApiController extends CertifyApiController {
 	private AftFileService					aftFileService;
 	@Resource
 	private OrgRatepayService				orgRatepayService;
+	@Resource
+	private OrganizationIdentityService		organizationIdentityService;
 
 	@Value(value = "${aesSecretKey}")
 	private String							secretKey	= null;
@@ -111,7 +114,7 @@ public class AdminPatentApiController extends CertifyApiController {
 					PatentInfoFields.getFieldDesc(bindingResult.getFieldError().getField())));
 			return res;
 		}
-		
+
 		if (ids == null || ids.length < 1) {
 			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", ""));
 			return res;
@@ -121,7 +124,7 @@ public class AdminPatentApiController extends CertifyApiController {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到流转状态", "流转状态"));
 			return res;
 		}
-		
+
 		if (StringUtils.isBlank(pi.getPrincipal())) {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到负责人", "负责人"));
 			return res;
@@ -153,7 +156,7 @@ public class AdminPatentApiController extends CertifyApiController {
 	 */
 	@RequestMapping(value = "/patentList", method = RequestMethod.GET)
 	public Result patentList(Integer serialNumber, String patentNumber, String office, String locationProvince,
-			String unitName, Integer patentCatagory, String patentName, Integer patentState,
+			String unitName, Integer patentCatagory, String patentName, Integer patentState, String uid,
 			@RequestParam(name = "createTime[]", required = false) String[] createTime,
 			@RequestParam(name = "patentApplicationDate[]", required = false) String[] patentApplicationDate,
 			String author, String pageNo, String pageSize) {
@@ -167,7 +170,7 @@ public class AdminPatentApiController extends CertifyApiController {
 			pNo = Integer.parseInt(pageNo);
 		}
 		res.setData(patentInfoService.getManagePatentList(serialNumber, patentNumber, office, locationProvince,
-				unitName, patentCatagory, patentName, patentState, createTime, patentApplicationDate, author, pNo,
+				unitName, patentCatagory, patentName, patentState, createTime, patentApplicationDate, author, uid, pNo,
 				pSize));
 		return res;
 	}
@@ -322,7 +325,7 @@ public class AdminPatentApiController extends CertifyApiController {
 		if (null == ratepay) {
 			return res;
 		}
-		
+
 		Map<String, String> map = new TreeMap<String, String>();
 		map.put("id", ratepay.getId());
 		map.put("year", ratepay.getYear().toString());
@@ -432,7 +435,8 @@ public class AdminPatentApiController extends CertifyApiController {
 				|| attachmentType == AttachmentType.AUTHORIZATION_NOTICE
 				|| attachmentType == AttachmentType.PATENT_CERTIFICATE) {
 			if (attachmentType == AttachmentType.PATENT_PRORY_STATEMENT) {
-				downloadFile(response, pi.getPatentProryStatementDownloadFileName(), pi.getPatentProryStatementUrl());
+				OrganizationIdentity oi = organizationIdentityService.selectOrgIdentityByUserId(pi.getUid());
+				downloadFile(response, oi.getPatentProryStatementDownloadFileName(), oi.getPatentProryStatementUrl());
 			} else if (attachmentType == AttachmentType.PATENT_WRITING) {
 				downloadFile(response, pi.getPatentWritingDownloadFileName(), pi.getPatentWritingUrl());
 			} else if (attachmentType == AttachmentType.AUTHORIZATION_NOTICE) {
@@ -446,8 +450,6 @@ public class AdminPatentApiController extends CertifyApiController {
 		return res;
 	}
 
-	
-
 	/**
 	 * 下载模版文件(专利代理委托书)
 	 * 
@@ -809,7 +811,7 @@ public class AdminPatentApiController extends CertifyApiController {
 	@SuppressWarnings("unchecked")
 	@RequestMapping(value = "/exportComposite", method = RequestMethod.GET)
 	public Result exportComposite(@RequestParam(name = "serialNumber", required = false) String serialNumber,
-			String patentNumber, String office, String locationProvince, String unitName,
+			String patentNumber, String office, String locationProvince, String unitName, String uid,
 			@RequestParam(name = "patentCatagory", required = false) String patentCatagory, String patentName,
 			@RequestParam(name = "patentState", required = false) String patentState,
 			@RequestParam(name = "createTime[]", required = false) String[] createTime,
@@ -822,7 +824,7 @@ public class AdminPatentApiController extends CertifyApiController {
 		Integer ps = (!StringUtils.isNumeric(patentState) ? null : Integer.parseInt(patentState));
 		String lp = ("undefined".equals(locationProvince)) ? null : locationProvince;
 		List<PatentManageListBo> composites = (List<PatentManageListBo>) getManagePatentList(sn, patentNumber, office,
-				lp, unitName, pc, patentName, ps, createTime, patentApplicationDate, author, 1, 1000).getList();
+				lp, unitName, pc, patentName, ps, createTime, patentApplicationDate, author, uid, 1, 1000).getList();
 		if (res.getError().isEmpty()) {
 			exportComosites(response, composites);
 		} else {
@@ -898,7 +900,7 @@ public class AdminPatentApiController extends CertifyApiController {
 		List<Admin> list = adminService.selectPatentPrincipal();
 		Map<String, String> map = new TreeMap<String, String>();
 		for (Admin o : list) {
-			map.put(o.getId(), o.getName());
+			map.put(o.getId(), o.getName() + " " + o.getPosition());
 		}
 		res.setData(map);
 		return res;
@@ -1130,10 +1132,10 @@ public class AdminPatentApiController extends CertifyApiController {
 	// 管理端申请专利列表(专利综合管理)
 	private Pagination<PatentManageListBo> getManagePatentList(Integer serialNumber, String patentNumber, String office,
 			String locationProvince, String unitName, Integer patentCatagory, String patentName, Integer patentState,
-			String[] createTime, String[] patentApplicationDate, String author, Integer pNo, Integer pSize)
+			String[] createTime, String[] patentApplicationDate, String author, String uid, Integer pNo, Integer pSize)
 			throws ParseException {
 		return patentInfoService.getManagePatentList(serialNumber, patentNumber, office, locationProvince, unitName,
-				patentCatagory, patentName, patentState, createTime, patentApplicationDate, author, pNo, pSize);
+				patentCatagory, patentName, patentState, createTime, patentApplicationDate, author, uid, pNo, pSize);
 	}
 
 	// 缴费截止日期

+ 77 - 0
src/main/java/com/goafanti/admin/controller/AdminSummaryApiController.java

@@ -0,0 +1,77 @@
+package com.goafanti.admin.controller;
+
+import java.util.Calendar;
+
+import javax.annotation.Resource;
+
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.goafanti.cognizance.service.OrgActivityService;
+import com.goafanti.cognizance.service.OrgIntellectualPropertyService;
+import com.goafanti.common.bo.Result;
+import com.goafanti.common.constant.ErrorConstants;
+import com.goafanti.common.controller.CertifyApiController;
+import com.goafanti.common.utils.StringUtils;
+@RestController
+@RequestMapping(value = "/api/admin/summary")
+public class AdminSummaryApiController extends CertifyApiController{
+	
+	private static final Integer year = Calendar.getInstance().get(Calendar.YEAR)-1;
+	@Resource
+	private OrgIntellectualPropertyService	orgIntellectualPropertyService;
+	@Resource
+	private OrgActivityService				orgActivityService;
+	
+	/**
+	 * 高企信息汇总导出--获得知识产权数量
+	 * @param uid
+	 * @return
+	 */
+	@RequestMapping(value = "/intellectualProperty", method = RequestMethod.GET)
+	public Result intellectualProperty(String uid){
+		Result res = new Result();
+		if (StringUtils.isBlank(uid)) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到用户", "用户ID"));
+			return res;
+		}
+		
+		res.setData(orgIntellectualPropertyService.selectIntellectualPropertyCount(year, uid));;
+		return res;
+	}
+	
+	/**
+	 * 高企信息汇总导出--知识产权列表
+	 * @param uid
+	 * @return
+	 */
+	@RequestMapping(value = "/intellectualPropertyList", method = RequestMethod.GET)
+	public Result intellectualPropertyList(String uid){
+		Result res = new Result();
+		if (StringUtils.isBlank(uid)) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到用户", "用户ID"));
+			return res;
+		}
+		res.setData(orgIntellectualPropertyService.selectIntellectualPropertyList(year, uid));
+		return res;
+	}
+	
+	/**
+	 * 高企信息汇总导出--企业研发活动列表
+	 * @param uid
+	 * @return
+	 */
+	@RequestMapping(value = "/activity", method = RequestMethod.GET)
+	public Result activity(String uid){
+		Result res = new Result();
+		if (StringUtils.isBlank(uid)) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到用户", "用户ID"));
+			return res;
+		}
+		res.setData(orgActivityService.selectAcivityList(year, uid));
+		return res;
+	}
+	
+
+}

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

@@ -93,7 +93,7 @@ public class AdminTechProjectApiController extends CertifyApiController {
 		List<Admin> list = adminService.selectTechprojectPrincipal();
 		Map<String, String> map = new TreeMap<String, String>();
 		for (Admin o : list) {
-			map.put(o.getId(), o.getName());
+			map.put(o.getId(), o.getName()+ " " + o.getPosition());
 		}
 		res.setData(map);
 		return res;

+ 239 - 0
src/main/java/com/goafanti/admin/controller/AdminUserCertifyApiController.java

@@ -0,0 +1,239 @@
+package com.goafanti.admin.controller;
+
+import java.text.ParseException;
+import java.util.Calendar;
+import java.util.UUID;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import javax.validation.Valid;
+
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.BeanUtils;
+import org.springframework.validation.BindingResult;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.goafanti.common.bo.Result;
+import com.goafanti.common.constant.AFTConstants;
+import com.goafanti.common.constant.ErrorConstants;
+import com.goafanti.common.controller.CertifyApiController;
+import com.goafanti.common.enums.AttachmentType;
+import com.goafanti.common.enums.IdentityAuditStatus;
+import com.goafanti.common.enums.IdentityProcess;
+import com.goafanti.common.enums.OrganizationIdentityFields;
+import com.goafanti.common.enums.UserIdentityFields;
+import com.goafanti.common.model.OrganizationIdentity;
+import com.goafanti.common.model.UserIdentity;
+import com.goafanti.common.utils.DateUtils;
+import com.goafanti.user.bo.InputOrganizationIdentity;
+import com.goafanti.user.bo.InputUserIdentity;
+import com.goafanti.user.service.OrganizationIdentityService;
+import com.goafanti.user.service.UserIdentityService;
+
+@RestController
+@RequestMapping(value = "/api/admin/userCertify")
+public class AdminUserCertifyApiController extends CertifyApiController {
+	@Resource
+	private UserIdentityService			userIdentityService;
+
+	@Resource
+	private OrganizationIdentityService	organizationIdentityService;
+
+	/**
+	 * 上传认证资料(营业执照图片、组织机构代码证图片、上年度纳税申报表)
+	 * 
+	 * @param req
+	 * @param sign
+	 * @param uid
+	 * @return
+	 */
+	@RequestMapping(value = "/upload", method = RequestMethod.POST)
+	public Result uploadCertify(HttpServletRequest req, String sign, String uid) {
+		Result res = new Result();
+		if (StringUtils.isBlank(uid)) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到用户", "用户"));
+			return res;
+		}
+
+		AttachmentType attachmentType = AttachmentType.getField(sign);
+		if (attachmentType == AttachmentType.ORGCODE || attachmentType == AttachmentType.LICENCE) {
+			res.setData(handleFiles(res, "/identity/", true, req, sign, uid));
+		} else if (attachmentType == AttachmentType.RATEPAY) {
+			sign = sign + "_" + (Calendar.getInstance().get(Calendar.YEAR) - 1);
+			res.setData(handleFiles(res, "/cognizance/", true, req, sign, uid));
+		} else {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "附件标示"));
+		}
+		return res;
+	}
+
+	/**
+	 * 审核员--个人用户详情
+	 * 
+	 * @param uid
+	 * @return
+	 */
+	@RequestMapping(value = "/userDetail", method = RequestMethod.GET)
+	public Result userDetail(String uid) {
+		Result res = new Result();
+		if (StringUtils.isBlank(uid)) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到用户", "用户"));
+			return res;
+		}
+		res.setData(userIdentityService.selectAuditorUserIdentityByUserId(uid));
+		return res;
+	}
+
+	/**
+	 * 审核员审核个人用户信息
+	 * 
+	 * @param userIdentity
+	 * @param bindingResult
+	 * @param paymentDateFormattedDate
+	 * @return
+	 */
+	@RequestMapping(value = "/updateUserDetail", method = RequestMethod.POST)
+	public Result disposeUser(@Valid InputUserIdentity userIdentity, BindingResult bindingResult,
+			String paymentDateFormattedDate, String aid, String mid) {
+		Result res = new Result();
+		if (bindingResult.hasErrors()) {
+			res.getError().add(buildErrorByMsg(bindingResult.getFieldError().getDefaultMessage(),
+					UserIdentityFields.getFieldDesc(bindingResult.getFieldError().getField())));
+			return res;
+		}
+
+		if (null == userIdentity.getUid()) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到用户", "用户"));
+			return res;
+		}
+
+		if (!StringUtils.isBlank(paymentDateFormattedDate)) {
+			try {
+				userIdentity.setPaymentDate(DateUtils.parseDate(paymentDateFormattedDate, AFTConstants.YYYYMMDD));
+			} catch (ParseException e) {
+			}
+		}
+
+		UserIdentity ui = new UserIdentity();
+		BeanUtils.copyProperties(userIdentity, ui);
+		if (StringUtils.isBlank(ui.getId())) {
+			ui.setId(UUID.randomUUID().toString());
+			ui.setAuditStatus(null == ui.getAuditStatus() ? 0 : ui.getAuditStatus());
+			if (IdentityAuditStatus.UNCOMMITTED.getCode() == ui.getAuditStatus()) {
+				ui.setProcess(IdentityProcess.UNCOMMITTED.getCode());
+			} else if (IdentityAuditStatus.COMMITTED.getCode() == ui.getAuditStatus()
+					|| IdentityAuditStatus.UNPAID.getCode() == ui.getAuditStatus()) {
+				ui.setProcess(IdentityProcess.COMMITTED.getCode());
+			} else if (IdentityAuditStatus.PAID.getCode() == ui.getAuditStatus()) {
+				ui.setProcess(IdentityProcess.FILLIN.getCode());
+			} else if (IdentityAuditStatus.NOTPASSED.getCode() == ui.getAuditStatus()
+					|| IdentityAuditStatus.PASSED.getCode() == ui.getAuditStatus()) {
+				ui.setProcess(IdentityProcess.RESULTS.getCode());
+			}
+			res.setData(userIdentityService.insertByAdmin(ui, aid, mid));
+		} else {
+			ui.setAuditStatus(null == ui.getAuditStatus() ? 0 : ui.getAuditStatus());
+			if (IdentityAuditStatus.UNCOMMITTED.getCode() == ui.getAuditStatus()) {
+				ui.setProcess(IdentityProcess.UNCOMMITTED.getCode());
+			} else if (IdentityAuditStatus.COMMITTED.getCode() == ui.getAuditStatus()
+					|| IdentityAuditStatus.UNPAID.getCode() == ui.getAuditStatus()) {
+				ui.setProcess(IdentityProcess.COMMITTED.getCode());
+			} else if (IdentityAuditStatus.PAID.getCode() == ui.getAuditStatus()) {
+				ui.setProcess(IdentityProcess.FILLIN.getCode());
+			} else if (IdentityAuditStatus.NOTPASSED.getCode() == ui.getAuditStatus()
+					|| IdentityAuditStatus.PASSED.getCode() == ui.getAuditStatus()) {
+				ui.setProcess(IdentityProcess.RESULTS.getCode());
+			}
+			res.setData(userIdentityService.updateUserDetail(ui, aid, mid));
+		}
+		return res;
+	}
+
+	/**
+	 * 审核员---团体用户详情
+	 * 
+	 * @param uid
+	 * @return
+	 */
+	@RequestMapping(value = "/orgDetail", method = RequestMethod.GET)
+	public Result orgDetail(String uid) {
+		Result res = new Result();
+		if (StringUtils.isBlank(uid)) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到用户", "用户"));
+			return res;
+		}
+		res.setData(organizationIdentityService.selectAuditorOrgIdentityDetailByUserId(uid));
+		return res;
+	}
+
+	/**
+	 * 审核员审核团体用户信息
+	 * 
+	 * @param orgIdentity
+	 * @param bindingResult
+	 * @param paymentDateFormattedDate
+	 * @return
+	 */
+	@RequestMapping(value = "/updateOrgDetail", method = RequestMethod.POST)
+	public Result diposeOrg(@Valid InputOrganizationIdentity orgIdentity, BindingResult bindingResult,
+			String paymentDateFormattedDate, String aid, String mid) {
+		Result res = new Result();
+
+		if (bindingResult.hasErrors()) {
+			res.getError().add(buildErrorByMsg(bindingResult.getFieldError().getDefaultMessage(),
+					OrganizationIdentityFields.getFieldDesc(bindingResult.getFieldError().getField())));
+			return res;
+		}
+
+		if (null == orgIdentity.getUid()) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到用户", "用户"));
+			return res;
+		}
+		if (!StringUtils.isBlank(paymentDateFormattedDate)) {
+			try {
+				orgIdentity.setPaymentDate(DateUtils.parseDate(paymentDateFormattedDate, AFTConstants.YYYYMMDD));
+			} catch (ParseException e) {
+			}
+		}
+
+		OrganizationIdentity oi = new OrganizationIdentity();
+		BeanUtils.copyProperties(orgIdentity, oi);
+
+		if (StringUtils.isBlank(oi.getId())) {
+			oi.setId(UUID.randomUUID().toString());
+			oi.setIdentityType(null == oi.getIdentityType() ? 0 : oi.getIdentityType());
+			oi.setAuditStatus(null == oi.getAuditStatus() ? 0 : oi.getAuditStatus());
+			if (IdentityAuditStatus.UNCOMMITTED.getCode() == oi.getAuditStatus()) {
+				oi.setProcess(IdentityProcess.UNCOMMITTED.getCode());
+			} else if (IdentityAuditStatus.COMMITTED.getCode() == oi.getAuditStatus()
+					|| IdentityAuditStatus.UNPAID.getCode() == oi.getAuditStatus()) {
+				oi.setProcess(IdentityProcess.COMMITTED.getCode());
+			} else if (IdentityAuditStatus.PAID.getCode() == oi.getAuditStatus()) {
+				oi.setProcess(IdentityProcess.FILLIN.getCode());
+			} else if (IdentityAuditStatus.NOTPASSED.getCode() == oi.getAuditStatus()
+					|| IdentityAuditStatus.PASSED.getCode() == oi.getAuditStatus()) {
+				oi.setProcess(IdentityProcess.RESULTS.getCode());
+			}
+			oi.setListed(null == oi.getListed() ? 0 : oi.getListed());
+			oi.setListedType(null == oi.getListedType() ? 0 : oi.getListedType());
+			res.setData(organizationIdentityService.insertByAdmin(oi, aid, mid));
+		} else {
+			oi.setAuditStatus(null == oi.getAuditStatus() ? 0 : oi.getAuditStatus());
+			if (IdentityAuditStatus.UNCOMMITTED.getCode() == oi.getAuditStatus()) {
+				oi.setProcess(IdentityProcess.UNCOMMITTED.getCode());
+			} else if (IdentityAuditStatus.COMMITTED.getCode() == oi.getAuditStatus()
+					|| IdentityAuditStatus.UNPAID.getCode() == oi.getAuditStatus()) {
+				oi.setProcess(IdentityProcess.COMMITTED.getCode());
+			} else if (IdentityAuditStatus.PAID.getCode() == oi.getAuditStatus()) {
+				oi.setProcess(IdentityProcess.FILLIN.getCode());
+			} else if (IdentityAuditStatus.NOTPASSED.getCode() == oi.getAuditStatus()
+					|| IdentityAuditStatus.PASSED.getCode() == oi.getAuditStatus()) {
+				oi.setProcess(IdentityProcess.RESULTS.getCode());
+			}
+			res.setData(organizationIdentityService.updateOrgDetail(oi, aid, mid));
+		}
+		return res;
+	}
+}

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

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

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

@@ -48,11 +48,7 @@ public class AdminServiceImpl extends BaseMybatisDao<AdminMapper> implements Adm
 		Map<String, Object> params = new HashMap<>();
 
 		if (!TokenManager.hasRole(AFTConstants.SUPERADMIN)) {
-			return null;
-		}
-
-		if (StringUtils.isNotBlank(province)) {
-			params.put("province", province);
+			params.put("province", TokenManager.getProvince());
 		}
 
 		if (StringUtils.isNotBlank(mobile)) {
@@ -163,4 +159,9 @@ public class AdminServiceImpl extends BaseMybatisDao<AdminMapper> implements Adm
 		return adminMapper.selectRoleByPrimaryKey(uid);
 	}
 
+	@Override
+	public List<String> listAuditor() {
+		return userRoleMapper.listAuditor();
+	}
+
 }

+ 94 - 0
src/main/java/com/goafanti/cognizance/bo/BusinessCountBo.java

@@ -0,0 +1,94 @@
+package com.goafanti.cognizance.bo;
+
+public class BusinessCountBo {
+	private String uid;
+	
+	/**
+	 * 专利下证数
+	 */
+	private Integer patentDone;
+
+	/**
+	 * 专利未证数
+	 */
+	private Integer patentUndone;
+	
+	/**
+	 * 软著下证数
+	 */
+	private Integer copyrightDone;
+	
+	/**
+	 * 软著未下证数
+	 */
+	private Integer copyrightUndone;
+	
+	/**
+	 * 科技项目申报下证数
+	 */
+	private Integer techProjectDone;
+	
+	/**
+	 * 科技项目申报未下证数
+	 */
+	private Integer techProjectUndone;
+
+	public String getUid() {
+		return uid;
+	}
+
+	public void setUid(String uid) {
+		this.uid = uid;
+	}
+
+	public Integer getPatentDone() {
+		return patentDone;
+	}
+
+	public void setPatentDone(Integer patentDone) {
+		this.patentDone = patentDone;
+	}
+
+	public Integer getPatentUndone() {
+		return patentUndone;
+	}
+
+	public void setPatentUndone(Integer patentUndone) {
+		this.patentUndone = patentUndone;
+	}
+
+	public Integer getCopyrightDone() {
+		return copyrightDone;
+	}
+
+	public void setCopyrightDone(Integer copyrightDone) {
+		this.copyrightDone = copyrightDone;
+	}
+
+	public Integer getCopyrightUndone() {
+		return copyrightUndone;
+	}
+
+	public void setCopyrightUndone(Integer copyrightUndone) {
+		this.copyrightUndone = copyrightUndone;
+	}
+
+	public Integer getTechProjectDone() {
+		return techProjectDone;
+	}
+
+	public void setTechProjectDone(Integer techProjectDone) {
+		this.techProjectDone = techProjectDone;
+	}
+
+	public Integer getTechProjectUndone() {
+		return techProjectUndone;
+	}
+
+	public void setTechProjectUndone(Integer techProjectUndone) {
+		this.techProjectUndone = techProjectUndone;
+	}
+	
+	
+
+}

+ 12 - 0
src/main/java/com/goafanti/cognizance/bo/CultivationListBo.java

@@ -29,6 +29,8 @@ public class CultivationListBo {
 	private String secondContacts;
 	
 	private String thirdContacts;
+	
+	private String techPrincipal;
 
 	public String getUid() {
 		return uid;
@@ -111,6 +113,16 @@ public class CultivationListBo {
 		this.thirdContacts = thirdContacts;
 	}
 	
+	
+	
+	public String getTechPrincipal() {
+		return techPrincipal;
+	}
+
+	public void setTechPrincipal(String techPrincipal) {
+		this.techPrincipal = techPrincipal;
+	}
+
 	//高企认定时间
 	public String getIssuingDateFormattedDate(){
 		if (this.issuingDate == null) {

+ 1 - 1
src/main/java/com/goafanti/cognizance/bo/InputApplyCognizance.java

@@ -15,7 +15,7 @@ public class InputApplyCognizance {
 	@Min(value = 1, message = "{" + ErrorConstants.PARAM_ERROR + "}")
 	private Integer contacts;
 	
-	@Size(min = 0, max = 500, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
+	@Size(min = 0, max = 128, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
 	private String comment;
 	
 	@Size(min = 0, max = 36, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")

+ 2 - 2
src/main/java/com/goafanti/cognizance/controller/CognizanceApiController.java

@@ -1647,7 +1647,7 @@ public class CognizanceApiController extends CertifyApiController {
 	 */
 
 	@RequestMapping(value = "/intellectualList", method = RequestMethod.GET)
-	public Result intellectualList(String pageNo, String pageSize) {
+	public Result intellectualList(String pageNo, String pageSize, String startDate, String endDate) {
 		Result res = new Result();
 
 		if (!checkUserLogin(res)) {
@@ -1662,7 +1662,7 @@ public class CognizanceApiController extends CertifyApiController {
 		if (StringUtils.isNumeric(pageNo)) {
 			pNo = Integer.parseInt(pageNo);
 		}
-		res.setData(orgIntellectualPropertyService.listIntellectual(pNo, pSize, TokenManager.getUserId()));
+		res.setData(orgIntellectualPropertyService.listIntellectual(pNo, pSize, TokenManager.getUserId(), startDate, endDate));
 		return res;
 	}
 

+ 2 - 0
src/main/java/com/goafanti/cognizance/service/OrgActivityService.java

@@ -26,4 +26,6 @@ public interface OrgActivityService {
 
 	OrgActivity selectDetailByIdAndYear(String id, int year);
 
+	List<OrgActivity> selectAcivityList(Integer year, String uid);
+
 }

+ 3 - 0
src/main/java/com/goafanti/cognizance/service/OrgCognizanceService.java

@@ -4,6 +4,7 @@ import java.math.BigDecimal;
 import java.util.Date;
 import java.util.List;
 
+import com.goafanti.cognizance.bo.BusinessCountBo;
 import com.goafanti.cognizance.bo.CognizanceBo;
 import com.goafanti.cognizance.bo.CognizanceCatagoryBo;
 import com.goafanti.cognizance.bo.CognizanceDetailBo;
@@ -50,5 +51,7 @@ public interface OrgCognizanceService {
 
 	LatelyCogRecord selectLatelyRecord(String uid);
 
+	BusinessCountBo countBusiness(String uid);
+
 
 }

+ 6 - 1
src/main/java/com/goafanti/cognizance/service/OrgIntellectualPropertyService.java

@@ -2,6 +2,7 @@ package com.goafanti.cognizance.service;
 
 import java.util.List;
 
+import com.goafanti.cognizance.bo.AnnualReportPropertyRightBo;
 import com.goafanti.cognizance.bo.OrgIntellectualPropertyDetailBo;
 import com.goafanti.common.model.OrgIntellectualProperty;
 import com.goafanti.core.mybatis.page.Pagination;
@@ -10,7 +11,7 @@ public interface OrgIntellectualPropertyService {
 
 	OrgIntellectualProperty insert(OrgIntellectualProperty orgIntellectualProperty);
 
-	Pagination<OrgIntellectualProperty> listIntellectual(Integer pNo, Integer pSize, String userId);
+	Pagination<OrgIntellectualProperty> listIntellectual(Integer pNo, Integer pSize, String userId, String startDate, String endDate );
 
 	int delete(String id);
 
@@ -26,4 +27,8 @@ public interface OrgIntellectualPropertyService {
 
 	OrgIntellectualPropertyDetailBo selectCopyrightTypeDetail(String id);
 
+	AnnualReportPropertyRightBo selectIntellectualPropertyCount(Integer year, String uid);
+
+	List<OrgIntellectualProperty> selectIntellectualPropertyList(Integer year, String uid);
+
 }

+ 5 - 0
src/main/java/com/goafanti/cognizance/service/impl/OrgActivityServiceImpl.java

@@ -134,4 +134,9 @@ public class OrgActivityServiceImpl extends BaseMybatisDao<OrgActivityMapper> im
 		}
 		return oa;
 	}
+
+	@Override
+	public List<OrgActivity> selectAcivityList(Integer year, String uid) {
+		return orgActivityMapper.selectAcivityList(year, uid);
+	}
 }

+ 33 - 13
src/main/java/com/goafanti/cognizance/service/impl/OrgCognizanceServiceImpl.java

@@ -12,6 +12,7 @@ import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import com.goafanti.cognizance.bo.BusinessCountBo;
 import com.goafanti.cognizance.bo.CognizanceBo;
 import com.goafanti.cognizance.bo.CognizanceCatagoryBo;
 import com.goafanti.cognizance.bo.CognizanceDetailBo;
@@ -22,11 +23,14 @@ import com.goafanti.cognizance.bo.CultivationListBo;
 import com.goafanti.cognizance.bo.LatelyCogRecord;
 import com.goafanti.cognizance.service.OrgCognizanceService;
 import com.goafanti.common.constant.AFTConstants;
+import com.goafanti.common.dao.CopyrightInfoMapper;
 import com.goafanti.common.dao.NoticeMapper;
 import com.goafanti.common.dao.OrgCognizanceLogMapper;
 import com.goafanti.common.dao.OrgCognizanceMapper;
 import com.goafanti.common.dao.OrgCognizanceProportionMapper;
 import com.goafanti.common.dao.OrganizationIdentityMapper;
+import com.goafanti.common.dao.PatentInfoMapper;
+import com.goafanti.common.dao.TechProjectMapper;
 import com.goafanti.common.dao.UserMapper;
 import com.goafanti.common.enums.CopyrightStatus;
 import com.goafanti.common.enums.NoticeReadStatus;
@@ -58,6 +62,12 @@ public class OrgCognizanceServiceImpl extends BaseMybatisDao<OrgCognizanceMapper
 	private OrgCognizanceProportionMapper	orgCognizanceProportionMapper;
 	@Autowired
 	private UserMapper						userMapper;
+	@Autowired
+	private CopyrightInfoMapper				copyrightInfoMapper;
+	@Autowired
+	private PatentInfoMapper				patentInfoMapper;
+	@Autowired
+	private TechProjectMapper				techProjectMapper;
 
 	@Override
 	public OrgCognizance insert(OrgCognizance c) {
@@ -204,21 +214,20 @@ public class OrgCognizanceServiceImpl extends BaseMybatisDao<OrgCognizanceMapper
 	public void updateCognizance(OrgCognizance cog, OrgCognizanceLog log, Date recordTime, String aid) {
 		if (null != log.getState() && null != recordTime && null != cog.getUid() && null != log.getPrincipal()) {
 			log.setRecordTime(recordTime);
-
+			cog.setTechPrincipal(log.getPrincipal());
+			OrganizationIdentity o = organizationIdentityMapper.selectOrgIdentityByUserId(cog.getUid());
+			o.setTechPrincipal(null == cog.getTechPrincipal() ? "" : cog.getTechPrincipal());
 			if (OrgCognizanceStatus.getStatus(cog.getState()) == OrgCognizanceStatus.DELIVERD) {
 				cog.setCreateTime(recordTime);
 			} else if (OrgCognizanceStatus.getStatus(cog.getState()) == OrgCognizanceStatus.ACCEPT) {
 				cog.setAcceptDate(recordTime);
 			} else if (OrgCognizanceStatus.getStatus(cog.getState()) == OrgCognizanceStatus.ISSUING) {
 				cog.setIssuingDate(recordTime);
-				OrganizationIdentity o = organizationIdentityMapper.selectOrgIdentityByUserId(cog.getUid());
 				o.setCertificateNumber(null == cog.getCertificateNumber() ? "" : cog.getCertificateNumber());
 				o.setIssuingDate(recordTime);
-				o.setConsultant(null == cog.getConsultant() ? "" : cog.getConsultant());
 				o.setCogContacts(null == cog.getContacts() ? null : cog.getContacts());
-				organizationIdentityMapper.updateByPrimaryKeySelective(o);
 			}
-
+			organizationIdentityMapper.updateByPrimaryKeySelective(o);
 			if (OrgCognizanceStatus.getStatus(cog.getState()) == OrgCognizanceStatus.CIRCULATION) {
 				cog.setState(OrgCognizanceStatus.DELIVERD.getCode());
 			}
@@ -307,8 +316,6 @@ public class OrgCognizanceServiceImpl extends BaseMybatisDao<OrgCognizanceMapper
 				pageNo, pageSize);
 	}
 
-	
-
 	@Override
 	public OrgCognizance selectByPrimaryKey(String id) {
 		return orgCognizanceMapper.selectByPrimaryKey(id);
@@ -319,6 +326,19 @@ public class OrgCognizanceServiceImpl extends BaseMybatisDao<OrgCognizanceMapper
 		return orgCognizanceMapper.selectLatelyRecord(uid);
 	}
 
+	@Override
+	public BusinessCountBo countBusiness(String uid) {
+		BusinessCountBo bcb = new BusinessCountBo();
+		bcb.setUid(uid);
+		bcb.setCopyrightDone(copyrightInfoMapper.countCopyrightDone(uid));
+		bcb.setCopyrightUndone(copyrightInfoMapper.countCopyrightDone(uid));
+		bcb.setPatentDone(patentInfoMapper.countPatentDone(uid));
+		bcb.setPatentUndone(patentInfoMapper.countPatentUndone(uid));
+		bcb.setTechProjectDone(techProjectMapper.countTechProjectDone(uid));
+		bcb.setTechProjectUndone(techProjectMapper.countTechProjectUndone(uid));
+		return bcb;
+	}
+
 	private OrgCognizanceProportion disposeProportion(OrgCognizanceProportion o) {
 		o.setAbility(ProportionStatus.UNFINISHED.getCode());
 		o.setAchievement(ProportionStatus.UNFINISHED.getCode());
@@ -334,7 +354,7 @@ public class OrgCognizanceServiceImpl extends BaseMybatisDao<OrgCognizanceMapper
 		o.setTechProject(ProportionStatus.UNFINISHED.getCode());
 		return o;
 	}
-	
+
 	private void createNotice(OrgCognizance cog, OrgCognizanceLog l) {
 		OrgCognizance info = orgCognizanceMapper.selectByPrimaryKey(cog.getId());
 
@@ -344,17 +364,17 @@ public class OrgCognizanceServiceImpl extends BaseMybatisDao<OrgCognizanceMapper
 		n.setId(UUID.randomUUID().toString());
 		n.setCreateTime(now.getTime());
 		n.setReaded(NoticeReadStatus.UNREAD.getCode());
-		
+
 		User u = userMapper.selectByPrimaryKey(cog.getUid());
-		if (null != u){
+		if (null != u) {
 			n.setPid(u.getAid());
 		}
-		
+
 		n.setUid(cog.getUid());
 		n.setRid(cog.getId());
-		
+
 		n.setYear(cog.getYear());
-		
+
 		n.setAid(l.getPrincipal());
 		n.setContent("编号" + info.getSerialNumber() + "  " + OrgCognizanceStatus.getStatus(l.getState()).getDesc());
 		n.setNoticeType(NoticeStatus.COGNIZANCE.getCode());

+ 57 - 2
src/main/java/com/goafanti/cognizance/service/impl/OrgIntellectualPropertyServiceImpl.java

@@ -1,5 +1,7 @@
 package com.goafanti.cognizance.service.impl;
 
+import java.text.ParseException;
+import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -8,10 +10,14 @@ import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import com.goafanti.cognizance.bo.AnnualReportPropertyRightBo;
 import com.goafanti.cognizance.bo.OrgIntellectualPropertyDetailBo;
 import com.goafanti.cognizance.service.OrgIntellectualPropertyService;
+import com.goafanti.common.constant.AFTConstants;
+import com.goafanti.common.dao.OrgAnnualReportMapper;
 import com.goafanti.common.dao.OrgIntellectualPropertyMapper;
 import com.goafanti.common.model.OrgIntellectualProperty;
+import com.goafanti.common.utils.DateUtils;
 import com.goafanti.core.mybatis.BaseMybatisDao;
 import com.goafanti.core.mybatis.page.Pagination;
 
@@ -20,6 +26,8 @@ public class OrgIntellectualPropertyServiceImpl extends BaseMybatisDao<OrgIntell
 		implements OrgIntellectualPropertyService {
 	@Autowired
 	private OrgIntellectualPropertyMapper orgIntellectualPropertyMapper;
+	@Autowired
+	private OrgAnnualReportMapper orgAnnualReportMapper;
 
 	@Override
 	public OrgIntellectualProperty insert(OrgIntellectualProperty orgIntellectualProperty) {
@@ -29,12 +37,36 @@ public class OrgIntellectualPropertyServiceImpl extends BaseMybatisDao<OrgIntell
 
 	@SuppressWarnings("unchecked")
 	@Override
-	public Pagination<OrgIntellectualProperty> listIntellectual(Integer pageNo, Integer pageSize, String uid) {
+	public Pagination<OrgIntellectualProperty> listIntellectual(Integer pageNo, Integer pageSize, String uid,
+			String startDate, String endDate) {
 		Map<String, Object> params = new HashMap<>();
-		
+		Date sDate = null;
+		Date eDate = null;
 		if (!StringUtils.isBlank(uid)){
 			params.put("uid", uid);
 		}
+		
+		if (!StringUtils.isBlank(startDate)){
+			try {
+				sDate = DateUtils.parseDate(startDate, AFTConstants.YYYYMMDD);
+			} catch (ParseException e) {
+			}
+		}
+		
+		if (!StringUtils.isBlank(endDate)){
+			try {
+				eDate = DateUtils.parseDate(endDate, AFTConstants.YYYYMMDD);
+			} catch (ParseException e) {
+			}
+		}
+		
+		if (null != sDate){
+			params.put("sDate", sDate);
+		}
+		
+		if (null != eDate){
+			params.put("eDate", eDate);
+		}
 
 		if (pageNo == null || pageNo < 0) {
 			pageNo = 1;
@@ -82,4 +114,27 @@ public class OrgIntellectualPropertyServiceImpl extends BaseMybatisDao<OrgIntell
 		return orgIntellectualPropertyMapper.selectCopyrightTypeDetail(id);
 	}
 
+	@Override
+	public AnnualReportPropertyRightBo selectIntellectualPropertyCount(Integer year, String uid) {
+		AnnualReportPropertyRightBo p = orgAnnualReportMapper.selectAnnualReportPropertyRightBoByYearAndUid(year, uid);
+		if (null != p) {
+			p.setInventionPatent(null == p.getInventionPatent() ? 0 : p.getInventionPatent());
+			p.setDefensePatent(null == p.getDefensePatent() ? 0 : p.getDefensePatent());
+			p.setNationalCrop(null == p.getNationalCrop() ? 0 : p.getNationalCrop());
+			p.setNewPlantCariety(null == p.getNewPlantCariety() ? 0 : p.getNewPlantCariety());
+			p.setNationalDrug(null == p.getNationalDrug() ? 0 : p.getNationalDrug());
+			p.setChineseMedicine(null == p.getChineseMedicine() ? 0 : p.getChineseMedicine());
+			p.setUtilityPatent(null == p.getUtilityPatent() ? 0 : p.getUtilityPatent());
+			p.setCircuitDesign(null == p.getCircuitDesign() ? 0 : p.getCircuitDesign());
+			p.setExteriorPatent(null == p.getExteriorPatent() ? 0 : p.getExteriorPatent());
+			p.setSoftwareWorks(null == p.getSoftwareWorks() ? 0 : p.getSoftwareWorks());
+		}
+		return p;
+	}
+
+	@Override
+	public List<OrgIntellectualProperty> selectIntellectualPropertyList(Integer year, String uid) {
+		return orgIntellectualPropertyMapper.selectIntellectualPropertyList(year, uid);
+	}
+
 }

+ 2 - 1
src/main/java/com/goafanti/common/constant/AFTConstants.java

@@ -7,6 +7,8 @@ public class AFTConstants {
 
 	public static final String	SUPERADMIN		= "999999";
 
+	public static final String	AUDITORADMIN	= "9999";
+
 	public static final String	PATENTINFO		= "专利申请管理";
 
 	public static final String	COGNIZANCE		= "高企认定管理";
@@ -14,6 +16,5 @@ public class AFTConstants {
 	public static final String	COPYRIGHT		= "软著申请管理";
 
 	public static final String	TECHPROJECT		= "科技项目申报管理";
-	
 
 }

+ 8 - 4
src/main/java/com/goafanti/common/controller/PreviewController.java

@@ -35,6 +35,7 @@ import com.goafanti.common.model.OrgStandard;
 import com.goafanti.common.model.OrgTechAchievement;
 import com.goafanti.common.model.OrgTechCenterDetail;
 import com.goafanti.common.model.OrgTechProduct;
+import com.goafanti.common.model.OrganizationIdentity;
 import com.goafanti.common.model.PatentInfo;
 import com.goafanti.common.model.TechProject;
 import com.goafanti.common.utils.DateUtils;
@@ -45,6 +46,7 @@ import com.goafanti.copyright.service.CopyrightInfoService;
 import com.goafanti.patent.service.PatentInfoService;
 import com.goafanti.techproject.service.TechProjectService;
 import com.goafanti.user.service.OrgHumanResourceService;
+import com.goafanti.user.service.OrganizationIdentityService;
 import com.goafanti.user.service.UserService;
 
 @Controller
@@ -81,6 +83,8 @@ public class PreviewController extends BaseApiController {
 	private OrgHonorDatumService			OrgHonorDatumService;
 	@Resource
 	private OrgStandardService				orgStandardService;
+	@Resource
+	private OrganizationIdentityService		organizationIdentityService;
 
 	@Value(value = "${aesSecretKey}")
 	private String							secretKey	= null;
@@ -223,7 +227,7 @@ public class PreviewController extends BaseApiController {
 				break;
 			case STANDARD:
 				OrgStandard os = orgStandardService.selectByPrimaryKey(token);
-				if (null == os){
+				if (null == os) {
 					res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "预览"));
 					return res;
 				} else {
@@ -237,10 +241,10 @@ public class PreviewController extends BaseApiController {
 		return res;
 	}
 
-	
 	private void handlePatentPreview(HttpServletResponse response, PatentInfo pi, AttachmentType attachmentType) {
 		if (attachmentType == AttachmentType.PATENT_PRORY_STATEMENT) {
-			downloadFile(response, pi.getPatentProryStatementDownloadFileName(), pi.getPatentProryStatementUrl());
+		OrganizationIdentity oi = organizationIdentityService.selectOrgIdentityByUserId(pi.getUid());
+			downloadFile(response, oi.getPatentProryStatementDownloadFileName(), oi.getPatentProryStatementUrl());
 		} else if (attachmentType == AttachmentType.PATENT_WRITING) {
 			downloadFile(response, pi.getPatentWritingDownloadFileName(), pi.getPatentWritingUrl());
 		} else if (attachmentType == AttachmentType.AUTHORIZATION_NOTICE) {
@@ -332,7 +336,7 @@ public class PreviewController extends BaseApiController {
 			downloadFile(response, ohd.getEnclosureDownloadFileName(), ohd.getEnclosureUrl());
 		}
 	}
-	
+
 	private void handleStandardPreview(HttpServletResponse response, OrgStandard os, AttachmentType attachmentType) {
 		if (attachmentType == AttachmentType.STANDARD) {
 			downloadFile(response, os.getStandardDownloadFileName(), os.getEnclosureUrl());

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

@@ -115,6 +115,11 @@ public class WebpageController extends BaseController {
 		return adminToLogin(request,modelview,"/admin/servicesManage/highTech");
 	}
 	
+	@RequestMapping(value = "/admin/servicesManage/highTechInfo", method = RequestMethod.GET)
+	public ModelAndView adminServicesManageHighTechInfo(HttpServletRequest request, ModelAndView modelview) {
+		return adminToLogin(request,modelview,"/admin/servicesManage/highTechInfo");
+	}
+	
 	@RequestMapping(value = "/admin/servicesManage/copyright", method = RequestMethod.GET)
 	public ModelAndView adminServicesManageCopyright(HttpServletRequest request, ModelAndView modelview) {
 		return adminToLogin(request,modelview,"/admin/servicesManage/copyright");

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

@@ -29,4 +29,6 @@ public interface CopyrightInfoMapper {
 	int deleteByPrimaryKeys(List<String> id);
 
 	List<CopyrightInfo> selectByPrimaryKeys(List<String> asList);
+
+	Integer countCopyrightDone(String uid);
 }

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

@@ -21,4 +21,6 @@ public interface OrgActivityMapper {
 	int batchDeleteByPrimaryKey(List<String> id);
 
 	List<ActivityNumberBo> selectOrgActivityNumberBoByUid(String uid);
+
+	List<OrgActivity> selectAcivityList(Integer year, String uid);
 }

+ 1 - 0
src/main/java/com/goafanti/common/dao/OrgCognizanceMapper.java

@@ -38,4 +38,5 @@ public interface OrgCognizanceMapper {
 	int batchDeleteByPrimaryKey(List<String> id);
 
 	LatelyCogRecord selectLatelyRecord(String uid);
+
 }

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

@@ -25,4 +25,6 @@ public interface OrgIntellectualPropertyMapper {
 	OrgIntellectualPropertyDetailBo selectPatentTypeDetail(String id);
 
 	OrgIntellectualPropertyDetailBo selectCopyrightTypeDetail(String id);
+
+	List<OrgIntellectualProperty> selectIntellectualPropertyList(Integer year, String uid);
 }

+ 6 - 0
src/main/java/com/goafanti/common/dao/OrganizationIdentityMapper.java

@@ -3,8 +3,10 @@ package com.goafanti.common.dao;
 import java.util.List;
 
 import com.goafanti.common.model.OrganizationIdentity;
+import com.goafanti.user.bo.AuditorOrgIdentityDetailBo;
 import com.goafanti.user.bo.OrgBasicInfoBo;
 import com.goafanti.user.bo.OrgIdentityBo;
+import com.goafanti.user.bo.OrgIdentityDetailBo;
 import com.goafanti.user.bo.OrgUnitNames;
 
 public interface OrganizationIdentityMapper {
@@ -27,4 +29,8 @@ public interface OrganizationIdentityMapper {
 	List<OrgUnitNames> selectAllOrgIndentity(String aid);
 
 	OrgBasicInfoBo selectBasicInfo(String uid, int year);
+
+	OrgIdentityDetailBo selectOrgIdentityDetailByUserId(String uid);
+
+	AuditorOrgIdentityDetailBo selectAuditorOrgIdentityDetailByUserId(String uid);
 }

+ 4 - 0
src/main/java/com/goafanti/common/dao/PatentInfoMapper.java

@@ -33,5 +33,9 @@ public interface PatentInfoMapper {
 	PatentInfoDetailBo selectPatentInfoDetail(String id);
 
 	List<PatentInfo> selectByPrimaryKeys(List<String> id);
+
+	Integer countPatentDone(String uid);
+
+	Integer countPatentUndone(String uid);
 	
 }

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

@@ -26,4 +26,6 @@ public interface RoleMapper {
 	int insertBatch(List<Role> records);
 
 	int deleteByPrimaryKeys(List<String> records);
+
+	List<RolePermissionBo> findRolePermissionsExceptAreaManager();
 }

+ 4 - 0
src/main/java/com/goafanti/common/dao/TechProjectMapper.java

@@ -21,4 +21,8 @@ public interface TechProjectMapper {
 	TechProjectDetailBo selectProjectDetail(String pid);
 
 	int batchDeleteByPrimaryKey(List<String> id);
+
+	Integer countTechProjectDone(String uid);
+
+	Integer countTechProjectUndone(String uid);
 }

+ 3 - 0
src/main/java/com/goafanti/common/dao/UserIdentityMapper.java

@@ -1,6 +1,7 @@
 package com.goafanti.common.dao;
 
 import com.goafanti.common.model.UserIdentity;
+import com.goafanti.user.bo.AuditorUserIdentityDetailBo;
 import com.goafanti.user.bo.UserIdentityBo;
 
 public interface UserIdentityMapper {
@@ -19,4 +20,6 @@ public interface UserIdentityMapper {
 	UserIdentity selectUserIdentityByUserId(String uid);
 
 	UserIdentityBo selectUserIdentityBoByUserId(String uid);
+
+	AuditorUserIdentityDetailBo selectAuditorUserIdentityByUserId(String uid);
 }

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

@@ -21,4 +21,6 @@ public interface UserRoleMapper {
 	int deleteByUserId(String id);
 
 	int insertBatch(Map<String, Object> params);
+
+	List<String> listAuditor();
 }

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

@@ -12,7 +12,7 @@ public enum AttachmentType {
 	PROPERTY_RIGHT("property_right", "知识产权证书"), ACHIEVEMENT("achievement", "科技成果附件"), RATEPAY("ratepay", "企业纳税申报表"),
 	FINANCE("finance", "企业财务报表"), ROSTER("roster", "企业花名册"), SOCIAL_SECURITY("social_security", "企业社保情况表"), 
 	HONOR("honor", "荣誉及其他证明材料"), LAST_YEAR_RATEPAY("last_year_ratepay", "上年度纳税申报表"), TECH_PROJECT("tech_project", "科技项目申报材料"),
-	STANDARD("standard", "标准制定附件"), MANUSCRIPT("manuscript", "知识产权稿件");
+	STANDARD("standard", "标准制定附件"), MANUSCRIPT("manuscript", "知识产权稿件"), ORGCODE("orgcode", "组织结构代码证"), LICENCE("licence", "营业执照");
 
 	private AttachmentType(String code, String desc) {
 		this.code = code;

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

@@ -10,6 +10,7 @@ public enum NoticeStatus {
 	COGNIZANCE(2, "高企认定管理"),
 	COPYRIGHT(3, "软著申请管理"),
 	TECHPROJECT(4, "科技项目申报管理"),
+	CERTIFY(5, "用户认证审核"),
 	OTHER(5, "其他");
 
 	private NoticeStatus(Integer code, String desc) {

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

@@ -10,9 +10,10 @@
     <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
     <result column="number" property="number" jdbcType="INTEGER" />
     <result column="province" property="province" jdbcType="VARCHAR" />
+    <result column="position" property="position" jdbcType="VARCHAR" />
   </resultMap>
   <sql id="Base_Column_List" >
-    id, mobile, name, password, email, create_time, number, province
+    id, mobile, name, password, email, create_time, number, province, position
   </sql>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
     select 
@@ -27,10 +28,11 @@
   <insert id="insert" parameterType="com.goafanti.common.model.Admin" >
     insert into admin (id, mobile, name, 
       password, email, create_time, 
-      number, province)
+      number, province, position)
     values (#{id,jdbcType=VARCHAR}, #{mobile,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, 
       #{password,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, 
-      #{number,jdbcType=INTEGER}, #{province,jdbcType=VARCHAR})
+      #{number,jdbcType=INTEGER}, #{province,jdbcType=VARCHAR}, #{position,jdbcType=VARCHAR}
+      )
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.Admin" >
     insert into admin
@@ -59,6 +61,9 @@
        <if test="province != null" >
         province,
       </if>
+      <if test="position != null" >
+        position,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides="," >
       <if test="id != null" >
@@ -85,6 +90,9 @@
       <if test="province != null" >
         #{province,jdbcType=VARCHAR},
       </if>
+      <if test="position != null" >
+        #{position,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.Admin" >
@@ -111,6 +119,9 @@
        <if test="province != null" >
         province = #{province,jdbcType=VARCHAR},
       </if>
+      <if test="position != null" >
+        position = #{position,jdbcType=VARCHAR},
+      </if>
     </set>
     where id = #{id,jdbcType=VARCHAR}
   </update>
@@ -122,7 +133,8 @@
       email = #{email,jdbcType=VARCHAR},
       create_time = #{createTime,jdbcType=TIMESTAMP},
       number = #{number,jdbcType=INTEGER},
-      province = #{province,jdbcType=VARCHAR}
+      province = #{province,jdbcType=VARCHAR},
+      position = #{position,jdbcType=VARCHAR}
     where id = #{id,jdbcType=VARCHAR}
   </update>
   

+ 12 - 0
src/main/java/com/goafanti/common/mapper/CopyrightInfoMapper.xml

@@ -416,4 +416,16 @@
 		</foreach>
   </select>
   
+  <select id="countCopyrightDone" parameterType="java.lang.String" resultType="java.lang.Integer">
+   select count(1) from copyright_info 
+   where uid = #{uid,jdbcType=VARCHAR}
+   and delete_sign = 0 and status in (8,9) 
+  </select>
+  
+  <select id="countCopyrightUndone" parameterType="java.lang.String" resultType="java.lang.Integer">
+   select count(1) from copyright_info 
+   where uid = #{uid,jdbcType=VARCHAR}
+   and delete_sign = 0 and status <![CDATA[ < ]]> 8 
+  </select>
+  
 </mapper>

+ 17 - 1
src/main/java/com/goafanti/common/mapper/OrgActivityMapper.xml

@@ -328,7 +328,7 @@
     <if test="endDate != null">
     	and  end_date <![CDATA[ < ]]> #{endDate,jdbcType=TIMESTAMP}
     </if>
-    order by start_date 
+    order by start_date desc
     <if test="page_sql != null">
     	${page_sql}
     </if>
@@ -370,6 +370,22 @@
   	  where uid = #{uid,jdbcType=VARCHAR} and deleted_sign = 0
   </select>
   
+  <select id="selectAcivityList" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from org_activity
+    where uid = #{1} and (
+    start_date 
+		 >= (select  str_to_date(CONCAT(#{0}-2,'-01-01'), '%Y-%m-%d %H'))
+				and  start_date   <![CDATA[ < ]]> (select  str_to_date(CONCAT(#{0}+1,'-01-01'), '%Y-%m-%d %H'))
+	)
+	or (
+	end_date 
+		 >= (select  str_to_date(CONCAT(#{0}-2,'-01-01'), '%Y-%m-%d %H'))
+				and  end_date   <![CDATA[ < ]]> (select  str_to_date(CONCAT(#{0}+1,'-01-01'), '%Y-%m-%d %H'))
+	)
+	and deleted_sign = 0
+  </select>
  <!--  <select id="selectDetailById" parameterType="java.lang.String" resultMap="BaseResultMap">
   	
   </select> -->

+ 20 - 7
src/main/java/com/goafanti/common/mapper/OrgCognizanceMapper.xml

@@ -24,12 +24,13 @@
     <result column="large_order" property="largeOrder" jdbcType="INTEGER" />
     <result column="deleted_sign" property="deletedSign" jdbcType="INTEGER" />
     <result column="founder" property="founder" jdbcType="VARCHAR" />
+    <result column="tech_principal" property="techPrincipal" jdbcType="VARCHAR" />
   </resultMap>
   <sql id="Base_Column_List" >
     id, uid, serial_number, contacts, comment, consultant, technical_field1, technical_field2, 
     technical_field3, basic_research_cost, accident, create_time, accept_date, issuing_date, 
     certificate_number, certificate_url, state, year, record_time, large_order, deleted_sign,
-    founder
+    founder, tech_principal
   </sql>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
     select 
@@ -47,7 +48,8 @@
       technical_field1, technical_field2, technical_field3, 
       basic_research_cost, accident, create_time, 
       accept_date, issuing_date, certificate_number, 
-      certificate_url, state, year, record_time, large_order, deleted_sign, founder
+      certificate_url, state, year, record_time, large_order, deleted_sign, founder,
+      tech_principal
       )
     values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{serialNumber,jdbcType=INTEGER}, 
       #{contacts,jdbcType=INTEGER}, #{comment,jdbcType=VARCHAR}, #{consultant,jdbcType=VARCHAR}, 
@@ -55,7 +57,8 @@
       #{basicResearchCost,jdbcType=DECIMAL}, #{accident,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, 
       #{acceptDate,jdbcType=TIMESTAMP}, #{issuingDate,jdbcType=TIMESTAMP}, #{certificateNumber,jdbcType=VARCHAR}, 
       #{certificateUrl,jdbcType=VARCHAR}, #{state,jdbcType=INTEGER}, #{year,jdbcType=INTEGER}, #{recordTime,jdbcType=TIMESTAMP},
-      #{largeOrder,jdbcType=INTEGER}, #{deletedSign,jdbcType=INTEGER}, #{founder,jdbcType=VARCHAR}
+      #{largeOrder,jdbcType=INTEGER}, #{deletedSign,jdbcType=INTEGER}, #{founder,jdbcType=VARCHAR},
+      #{techPrincipal,jdbcType=VARCHAR}
       )
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.OrgCognizance" >
@@ -127,6 +130,9 @@
       <if test="founder != null" >
         founder,
       </if>
+       <if test="techPrincipal != null" >
+        tech_principal,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides="," >
       <if test="id != null" >
@@ -195,6 +201,9 @@
        <if test="founder != null" >
         #{founder,jdbcType=VARCHAR},
       </if>
+      <if test="techPrincipal != null" >
+        #{techPrincipal,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.OrgCognizance" >
@@ -263,6 +272,9 @@
       <if test="founder != null" >
         founder = #{founder,jdbcType=VARCHAR},
       </if>
+       <if test="techPrincipal != null" >
+        tech_principal = #{techPrincipal,jdbcType=VARCHAR},
+      </if>
     </set>
     where id = #{id,jdbcType=VARCHAR}
   </update>
@@ -288,7 +300,8 @@
       record_time = #{recordTime,jdbcType=TIMESTAMP},
       large_order = #{largeOrder,jdbcType=INTEGER},
       deleted_sign = #{deletedSign,jdbcType=INTEGER},
-      founder = #{founder,jdbcType=VARCHAR}
+      founder = #{founder,jdbcType=VARCHAR},
+      tech_principal = #{techPrincipal,jdbcType=VARCHAR}
     where id = #{id,jdbcType=VARCHAR}
   </update>
   
@@ -395,7 +408,7 @@
 			select uid, net_asset as netAsset2, gross_profit as grossProfit2, sales_revenue as salesRevenue2 from org_finance where uid = #{1} and year = 
 			#{0}-2 and deleted_sign = 0
 			) b on b.uid = u. id
-			LEFT  JOIN
+	  LEFT  JOIN
 			(
 			select uid, net_asset as netAsset3, gross_profit as grossProfit3, sales_revenue as salesRevenue3 from org_finance where uid = #{1} and year = 
 			#{0}-3 and deleted_sign = 0
@@ -405,7 +418,7 @@
   <select id="selectCognizanceCatagoryBoByUidAndYear"  resultType="com.goafanti.cognizance.bo.CognizanceCatagoryBo">
 		 select u.id as uid, a.firstCatagory, b.secondCatagory, c.firmTotal, c.techTotal, d.totalRevenue FROM
 				(select id from user where id = #{1}) u 
-			LEFT JOIN
+	  LEFT JOIN
 				(select uid, count(1) as firstCatagory from org_intellectual_property 
 				where uid = #{1} and evaluation_category= 0 and deleted_sign = 0 GROUP BY uid
 				) a on a.uid = u.id
@@ -450,7 +463,7 @@
   
   <select id="findCultivationListByPage" parameterType="java.lang.String" resultType="com.goafanti.cognizance.bo.CultivationListBo">
   	select u.id as uid,  i.licence_province as province, i.unit_name as unitName, i.cog_contacts as cogContacts,
-		i.certificate_number as certificateNumber, i.issuing_date as issuingDate, a.name as consultant,
+		i.certificate_number as certificateNumber, i.issuing_date as issuingDate, a.name as consultant, i.tech_principal,
 		CONCAT(i.first_contacts,'  ', i.first_mobile) as firstContacts,
 	    CONCAT(i.second_contacts,'  ', i.second_mobile) as secondContacts,
 	    CONCAT(i.third_contacts,'  ', i.third_mobile) as thirdContacts

+ 22 - 0
src/main/java/com/goafanti/common/mapper/OrgIntellectualPropertyMapper.xml

@@ -206,6 +206,12 @@
     <if test="uid != null">
 	    and  uid = #{uid,jdbcType=VARCHAR}
 	</if>
+	<if test="sDate != null">
+		and authorization_date <![CDATA[ >= ]]> #{sDate,jdbcType=TIMESTAMP}
+	</if>
+	<if test="eDate != null">
+		and authorization_date <![CDATA[ <= ]]> #{eDate,jdbcType=TIMESTAMP}
+	</if>
 	order by authorization_date desc
     <if test="page_sql != null">
     	${page_sql}
@@ -220,6 +226,12 @@
 	    <if test="uid != null">
 		    and  uid = #{uid,jdbcType=VARCHAR}
 		</if>
+		<if test="sDate != null">
+		and authorization_date <![CDATA[ >= ]]> #{sDate,jdbcType=TIMESTAMP}
+	</if>
+	<if test="eDate != null">
+		and authorization_date <![CDATA[ <= ]]> #{eDate,jdbcType=TIMESTAMP}
+	</if>
     </select>
     
   <update id="batchDeleteByPrimaryKey" parameterType="java.util.List">
@@ -258,4 +270,14 @@
     from org_intellectual_property o LEFT JOIN copyright_info c on o.pid = c.id
     where o.id = #{id,jdbcType=VARCHAR} and o.deleted_sign = 0 and c.delete_sign = 0
   </select>
+  
+  <select id="selectIntellectualPropertyList" resultMap="BaseResultMap">
+   select 
+    <include refid="Base_Column_List" />
+    from org_intellectual_property
+    where uid = #{1} and authorization_date 
+		 >= (select  str_to_date(CONCAT(#{0},'-01-01'), '%Y-%m-%d %H'))
+				and authorization_date  <![CDATA[ < ]]> (select  str_to_date(CONCAT(#{0}+1,'-01-01'), '%Y-%m-%d %H'))
+	and deleted_sign = 0
+  </select>
 </mapper>

+ 314 - 134
src/main/java/com/goafanti/common/mapper/OrganizationIdentityMapper.xml

@@ -69,7 +69,8 @@
 			jdbcType="VARCHAR" />
 		<result column="issuing_date" property="issuingDate" jdbcType="TIMESTAMP" />
 		<result column="cog_contacts" property="cogContacts" jdbcType="INTEGER" />
-		<result column="consultant" property="consultant" jdbcType="VARCHAR" />
+		<result column="tech_principal" property="techPrincipal"
+			jdbcType="VARCHAR" />
 		<result column="contacts_fixed_tel" property="contactsFixedTel"
 			jdbcType="VARCHAR" />
 		<result column="contacts_fax" property="contactsFax" jdbcType="VARCHAR" />
@@ -102,27 +103,42 @@
 			jdbcType="VARCHAR" />
 		<result column="high_tech_name" property="highTechName"
 			jdbcType="VARCHAR" />
+
+		<result column="patent_prory_statement_url" property="patentProryStatementUrl"
+			jdbcType="VARCHAR" />
 	</resultMap>
 	<sql id="Base_Column_List">
-		id, uid, contacts, contact_mobile, fixed_tel, qq, postal_address,
+		id, uid, contacts, contact_mobile, fixed_tel, qq,
+		postal_address,
 		postcode, aft_username,
-		unit_name, registered_capital, licence_number, licence_province, licence_city,
+		unit_name, registered_capital,
+		licence_number, licence_province, licence_city,
 		licence_area,
-		licence_scanning_url, org_code, org_code_url, bank_account, banks, bank_branch,
+		licence_scanning_url, org_code, org_code_url, bank_account, banks,
+		bank_branch,
 		bank_card_number,
-		validation_amount, identity_type, location_province, location_city, location_area,
-		legal_person, legal_person_id_card, last_year_tax_report_url,
+		validation_amount, identity_type,
+		location_province, location_city, location_area,
+		legal_person,
+		legal_person_id_card, last_year_tax_report_url,
 		audit_status, process,
-		wrong_count, payment_date, first_contacts, first_mobile, second_contacts,
+		wrong_count, payment_date, first_contacts, first_mobile,
+		second_contacts,
 		second_mobile,
-		third_contacts, third_mobile, listed, listed_date, listed_type, stock_code,
+		third_contacts, third_mobile, listed,
+		listed_date, listed_type, stock_code,
 		certificate_number,
-		issuing_date, cog_contacts, consultant, contacts_fixed_tel, contacts_fax,
+		issuing_date,
+		cog_contacts, tech_principal, contacts_fixed_tel, contacts_fax,
 		legal_person_tel,
-		legal_person_fax, legal_person_email, registration_time, ratepay_code, industry,
-		enterprise_scale, register_type, foreign_investment, field,
-		tax_authority, ratepay_method,
-		high_tech_zone, risk_investment, business_scope, high_tech_name
+		legal_person_fax, legal_person_email,
+		registration_time, ratepay_code, industry,
+		enterprise_scale,
+		register_type, foreign_investment, field,
+		tax_authority,
+		ratepay_method,
+		high_tech_zone, risk_investment, business_scope,
+		high_tech_name, patent_prory_statement_url
 	</sql>
 	<select id="selectByPrimaryKey" resultMap="BaseResultMap"
 		parameterType="java.lang.String">
@@ -132,36 +148,51 @@
 		where id = #{id,jdbcType=VARCHAR}
 	</select>
 	<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
-		delete from organization_identity
+		delete from
+		organization_identity
 		where id = #{id,jdbcType=VARCHAR}
 	</delete>
 	<insert id="insert" parameterType="com.goafanti.common.model.OrganizationIdentity">
-		insert into organization_identity (id, uid, contacts,
-		contact_mobile, fixed_tel, qq,
+		insert into
+		organization_identity (id, uid, contacts,
+		contact_mobile, fixed_tel,
+		qq,
 		postal_address, postcode, aft_username,
-		unit_name, registered_capital, licence_number,
-		licence_province, licence_city, licence_area,
+		unit_name,
+		registered_capital, licence_number,
+		licence_province, licence_city,
+		licence_area,
 		licence_scanning_url, org_code, org_code_url,
 		bank_account, banks, bank_branch,
-		bank_card_number, validation_amount, identity_type,
+		bank_card_number, validation_amount,
+		identity_type,
 		location_province, location_city, location_area,
 		legal_person, legal_person_id_card, last_year_tax_report_url,
 		audit_status, process, wrong_count,
-		payment_date, first_contacts, first_mobile,
+		payment_date, first_contacts,
+		first_mobile,
 		second_contacts, second_mobile, third_contacts,
 		third_mobile, listed, listed_date,
-		listed_type, stock_code, certificate_number,
-		issuing_date, cog_contacts, consultant,
+		listed_type, stock_code,
+		certificate_number,
+		issuing_date, cog_contacts, tech_principal,
 		contacts_fixed_tel, contacts_fax, legal_person_tel,
-		legal_person_fax, legal_person_email, registration_time,
-		ratepay_code, industry, enterprise_scale,
+		legal_person_fax,
+		legal_person_email, registration_time,
+		ratepay_code, industry,
+		enterprise_scale,
 		register_type, foreign_investment, field,
 		tax_authority, ratepay_method, high_tech_zone,
-		risk_investment, business_scope, high_tech_name)
-		values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR},
+		risk_investment,
+		business_scope, high_tech_name, patent_prory_statement_url
+		)
+		values (#{id,jdbcType=VARCHAR},
+		#{uid,jdbcType=VARCHAR},
 		#{contacts,jdbcType=VARCHAR},
-		#{contactMobile,jdbcType=VARCHAR}, #{fixedTel,jdbcType=VARCHAR}, #{qq,jdbcType=VARCHAR},
-		#{postalAddress,jdbcType=VARCHAR}, #{postcode,jdbcType=VARCHAR},
+		#{contactMobile,jdbcType=VARCHAR}, #{fixedTel,jdbcType=VARCHAR},
+		#{qq,jdbcType=VARCHAR},
+		#{postalAddress,jdbcType=VARCHAR},
+		#{postcode,jdbcType=VARCHAR},
 		#{aftUsername,jdbcType=VARCHAR},
 		#{unitName,jdbcType=VARCHAR}, #{registeredCapital,jdbcType=DECIMAL},
 		#{licenceNumber,jdbcType=VARCHAR},
@@ -169,7 +200,8 @@
 		#{licenceArea,jdbcType=VARCHAR},
 		#{licenceScanningUrl,jdbcType=VARCHAR}, #{orgCode,jdbcType=VARCHAR},
 		#{orgCodeUrl,jdbcType=VARCHAR},
-		#{bankAccount,jdbcType=VARCHAR}, #{banks,jdbcType=VARCHAR}, #{bankBranch,jdbcType=VARCHAR},
+		#{bankAccount,jdbcType=VARCHAR},
+		#{banks,jdbcType=VARCHAR}, #{bankBranch,jdbcType=VARCHAR},
 		#{bankCardNumber,jdbcType=VARCHAR},
 		#{validationAmount,jdbcType=DECIMAL},
 		#{identityType,jdbcType=INTEGER},
@@ -180,24 +212,31 @@
 		#{lastYearTaxReportUrl,jdbcType=VARCHAR},
 		#{auditStatus,jdbcType=INTEGER}, #{process,jdbcType=INTEGER},
 		#{wrongCount,jdbcType=INTEGER},
-		#{paymentDate,jdbcType=TIMESTAMP}, #{firstContacts,jdbcType=VARCHAR}, #{firstMobile,jdbcType=VARCHAR},
+		#{paymentDate,jdbcType=TIMESTAMP},
+		#{firstContacts,jdbcType=VARCHAR}, #{firstMobile,jdbcType=VARCHAR},
 		#{secondContacts,jdbcType=VARCHAR}, #{secondMobile,jdbcType=VARCHAR},
 		#{thirdContacts,jdbcType=VARCHAR},
-		#{thirdMobile,jdbcType=VARCHAR}, #{listed,jdbcType=INTEGER}, #{listedDate,jdbcType=TIMESTAMP},
+		#{thirdMobile,jdbcType=VARCHAR},
+		#{listed,jdbcType=INTEGER}, #{listedDate,jdbcType=TIMESTAMP},
 		#{listedType,jdbcType=INTEGER}, #{stockCode,jdbcType=VARCHAR},
 		#{certificateNumber,jdbcType=VARCHAR},
 		#{issuingDate,jdbcType=TIMESTAMP}, #{cogContacts,jdbcType=INTEGER},
-		#{consultant,jdbcType=VARCHAR},
-		#{contactsFixedTel,jdbcType=VARCHAR}, #{contactsFax,jdbcType=VARCHAR}, #{legalPersonTel,jdbcType=VARCHAR},
+		#{techPrincipal,jdbcType=VARCHAR},
+		#{contactsFixedTel,jdbcType=VARCHAR}, #{contactsFax,jdbcType=VARCHAR},
+		#{legalPersonTel,jdbcType=VARCHAR},
 		#{legalPersonFax,jdbcType=VARCHAR},
 		#{legalPersonEmail,jdbcType=VARCHAR},
 		#{registrationTime,jdbcType=TIMESTAMP},
 		#{ratepayCode,jdbcType=VARCHAR}, #{industry,jdbcType=INTEGER},
 		#{enterpriseScale,jdbcType=INTEGER},
-		#{registerType,jdbcType=VARCHAR}, #{foreignInvestment,jdbcType=VARCHAR}, #{field,jdbcType=VARCHAR},
+		#{registerType,jdbcType=VARCHAR},
+		#{foreignInvestment,jdbcType=VARCHAR}, #{field,jdbcType=VARCHAR},
 		#{taxAuthority,jdbcType=INTEGER}, #{ratepayMethod,jdbcType=INTEGER},
 		#{highTechZone,jdbcType=INTEGER},
-		#{riskInvestment,jdbcType=INTEGER}, #{businessScope,jdbcType=VARCHAR}, #{highTechName,jdbcType=VARCHAR})
+		#{riskInvestment,jdbcType=INTEGER},
+		#{businessScope,jdbcType=VARCHAR}, #{highTechName,jdbcType=VARCHAR},
+		#{patentProryStatementUrl,jdbcType=VARCHAR}
+		)
 	</insert>
 	<insert id="insertSelective" parameterType="com.goafanti.common.model.OrganizationIdentity">
 		insert into organization_identity
@@ -343,8 +382,8 @@
 			<if test="cogContacts != null">
 				cog_contacts,
 			</if>
-			<if test="consultant != null">
-				consultant,
+			<if test="techPrincipal != null">
+				tech_principal,
 			</if>
 			<if test="contactsFixedTel != null">
 				contacts_fixed_tel,
@@ -400,6 +439,10 @@
 			<if test="highTechName != null">
 				high_tech_name,
 			</if>
+			
+			<if test="patentProryStatementUrl != null">
+				patent_prory_statement_url,
+			</if>
 		</trim>
 		<trim prefix="values (" suffix=")" suffixOverrides=",">
 			<if test="id != null">
@@ -543,8 +586,8 @@
 			<if test="cogContacts != null">
 				#{cogContacts,jdbcType=INTEGER},
 			</if>
-			<if test="consultant != null">
-				#{consultant,jdbcType=VARCHAR},
+			<if test="techPrincipal != null">
+				#{techPrincipal,jdbcType=VARCHAR},
 			</if>
 			<if test="contactsFixedTel != null">
 				#{contactsFixedTel,jdbcType=VARCHAR},
@@ -600,6 +643,10 @@
 			<if test="highTechName != null">
 				#{highTechName,jdbcType=VARCHAR},
 			</if>
+			
+			<if test="patentProryStatementUrl != null">
+				#{patentProryStatementUrl,jdbcType=VARCHAR},
+			</if>
 		</trim>
 	</insert>
 	<update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.OrganizationIdentity">
@@ -633,7 +680,8 @@
 				unit_name = #{unitName,jdbcType=VARCHAR},
 			</if>
 			<if test="registeredCapital != null">
-				registered_capital = #{registeredCapital,jdbcType=DECIMAL},
+				registered_capital =
+				#{registeredCapital,jdbcType=DECIMAL},
 			</if>
 			<if test="licenceNumber != null">
 				licence_number = #{licenceNumber,jdbcType=VARCHAR},
@@ -648,7 +696,8 @@
 				licence_area = #{licenceArea,jdbcType=VARCHAR},
 			</if>
 			<if test="licenceScanningUrl != null">
-				licence_scanning_url = #{licenceScanningUrl,jdbcType=VARCHAR},
+				licence_scanning_url =
+				#{licenceScanningUrl,jdbcType=VARCHAR},
 			</if>
 			<if test="orgCode != null">
 				org_code = #{orgCode,jdbcType=VARCHAR},
@@ -687,10 +736,12 @@
 				legal_person = #{legalPerson,jdbcType=VARCHAR},
 			</if>
 			<if test="legalPersonIdCard != null">
-				legal_person_id_card = #{legalPersonIdCard,jdbcType=VARCHAR},
+				legal_person_id_card =
+				#{legalPersonIdCard,jdbcType=VARCHAR},
 			</if>
 			<if test="lastYearTaxReportUrl != null">
-				last_year_tax_report_url = #{lastYearTaxReportUrl,jdbcType=VARCHAR},
+				last_year_tax_report_url =
+				#{lastYearTaxReportUrl,jdbcType=VARCHAR},
 			</if>
 			<if test="auditStatus != null">
 				audit_status = #{auditStatus,jdbcType=INTEGER},
@@ -735,7 +786,8 @@
 				stock_code = #{stockCode,jdbcType=VARCHAR},
 			</if>
 			<if test="certificateNumber != null">
-				certificate_number = #{certificateNumber,jdbcType=VARCHAR},
+				certificate_number =
+				#{certificateNumber,jdbcType=VARCHAR},
 			</if>
 			<if test="issuingDate != null">
 				issuing_date = #{issuingDate,jdbcType=TIMESTAMP},
@@ -743,11 +795,12 @@
 			<if test="cogContacts != null">
 				cog_contacts = #{cogContacts,jdbcType=INTEGER},
 			</if>
-			<if test="consultant != null">
-				consultant = #{consultant,jdbcType=VARCHAR},
+			<if test="techPrincipal != null">
+				tech_principal = #{techPrincipal,jdbcType=VARCHAR},
 			</if>
 			<if test="contactsFixedTel != null">
-				contacts_fixed_tel = #{contactsFixedTel,jdbcType=VARCHAR},
+				contacts_fixed_tel =
+				#{contactsFixedTel,jdbcType=VARCHAR},
 			</if>
 			<if test="contactsFax != null">
 				contacts_fax = #{contactsFax,jdbcType=VARCHAR},
@@ -759,10 +812,12 @@
 				legal_person_fax = #{legalPersonFax,jdbcType=VARCHAR},
 			</if>
 			<if test="legalPersonEmail != null">
-				legal_person_email = #{legalPersonEmail,jdbcType=VARCHAR},
+				legal_person_email =
+				#{legalPersonEmail,jdbcType=VARCHAR},
 			</if>
 			<if test="registrationTime != null">
-				registration_time = #{registrationTime,jdbcType=TIMESTAMP},
+				registration_time =
+				#{registrationTime,jdbcType=TIMESTAMP},
 			</if>
 			<if test="ratepayCode != null">
 				ratepay_code = #{ratepayCode,jdbcType=VARCHAR},
@@ -777,7 +832,8 @@
 				register_type = #{registerType,jdbcType=VARCHAR},
 			</if>
 			<if test="foreignInvestment != null">
-				foreign_investment = #{foreignInvestment,jdbcType=VARCHAR},
+				foreign_investment =
+				#{foreignInvestment,jdbcType=VARCHAR},
 			</if>
 			<if test="field != null">
 				field = #{field,jdbcType=VARCHAR},
@@ -800,76 +856,139 @@
 			<if test="highTechName != null">
 				high_tech_name = #{highTechName,jdbcType=VARCHAR},
 			</if>
+			
+			<if test="patentProryStatementUrl != null">
+				patent_prory_statement_url = #{patentProryStatementUrl,jdbcType=VARCHAR},
+			</if>
 		</set>
 		where id = #{id,jdbcType=VARCHAR}
 	</update>
 	<update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.OrganizationIdentity">
-		update organization_identity
+		update
+		organization_identity
 		set uid = #{uid,jdbcType=VARCHAR},
-		contacts = #{contacts,jdbcType=VARCHAR},
-		contact_mobile = #{contactMobile,jdbcType=VARCHAR},
-		fixed_tel = #{fixedTel,jdbcType=VARCHAR},
+		contacts =
+		#{contacts,jdbcType=VARCHAR},
+		contact_mobile =
+		#{contactMobile,jdbcType=VARCHAR},
+		fixed_tel =
+		#{fixedTel,jdbcType=VARCHAR},
 		qq = #{qq,jdbcType=VARCHAR},
 		postal_address = #{postalAddress,jdbcType=VARCHAR},
-		postcode = #{postcode,jdbcType=VARCHAR},
-		aft_username = #{aftUsername,jdbcType=VARCHAR},
-		unit_name = #{unitName,jdbcType=VARCHAR},
-		registered_capital = #{registeredCapital,jdbcType=DECIMAL},
-		licence_number = #{licenceNumber,jdbcType=VARCHAR},
-		licence_province = #{licenceProvince,jdbcType=VARCHAR},
-		licence_city = #{licenceCity,jdbcType=VARCHAR},
-		licence_area = #{licenceArea,jdbcType=VARCHAR},
-		licence_scanning_url = #{licenceScanningUrl,jdbcType=VARCHAR},
-		org_code = #{orgCode,jdbcType=VARCHAR},
-		org_code_url = #{orgCodeUrl,jdbcType=VARCHAR},
-		bank_account = #{bankAccount,jdbcType=VARCHAR},
+		postcode =
+		#{postcode,jdbcType=VARCHAR},
+		aft_username =
+		#{aftUsername,jdbcType=VARCHAR},
+		unit_name =
+		#{unitName,jdbcType=VARCHAR},
+		registered_capital =
+		#{registeredCapital,jdbcType=DECIMAL},
+		licence_number =
+		#{licenceNumber,jdbcType=VARCHAR},
+		licence_province =
+		#{licenceProvince,jdbcType=VARCHAR},
+		licence_city =
+		#{licenceCity,jdbcType=VARCHAR},
+		licence_area =
+		#{licenceArea,jdbcType=VARCHAR},
+		licence_scanning_url =
+		#{licenceScanningUrl,jdbcType=VARCHAR},
+		org_code =
+		#{orgCode,jdbcType=VARCHAR},
+		org_code_url =
+		#{orgCodeUrl,jdbcType=VARCHAR},
+		bank_account =
+		#{bankAccount,jdbcType=VARCHAR},
 		banks = #{banks,jdbcType=VARCHAR},
 		bank_branch = #{bankBranch,jdbcType=VARCHAR},
-		bank_card_number = #{bankCardNumber,jdbcType=VARCHAR},
-		validation_amount = #{validationAmount,jdbcType=DECIMAL},
-		identity_type = #{identityType,jdbcType=INTEGER},
-		location_province = #{locationProvince,jdbcType=VARCHAR},
-		location_city = #{locationCity,jdbcType=VARCHAR},
-		location_area = #{locationArea,jdbcType=VARCHAR},
-		legal_person = #{legalPerson,jdbcType=VARCHAR},
-		legal_person_id_card = #{legalPersonIdCard,jdbcType=VARCHAR},
-		last_year_tax_report_url = #{lastYearTaxReportUrl,jdbcType=VARCHAR},
-		audit_status = #{auditStatus,jdbcType=INTEGER},
+		bank_card_number =
+		#{bankCardNumber,jdbcType=VARCHAR},
+		validation_amount =
+		#{validationAmount,jdbcType=DECIMAL},
+		identity_type =
+		#{identityType,jdbcType=INTEGER},
+		location_province =
+		#{locationProvince,jdbcType=VARCHAR},
+		location_city =
+		#{locationCity,jdbcType=VARCHAR},
+		location_area =
+		#{locationArea,jdbcType=VARCHAR},
+		legal_person =
+		#{legalPerson,jdbcType=VARCHAR},
+		legal_person_id_card =
+		#{legalPersonIdCard,jdbcType=VARCHAR},
+		last_year_tax_report_url =
+		#{lastYearTaxReportUrl,jdbcType=VARCHAR},
+		audit_status =
+		#{auditStatus,jdbcType=INTEGER},
 		process = #{process,jdbcType=INTEGER},
 		wrong_count = #{wrongCount,jdbcType=INTEGER},
-		payment_date = #{paymentDate,jdbcType=TIMESTAMP},
-		first_contacts = #{firstContacts,jdbcType=VARCHAR},
-		first_mobile = #{firstMobile,jdbcType=VARCHAR},
-		second_contacts = #{secondContacts,jdbcType=VARCHAR},
-		second_mobile = #{secondMobile,jdbcType=VARCHAR},
-		third_contacts = #{thirdContacts,jdbcType=VARCHAR},
-		third_mobile = #{thirdMobile,jdbcType=VARCHAR},
+		payment_date =
+		#{paymentDate,jdbcType=TIMESTAMP},
+		first_contacts =
+		#{firstContacts,jdbcType=VARCHAR},
+		first_mobile =
+		#{firstMobile,jdbcType=VARCHAR},
+		second_contacts =
+		#{secondContacts,jdbcType=VARCHAR},
+		second_mobile =
+		#{secondMobile,jdbcType=VARCHAR},
+		third_contacts =
+		#{thirdContacts,jdbcType=VARCHAR},
+		third_mobile =
+		#{thirdMobile,jdbcType=VARCHAR},
 		listed = #{listed,jdbcType=INTEGER},
 		listed_date = #{listedDate,jdbcType=TIMESTAMP},
-		listed_type = #{listedType,jdbcType=INTEGER},
-		stock_code = #{stockCode,jdbcType=VARCHAR},
-		certificate_number = #{certificateNumber,jdbcType=VARCHAR},
-		issuing_date = #{issuingDate,jdbcType=TIMESTAMP},
-		cog_contacts = #{cogContacts,jdbcType=INTEGER},
-		consultant = #{consultant,jdbcType=VARCHAR},
-		contacts_fixed_tel = #{contactsFixedTel,jdbcType=VARCHAR},
-		contacts_fax = #{contactsFax,jdbcType=VARCHAR},
-		legal_person_tel = #{legalPersonTel,jdbcType=VARCHAR},
-		legal_person_fax = #{legalPersonFax,jdbcType=VARCHAR},
-		legal_person_email = #{legalPersonEmail,jdbcType=VARCHAR},
-		registration_time = #{registrationTime,jdbcType=TIMESTAMP},
-		ratepay_code = #{ratepayCode,jdbcType=VARCHAR},
-		industry = #{industry,jdbcType=INTEGER},
-		enterprise_scale = #{enterpriseScale,jdbcType=INTEGER},
-		register_type = #{registerType,jdbcType=VARCHAR},
-		foreign_investment = #{foreignInvestment,jdbcType=VARCHAR},
-		field = #{field,jdbcType=VARCHAR},
-		tax_authority = #{taxAuthority,jdbcType=INTEGER},
-		ratepay_method = #{ratepayMethod,jdbcType=INTEGER},
-		high_tech_zone = #{highTechZone,jdbcType=INTEGER},
-		risk_investment = #{riskInvestment,jdbcType=INTEGER},
-		business_scope = #{businessScope,jdbcType=VARCHAR},
-		high_tech_name = #{highTechName,jdbcType=VARCHAR}
+		listed_type =
+		#{listedType,jdbcType=INTEGER},
+		stock_code =
+		#{stockCode,jdbcType=VARCHAR},
+		certificate_number =
+		#{certificateNumber,jdbcType=VARCHAR},
+		issuing_date =
+		#{issuingDate,jdbcType=TIMESTAMP},
+		cog_contacts =
+		#{cogContacts,jdbcType=INTEGER},
+		techPrincipal =
+		#{techPrincipal,jdbcType=VARCHAR},
+		contacts_fixed_tel =
+		#{contactsFixedTel,jdbcType=VARCHAR},
+		contacts_fax =
+		#{contactsFax,jdbcType=VARCHAR},
+		legal_person_tel =
+		#{legalPersonTel,jdbcType=VARCHAR},
+		legal_person_fax =
+		#{legalPersonFax,jdbcType=VARCHAR},
+		legal_person_email =
+		#{legalPersonEmail,jdbcType=VARCHAR},
+		registration_time =
+		#{registrationTime,jdbcType=TIMESTAMP},
+		ratepay_code =
+		#{ratepayCode,jdbcType=VARCHAR},
+		industry =
+		#{industry,jdbcType=INTEGER},
+		enterprise_scale =
+		#{enterpriseScale,jdbcType=INTEGER},
+		register_type =
+		#{registerType,jdbcType=VARCHAR},
+		foreign_investment =
+		#{foreignInvestment,jdbcType=VARCHAR},
+		field =
+		#{field,jdbcType=VARCHAR},
+		tax_authority =
+		#{taxAuthority,jdbcType=INTEGER},
+		ratepay_method =
+		#{ratepayMethod,jdbcType=INTEGER},
+		high_tech_zone =
+		#{highTechZone,jdbcType=INTEGER},
+		risk_investment =
+		#{riskInvestment,jdbcType=INTEGER},
+		business_scope =
+		#{businessScope,jdbcType=VARCHAR},
+		high_tech_name =
+		#{highTechName,jdbcType=VARCHAR},
+		patent_prory_statement_url =
+		#{patentProryStatementUrl,jdbcType=VARCHAR}
 		where id = #{id,jdbcType=VARCHAR}
 	</update>
 
@@ -884,21 +1003,30 @@
 
 	<select id="selectOrgIdentityBoByUserId" parameterType="java.lang.String"
 		resultType="com.goafanti.user.bo.OrgIdentityBo">
-		select t.id,t.uid,t.contacts,t.fixed_tel as fixedTel ,t.qq,t.postal_address
+		select t.id,t.uid,t.contacts,t.fixed_tel as fixedTel
+		,t.qq,t.postal_address
 		as postalAddress ,t.postcode,
-		t.first_contacts as firstContacts, t.first_mobile as firstMobile,
-		t.second_contacts as secondContacts, t.second_mobile as secondMobile,
-		t.third_contacts as thirdContacts, t.third_mobile as thirdMobile,
-		u.email ,t.legal_person as legalPerson
+		t.first_contacts as
+		firstContacts, t.first_mobile as firstMobile,
+		t.second_contacts as
+		secondContacts, t.second_mobile as secondMobile,
+		t.third_contacts as
+		thirdContacts, t.third_mobile as thirdMobile,
+		u.email ,t.legal_person
+		as legalPerson
 		from user u LEFT JOIN organization_identity t
-		on t.uid = u.id
+		on t.uid =
+		u.id
 		where t.uid=#{uid,jdbcType=VARCHAR}
 	</select>
 
-	<select id="selectAllOrgIndentity" resultType="com.goafanti.user.bo.OrgUnitNames" parameterType="java.lang.String">
+	<select id="selectAllOrgIndentity" resultType="com.goafanti.user.bo.OrgUnitNames"
+		parameterType="java.lang.String">
 		select u.id as uid, i.unit_name as unitName
-		from user u INNER JOIN organization_identity i on u.id = i.uid and u.lvl = 1
-		and i.audit_status = 5
+		from user u INNER JOIN
+		organization_identity i on u.id = i.uid and u.lvl = 1
+		and
+		i.audit_status = 5
 		where 1 = 1
 		<if test="_parameter != null">
 			and u.aid = #{aid,jdbcType=VARCHAR}
@@ -907,30 +1035,82 @@
 
 	<select id="selectBasicInfo" resultType="com.goafanti.user.bo.OrgBasicInfoBo">
 		select oi.id,
-		oi.uid as uid, oi.unit_name as unitName, oi.licence_province as province,
+		oi.uid as
+		uid, oi.unit_name as unitName, oi.licence_province as province,
 		oi.licence_city as city, oi.licence_area as area, oi.postal_address as
 		postalAddress,
-		oi.postcode, oi.contacts, oi.contact_mobile as contactMobile,
-		oi.contacts_fixed_tel as contactsFixedTel, oi.contacts_fax as
-		contactsFax,oi.legal_person_tel as legalPersonTel,
-		oi.legal_person_fax as legalPersonFax, oi.legal_person_email as legalPersonEmail,
-		oi.registered_capital as registeredCapital,
-		oi.registration_time as registrationTime, oi.legal_person as legalPerson,
-		oi.legal_person_id_card as legalPersonIdCard, oi.org_code as orgCode,
-		oi.ratepay_code as ratepayCode, oi.industry, oi.enterprise_scale as
-		enterpriseScale, oi.register_type as registerType,
-		oi.foreign_investment as foreignInvestment, oi.field, oi.tax_authority
-		as taxAuthority, oi.listed_date as listedDate,
-		oi.ratepay_method as ratepayMethod, oi.listed, oi.high_tech_zone as highTechZone,
-		oi.risk_investment as riskInvestment, oi.stock_code as stockCode,
-		oi.business_scope as businessScope, oi.high_tech_name as highTechName,
-		oi.listed_type as listedType,
-		ohr.id as hid, ohr.firm_total as firmTotal, ohr.tech_total as techTotal
+		oi.postcode, oi.first_contacts as firstContacts,
+		oi.first_mobile as firstMobile,
+		oi.contacts_fixed_tel as
+		contactsFixedTel, oi.contacts_fax as
+		contactsFax,oi.legal_person_tel as
+		legalPersonTel,
+		oi.legal_person_fax as legalPersonFax,
+		oi.legal_person_email as legalPersonEmail,
+		oi.registered_capital as
+		registeredCapital,
+		oi.registration_time as registrationTime,
+		oi.legal_person as legalPerson,
+		oi.legal_person_id_card as
+		legalPersonIdCard, oi.org_code as orgCode,
+		oi.ratepay_code as
+		ratepayCode, oi.industry, oi.enterprise_scale as
+		enterpriseScale,
+		oi.register_type as registerType,
+		oi.foreign_investment as
+		foreignInvestment, oi.field, oi.tax_authority
+		as taxAuthority,
+		oi.listed_date as listedDate,
+		oi.ratepay_method as ratepayMethod,
+		oi.listed, oi.high_tech_zone as highTechZone,
+		oi.risk_investment as
+		riskInvestment, oi.stock_code as stockCode,
+		oi.business_scope as
+		businessScope, oi.high_tech_name as highTechName,
+		oi.listed_type as
+		listedType,
+		ohr.id as hid, ohr.firm_total as firmTotal, ohr.tech_total
+		as techTotal
 		from organization_identity oi
-		LEFT JOIN org_human_resource ohr
+		LEFT JOIN org_human_resource
+		ohr
 		on oi.uid = ohr.uid and ohr.year = #{1}
 		where oi.uid = #{0}
 	</select>
+	
+	<select id="selectOrgIdentityDetailByUserId" parameterType="java.lang.String" resultType="com.goafanti.user.bo.OrgIdentityDetailBo">
+		select 
+			id, uid, aft_username as aftUsername, unit_name as unitName, identity_type as identityType,
+			first_contacts as firstContacts, first_mobile as firstMobile, second_contacts as secondContacts,
+			second_mobile as secondMobile, third_contacts as thirdContacts, third_mobile as thirdMobile,
+			legal_person as legalPerson, legal_person_id_card as legalPersonIdCard, registration_time as registrationTime,
+			licence_number as licenceNumber, licence_province as licenceProvince, licence_city as licenceCity,
+			licence_area as licenceArea, licence_scanning_url as licenceScanningUrl, org_code as orgCode,
+			org_code_url as orgCodeUrl, banks, bank_branch as bankBranch, bank_card_number as bankCardNumber,
+			location_province as locationProvince, location_city as locationCity, location_area as locationArea,
+			validation_amount as validationAmount, payment_date as paymentDate, audit_status as auditStatus, 
+			last_year_tax_report_url as lastYearTaxReportUrl
+		from organization_identity 
+		where uid = #{uid,jdbcType=VARCHAR}
+	</select>
+	
+	
+	<select id="selectAuditorOrgIdentityDetailByUserId" parameterType="java.lang.String" resultType="com.goafanti.user.bo.AuditorOrgIdentityDetailBo">
+		select u.aid, u.mid,
+			oi.id, oi.uid,  oi.aft_username as aftUsername,  oi.unit_name as unitName,  oi.identity_type as identityType,
+			 oi.first_contacts as firstContacts,  oi.first_mobile as firstMobile,  oi.second_contacts as secondContacts,
+			 oi.second_mobile as secondMobile,  oi.third_contacts as thirdContacts,  oi.third_mobile as thirdMobile,
+			 oi.legal_person as legalPerson,  oi.legal_person_id_card as legalPersonIdCard,  oi.registration_time as registrationTime,
+			 oi.licence_number as licenceNumber,  oi.licence_province as licenceProvince,  oi.licence_city as licenceCity,
+			 oi.licence_area as licenceArea,  oi.licence_scanning_url as licenceScanningUrl,  oi.org_code as orgCode,
+			 oi.org_code_url as orgCodeUrl,  oi.banks, bank_branch as bankBranch,  oi.bank_card_number as bankCardNumber,
+			 oi.location_province as locationProvince,  oi.location_city as locationCity,  oi.location_area as locationArea,
+			 oi.validation_amount as validationAmount,  oi.payment_date as paymentDate,  oi.audit_status as auditStatus,
+			 oi.last_year_tax_report_url as lastYearTaxReportUrl
+		from user u 
+		LEFT JOIN organization_identity oi on oi.uid = u.id
+		where uid = #{uid,jdbcType=VARCHAR}
+	</select>
 
 
 </mapper>

+ 21 - 3
src/main/java/com/goafanti/common/mapper/PatentInfoMapper.xml

@@ -651,6 +651,9 @@
 		<if test="author != null">
 			and p.author = #{author,jdbcType=VARCHAR}
 		</if>
+		<if test="uid != null">
+			and p.uid = #{uid,jdbcType=VARCHAR}
+		</if>
 		<if test="locationProvince != null">
 			and o.licence_province =
 			#{locationProvince,jdbcType=VARCHAR}
@@ -724,6 +727,9 @@
 		<if test="author != null">
 			and p.author = #{author,jdbcType=VARCHAR}
 		</if>
+		<if test="uid != null">
+			and p.uid = #{uid,jdbcType=VARCHAR}
+		</if>
 		<if test="locationProvince != null">
 			and
 			o.licence_province=#{locationProvince,jdbcType=VARCHAR}
@@ -743,12 +749,12 @@
 		patentState,
 		c.annual_fee_state as annualFeeState, p.authorized_date as authorizedDate
 		from patent_info p
-		LEFT JOIN patent_cost c on p.id = c.pid
+		LEFT JOIN patent_cost c on p.id = c.pid and c.annual_fee_state = 0
 		LEFT JOIN organization_identity o on p.uid = o.uid
 		<if test="principal != null">
 			left join patent_log l on p.id=l.pid
 		</if>
-		where p.deleted_sign = 0 
+		where p.deleted_sign = 0 and c.annual_fee_state = 0
 		<if test="principal != null">
 			and l.principal = #{principal,jdbcType=VARCHAR}
 		</if>
@@ -775,7 +781,7 @@
 		<if test="principal != null">
 			left join patent_log l on p.id=l.pid
 		</if>
-		where p.deleted_sign = 0 
+		where p.deleted_sign = 0 and c.annual_fee_state = 0
 		<if test="principal != null">
 			and l.principal = #{principal,jdbcType=VARCHAR}
 		</if>
@@ -950,5 +956,17 @@
 				#{item}
 		</foreach>
 	</select>
+	
+  <select id="countPatentDone" parameterType="java.lang.String" resultType="java.lang.Integer">
+	   select count(1) from patent_info 
+	   where uid = #{uid,jdbcType=VARCHAR}
+	   and deleted_sign = 0 and patent_state in (12,13) 
+  </select>
+  
+  <select id="countPatentUndone" parameterType="java.lang.String" resultType="java.lang.Integer">
+	   select count(1) from patent_info 
+	   where uid = #{uid,jdbcType=VARCHAR}
+	   and deleted_sign = 0 and patent_state <![CDATA[ < ]]> 12 
+  </select>
 
 </mapper>

+ 7 - 0
src/main/java/com/goafanti/common/mapper/RoleMapper.xml

@@ -84,6 +84,13 @@
     left join permission tp on tp.id=trp.pid
     where tr.role_type <![CDATA[ < ]]> 999999
   </select>
+  <select id="findRolePermissionsExceptAreaManager" resultType="com.goafanti.permission.bo.RolePermissionBo">
+    select tr.id as rid, tr.role_name as rname, tr.role_type,tp.id as pid,tp.name as pname,tp.url
+    from role tr
+    left join role_permission trp on trp.rid=tr.id
+    left join permission tp on tp.id=trp.pid
+    where tr.role_type <![CDATA[ < ]]> 99999
+  </select>
   <select id="findRoleByUserId" resultType="java.lang.String">
     select tr.role_type from role tr
     left join user_role tur on tur.rid=tr.id

+ 12 - 0
src/main/java/com/goafanti/common/mapper/TechProjectMapper.xml

@@ -433,4 +433,16 @@
 		#{item}
 	</foreach>
   </update>
+  
+  <select id="countTechProjectDone" parameterType="java.lang.String" resultType="java.lang.Integer">
+	   select count(1) from tech_project 
+	   where uid = #{uid,jdbcType=VARCHAR}
+	   and deleted_sign = 0 and state in (6,8) 
+  </select>
+  
+  <select id="countTechProjectUndone" parameterType="java.lang.String" resultType="java.lang.Integer">
+	   select count(1) from tech_project 
+	   where uid = #{uid,jdbcType=VARCHAR}
+	   and deleted_sign = 0 and state in (1,2,3,4,5,7)
+  </select>
 </mapper>

+ 12 - 0
src/main/java/com/goafanti/common/mapper/UserIdentityMapper.xml

@@ -304,4 +304,16 @@
 		   u.mobile, u.number from user u left JOIN user_identity t
 	on t.uid = u.id where t.uid=#{uid,jdbcType=VARCHAR}
   </select>
+  
+  <select id="selectAuditorUserIdentityByUserId" parameterType="java.lang.String" resultType="com.goafanti.user.bo.AuditorUserIdentityDetailBo">
+  	select 
+  		u.aid, u.mid, ui.id, ui.uid, ui.username, ui.sex, ui.date_of_birth_year as dateOfBirthYear,
+  		ui.date_of_birth_month as dateOfBirthMonth, ui.id_number as idNumber, ui.positive_id_url as positiveIdUrl,
+  		ui.opposite_id_url as oppositeIdUrl, ui.aft_username as aftUsername, ui.province, ui.city, ui.area, ui.contact_mobile as contactMobile,
+  		ui.bank_name as bankName, ui.bank_account as bankAccount, ui.bank_card_number as bankCardNumber, ui.amount_money as amountMoney,
+  		ui.audit_status as auditStatus, ui.payment_date as paymentDate
+  	from user u 
+  	LEFT JOIN user_identity ui on u.id = ui.uid
+  	where u.id = #{uid,jdbcType=VARCHAR}
+  </select>
 </mapper>

+ 23 - 7
src/main/java/com/goafanti/common/mapper/UserMapper.xml

@@ -12,6 +12,7 @@
     <result column="lvl" jdbcType="INTEGER" property="lvl" />
     <result column="type" jdbcType="INTEGER" property="type" />
     <result column="aid" jdbcType="VARCHAR" property="aid" />
+    <result column="mid" jdbcType="VARCHAR" property="mid" />
   </resultMap>
   
   <resultMap type="com.goafanti.user.bo.UserPageHomeBo" id="UserPageHomeBo">
@@ -38,7 +39,7 @@
   
   
   <sql id="Base_Column_List">
-    id, mobile, password, nickname, email, create_time, number, lvl, type, aid
+    id, mobile, password, nickname, email, create_time, number, lvl, type, aid, mid
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
     select 
@@ -53,10 +54,12 @@
   <insert id="insert" parameterType="com.goafanti.common.model.User">
     insert into user (id, mobile, password, 
       nickname, email, create_time, 
-      number, lvl, type, aid)
+      number, lvl, type, aid, mid)
     values (#{id,jdbcType=VARCHAR}, #{mobile,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, 
       #{nickname,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, 
-      #{number,jdbcType=BIGINT}, #{lvl,jdbcType=INTEGER},#{type,jdbcType=INTEGER}, #{aid,jdbcType=VARCHAR})
+      #{number,jdbcType=BIGINT}, #{lvl,jdbcType=INTEGER},#{type,jdbcType=INTEGER}, #{aid,jdbcType=VARCHAR},
+      #{mid,jdbcType=VARCHAR}
+      )
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.User">
     insert into user
@@ -91,6 +94,9 @@
       <if test="aid != null">
         aid,
       </if>
+       <if test="mid != null">
+        mid,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -123,6 +129,9 @@
       <if test="aid != null">
         #{aid,jdbcType=VARCHAR},
       </if>
+       <if test="mid != null">
+        #{mid,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.User">
@@ -153,7 +162,10 @@
         type = #{type,jdbcType=INTEGER},
       </if>
       <if test="aid != null">
-        aid = #{aid,jdbcType=VARCHAR}
+        aid = #{aid,jdbcType=VARCHAR},
+      </if>
+      <if test="mid != null">
+        mid = #{mid,jdbcType=VARCHAR},
       </if>
     </set>
     where id = #{id,jdbcType=VARCHAR}
@@ -168,7 +180,8 @@
       number = #{number,jdbcType=BIGINT},
       lvl = #{lvl,jdbcType=INTEGER},
       type = #{type,jdbcType=INTEGER},
-      aid = #{aid,jdbcType=VARCHAR}
+      aid = #{aid,jdbcType=VARCHAR},
+      mid = #{mid,jdbcType=VARCHAR}
     where id = #{id,jdbcType=VARCHAR}
   </update>
   
@@ -199,9 +212,11 @@
   
   <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
+  	       u.number , i.aft_username as aftUsername, i.audit_status as auditStatus, a.name as adminName,
+  	       ad.name as managerName
     from user u  
     LEFT JOIN admin a on a.id = u.aid
+    LEFT JOIN admin ad on ad.id = u.mid
     LEFT JOIN user_identity i 
     ON u.id = i.uid  where u.type = 0
     <if test = "mobile != null">
@@ -262,9 +277,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,
-  	       o.unit_name as unitName
+  	       o.unit_name as unitName, ad.name as managerName
     from user u  
     LEFT JOIN admin a on a.id = u.aid 
+    LEFT JOIN admin ad on ad.id = u.mid
 	LEFT JOIN organization_identity o 
     ON u.id = o.uid 
     WHERE u.type = 1

+ 4 - 0
src/main/java/com/goafanti/common/mapper/UserRoleMapper.xml

@@ -64,4 +64,8 @@
 	  #{item,jdbcType=VARCHAR}  
     </foreach>
   </select>
+  
+  <select id ="listAuditor"  resultType="String">
+    select uid from user_role where rid = 3
+  </select>
 </mapper>

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

@@ -46,6 +46,19 @@ public class Admin extends BaseModel implements AftUser {
 	 * 所在省份
 	 */
 	private String				province;
+	/**
+	 * 职位
+	 */
+	private String				position;
+	
+
+	public String getPosition() {
+		return position;
+	}
+
+	public void setPosition(String position) {
+		this.position = position;
+	}
 
 	public String getId() {
 		return id;
@@ -124,7 +137,7 @@ public class Admin extends BaseModel implements AftUser {
 	public void setCreateTimeFormattedDate(String createTimeFormattedDate) {
 
 	}
-    
+
 	@JsonIgnore
 	@Override
 	public String getAid() {

+ 11 - 9
src/main/java/com/goafanti/common/model/AftUser.java

@@ -3,13 +3,15 @@ package com.goafanti.common.model;
 import java.util.Date;
 
 public interface AftUser {
-	 String getId();
-	 
-	 String getPassword();
-	 
-	 Date getCreateTime();
-	 
-	 String getAid();
-	 
-	 String getMobile();
+	String getId();
+
+	String getPassword();
+
+	Date getCreateTime();
+
+	String getAid();
+
+	String getMobile();
+
+	String getProvince();
 }

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

@@ -113,6 +113,21 @@ public class OrgCognizance {
 	 * 申请创建人
 	 */
 	private String	founder;
+	
+	/**
+	 * 高企技术负责人
+	 */
+	private String techPrincipal;
+	
+	
+
+	public String getTechPrincipal() {
+		return techPrincipal;
+	}
+
+	public void setTechPrincipal(String techPrincipal) {
+		this.techPrincipal = techPrincipal;
+	}
 
 	public String getFounder() {
 		return founder;

File diff suppressed because it is too large
+ 554 - 544
src/main/java/com/goafanti/common/model/OrganizationIdentity.java


+ 20 - 0
src/main/java/com/goafanti/common/model/User.java

@@ -62,6 +62,12 @@ public class User extends BaseModel implements AftUser{
      * 管理员ID
      */
     private String aid;
+    
+    /**
+     * 客户经理ID
+     */
+    private String mid;
+    
 
     public String getId() {
         return id;
@@ -143,6 +149,20 @@ public class User extends BaseModel implements AftUser{
 	public void setAid(String aid) {
 		this.aid = aid;
 	}
+	
+	public String getMid() {
+		return mid;
+	}
+
+	public void setMid(String mid) {
+		this.mid = mid;
+	}
+
+	@JsonIgnore
+	@Override
+	public String getProvince() {
+		return null;
+	}
     
     
     

+ 3 - 1
src/main/java/com/goafanti/common/task/PatentTask.java

@@ -1,5 +1,6 @@
 package com.goafanti.common.task;
 
+
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
 
@@ -13,6 +14,7 @@ public class PatentTask {
 	@Scheduled(cron = "0 0 10 * * ?")
 	public void run() {
 		LoggerUtils.debug(getClass(), "开始检查专利到期");
-		
 	}
+
+	
 }

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

@@ -127,6 +127,15 @@ public class TokenManager {
 	public static String getAdminId() {
 		return getToken() == null ? null : getToken().getId();
 	}
+	
+	/**
+	 * 
+	 * 获取当前管理员所在省份
+	 * @return
+	 */
+	public static String getProvince(){
+		return getToken() == null ? null : getToken().getProvince();
+	}
 
 	/**
 	 * 获取验证码,获取一次后删除

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

@@ -31,7 +31,7 @@ public class InputPatentInfo {
 	@Min(value = 0, message = "{" + ErrorConstants.PARAM_ERROR + "}")
 	private Integer	patentField;
 
-	@Size(min = 0, max = 45, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
+	@Size(min = 0, max = 128, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
 	private String	patentDes;
     
 	@Size(min = 0, max = 32, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
@@ -86,7 +86,7 @@ public class InputPatentInfo {
 	@Size(min = 0, max = 36, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
 	private String		principal;
 	
-	@Size(min = 0, max = 45, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
+	@Size(min = 0, max = 128, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
 	private String		comment;
 	
 	@Size(min = 0, max = 16, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")

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

@@ -27,6 +27,7 @@ import com.goafanti.common.enums.PatentInfoFields;
 import com.goafanti.common.enums.PatentInfoStatus;
 import com.goafanti.common.model.Admin;
 import com.goafanti.common.model.AftFile;
+import com.goafanti.common.model.OrganizationIdentity;
 import com.goafanti.common.model.PatentInfo;
 import com.goafanti.common.model.PatentLog;
 import com.goafanti.common.model.User;
@@ -62,6 +63,8 @@ public class PatentApiController extends CertifyApiController {
 	private UserService						userService;
 	@Resource
 	private AftFileService					aftFileService;
+	@Resource
+	private OrganizationIdentityService		organizationIdentityService;
 
 	@Value(value = "${upload.private.path}")
 	private String							uploadPrivatePath	= null;
@@ -83,10 +86,12 @@ public class PatentApiController extends CertifyApiController {
 		}
 
 		AttachmentType attachmentType = AttachmentType.getField(sign);
-		if (attachmentType == AttachmentType.PATENT_PRORY_STATEMENT || attachmentType == AttachmentType.PATENT_WRITING
+		if (attachmentType == AttachmentType.PATENT_WRITING
 				|| attachmentType == AttachmentType.AUTHORIZATION_NOTICE
 				|| attachmentType == AttachmentType.PATENT_CERTIFICATE) {
 			res.setData(handleFiles(res, "/patent/", true, req, sign, TokenManager.getUserId()));
+		} else if (attachmentType == AttachmentType.PATENT_PRORY_STATEMENT){
+			res.setData(handleFile(res, "/identity/", true, req, sign));
 		} else {
 			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "附件标示"));
 		}
@@ -122,7 +127,8 @@ public class PatentApiController extends CertifyApiController {
 				|| attachmentType == AttachmentType.AUTHORIZATION_NOTICE
 				|| attachmentType == AttachmentType.PATENT_CERTIFICATE) {
 			if (attachmentType == AttachmentType.PATENT_PRORY_STATEMENT) {
-				downloadFile(response, pi.getPatentProryStatementDownloadFileName(), pi.getPatentProryStatementUrl());
+				OrganizationIdentity oi = organizationIdentityService.selectOrgIdentityByUserId(pi.getUid());
+				downloadFile(response, oi.getPatentProryStatementDownloadFileName(), oi.getPatentProryStatementUrl());
 			} else if (attachmentType == AttachmentType.PATENT_WRITING) {
 				downloadFile(response, pi.getPatentWritingDownloadFileName(), pi.getPatentWritingUrl());
 			} else if (attachmentType == AttachmentType.AUTHORIZATION_NOTICE) {
@@ -297,17 +303,14 @@ public class PatentApiController extends CertifyApiController {
 	/**
 	 * 获取公司
 	 *//*
-	@RequestMapping(value = "/getUnitNames", method = RequestMethod.GET)
-	public Result getUnitNames() {
-		Result res = new Result();
-		List<OrganizationIdentity> list = organizationIdentityServivce.selectAllOrgIndentity();
-		Map<String, String> map = new TreeMap<String, String>();
-		for (OrganizationIdentity o : list) {
-			map.put(o.getUid(), o.getUnitName());
-		}
-		res.setData(map);
-		return res;
-	}*/
+		 * @RequestMapping(value = "/getUnitNames", method = RequestMethod.GET)
+		 * public Result getUnitNames() { Result res = new Result();
+		 * List<OrganizationIdentity> list =
+		 * organizationIdentityServivce.selectAllOrgIndentity(); Map<String,
+		 * String> map = new TreeMap<String, String>(); for
+		 * (OrganizationIdentity o : list) { map.put(o.getUid(),
+		 * o.getUnitName()); } res.setData(map); return res; }
+		 */
 
 	/**
 	 * 获取管理员

+ 1 - 1
src/main/java/com/goafanti/patent/service/PatentInfoService.java

@@ -24,7 +24,7 @@ public interface PatentInfoService {
 
 	Pagination<PatentManageListBo> getManagePatentList(Integer serialNumber, String patentNumber, String office,
 			String locationProvince, String unitName, Integer patentCatagory, String patentName, Integer patentState,
-			String[] createTime, String[] patentApplicationDate, String author, Integer pNo, Integer pSize);
+			String[] createTime, String[] patentApplicationDate, String author, String uid, Integer pNo, Integer pSize);
 
 	Pagination<PatentPendingBo> getManagePendingPaymentList(String locationProvince, Integer pNo, Integer pSize);
 

+ 21 - 8
src/main/java/com/goafanti/patent/service/impl/PatentInfoServiceImpl.java

@@ -17,6 +17,7 @@ import org.springframework.stereotype.Service;
 import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.dao.NoticeMapper;
 import com.goafanti.common.dao.OrgIntellectualPropertyMapper;
+import com.goafanti.common.dao.OrganizationIdentityMapper;
 import com.goafanti.common.dao.PatentCostMapper;
 import com.goafanti.common.dao.PatentInfoMapper;
 import com.goafanti.common.dao.PatentLogMapper;
@@ -29,6 +30,7 @@ import com.goafanti.common.enums.PatentInfoStatus;
 import com.goafanti.common.model.Admin;
 import com.goafanti.common.model.Notice;
 import com.goafanti.common.model.OrgIntellectualProperty;
+import com.goafanti.common.model.OrganizationIdentity;
 import com.goafanti.common.model.PatentCost;
 import com.goafanti.common.model.PatentInfo;
 import com.goafanti.common.model.PatentLog;
@@ -48,19 +50,21 @@ import com.goafanti.patent.service.PatentInfoService;
 @Service
 public class PatentInfoServiceImpl extends BaseMybatisDao<PatentInfoMapper> implements PatentInfoService {
 	@Autowired
-	PatentInfoMapper				patentInfoMapper;
+	private PatentInfoMapper				patentInfoMapper;
 	@Autowired
-	UserMapper						userMapper;
+	private UserMapper						userMapper;
 	@Autowired
-	PatentRegistrationMapper		patentRegistrationMapper;
+	private PatentRegistrationMapper		patentRegistrationMapper;
 	@Autowired
-	PatentCostMapper				patentCostMapper;
+	private PatentCostMapper				patentCostMapper;
 	@Autowired
-	PatentLogMapper					patentLogMapper;
+	private PatentLogMapper					patentLogMapper;
 	@Autowired
-	OrgIntellectualPropertyMapper	orgIntellectualPropertyMapper;
+	private OrgIntellectualPropertyMapper	orgIntellectualPropertyMapper;
 	@Autowired
-	NoticeMapper					noticeMapper;
+	private NoticeMapper					noticeMapper;
+	@Autowired
+	private OrganizationIdentityMapper		organizationIdentityMapper;
 
 	@Override
 	public PatentInfo insert(PatentInfo patentInfo) {
@@ -121,7 +125,7 @@ public class PatentInfoServiceImpl extends BaseMybatisDao<PatentInfoMapper> impl
 	@Override
 	public Pagination<PatentManageListBo> getManagePatentList(Integer serialNumber, String patentNumber, String office,
 			String locationProvince, String unitName, Integer patentCatagory, String patentName, Integer patentState,
-			String[] cDate, String[] pDate, String author, Integer pageNo, Integer pageSize) {
+			String[] cDate, String[] pDate, String author, String uid, Integer pageNo, Integer pageSize) {
 		Map<String, Object> params = new HashMap<>();
 		Date cStart = null;
 		Date cEnd = null;
@@ -202,6 +206,10 @@ public class PatentInfoServiceImpl extends BaseMybatisDao<PatentInfoMapper> impl
 			params.put("author", author);
 		}
 
+		if (uid != null && uid != "") {
+			params.put("uid", uid);
+		}
+
 		if (pageNo == null || pageNo < 0) {
 			pageNo = 1;
 		}
@@ -352,6 +360,11 @@ public class PatentInfoServiceImpl extends BaseMybatisDao<PatentInfoMapper> impl
 		log.setComment(patentInfo.getPatentDes());
 		patentLogMapper.insert(log);
 
+		if (!StringUtils.isBlank(patentInfo.getPatentProryStatementUrl())) {
+			OrganizationIdentity oi = organizationIdentityMapper.selectOrgIdentityByUserId(patentInfo.getUid());
+			oi.setPatentProryStatementUrl(patentInfo.getPatentProryStatementUrl());
+			organizationIdentityMapper.updateByPrimaryKeySelective(oi);
+		}
 		createNotice(patentInfo, log);
 		return patentInfo;
 	}

+ 8 - 1
src/main/java/com/goafanti/permission/service/impl/RoleServiceImpl.java

@@ -9,6 +9,7 @@ import java.util.Set;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.dao.RoleMapper;
 import com.goafanti.common.dao.RolePermissionMapper;
 import com.goafanti.common.dao.UserMapper;
@@ -42,7 +43,13 @@ public class RoleServiceImpl extends BaseMybatisDao<RoleMapper> implements RoleS
 
 	@Override
 	public List<RoleBo> findRoles() {
-		List<RolePermissionBo> res = roleMapper.findRolePermissions();
+		List<RolePermissionBo> res = null;
+		if (!TokenManager.hasRole(AFTConstants.SUPERADMIN)) {
+			 res = roleMapper.findRolePermissionsExceptAreaManager();
+		} else {
+			 res = roleMapper.findRolePermissions();
+		}
+		
 		Map<String, RoleBo> roleMap = new HashMap<>();
 		for (RolePermissionBo rp : res) {
 			RoleBo rb = roleMap.get(rp.getRid());

+ 2 - 2
src/main/java/com/goafanti/techproject/bo/InputTechProject.java

@@ -22,7 +22,7 @@ public class InputTechProject {
 	@Size(min = 0, max = 36, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
 	private String		department;
 
-	@Size(min = 0, max = 255, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
+	@Size(min = 0, max = 128, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
 	private String		dispatchInfo;
 
 	@Size(min = 0, max = 45, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
@@ -62,7 +62,7 @@ public class InputTechProject {
 	@Size(min = 0, max = 36, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
 	private String		principal;
 	
-	@Size(min = 0, max = 45, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
+	@Size(min = 0, max = 128, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
 	private String		comment;
 
 	public Integer getState() {

+ 26 - 0
src/main/java/com/goafanti/user/bo/AuditorOrgIdentityDetailBo.java

@@ -0,0 +1,26 @@
+package com.goafanti.user.bo;
+
+public class AuditorOrgIdentityDetailBo extends OrgIdentityDetailBo{
+	private String aid;
+	
+	private String mid;
+
+	public String getAid() {
+		return aid;
+	}
+
+	public void setAid(String aid) {
+		this.aid = aid;
+	}
+
+	public String getMid() {
+		return mid;
+	}
+
+	public void setMid(String mid) {
+		this.mid = mid;
+	}
+
+	
+	
+}

+ 29 - 0
src/main/java/com/goafanti/user/bo/AuditorUserIdentityDetailBo.java

@@ -0,0 +1,29 @@
+package com.goafanti.user.bo;
+
+import com.goafanti.common.model.UserIdentity;
+
+public class AuditorUserIdentityDetailBo extends UserIdentity{
+	private String aid;
+	
+	private String mid;
+
+	public String getAid() {
+		return aid;
+	}
+
+	public void setAid(String aid) {
+		this.aid = aid;
+	}
+
+	public String getMid() {
+		return mid;
+	}
+
+	public void setMid(String mid) {
+		this.mid = mid;
+	}
+
+	
+	
+
+}

+ 13 - 12
src/main/java/com/goafanti/user/bo/InputOrgBasicInfo.java

@@ -56,16 +56,16 @@ public class InputOrgBasicInfo {
 	private String		postcode;
 
 	/**
-	 * 联系人姓名
+	 * 联系人姓名(第一联系人)
 	 */
 	@Size(min = 0, max = 16, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
-	private String		contacts;
+	private String		firstContacts;
 
 	/**
-	 * 联系人手机
+	 * 联系人手机(第一联系人)
 	 */
 	@Size(min = 0, max = 16, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
-	private String		contactMobile;
+	private String		firstMobile;
 
 	/**
 	 * 联系人电话
@@ -317,20 +317,21 @@ public class InputOrgBasicInfo {
 		this.postcode = postcode;
 	}
 
-	public String getContacts() {
-		return contacts;
+
+	public String getFirstContacts() {
+		return firstContacts;
 	}
 
-	public void setContacts(String contacts) {
-		this.contacts = contacts;
+	public void setFirstContacts(String firstContacts) {
+		this.firstContacts = firstContacts;
 	}
 
-	public String getContactMobile() {
-		return contactMobile;
+	public String getFirstMobile() {
+		return firstMobile;
 	}
 
-	public void setContactMobile(String contactMobile) {
-		this.contactMobile = contactMobile;
+	public void setFirstMobile(String firstMobile) {
+		this.firstMobile = firstMobile;
 	}
 
 	public String getContactsFixedTel() {

+ 13 - 12
src/main/java/com/goafanti/user/bo/OrgBasicInfoBo.java

@@ -48,14 +48,14 @@ public class OrgBasicInfoBo {
 	private String postcode;
 	
 	/**
-	 * 联系人姓名
+	 * 联系人姓名(第一联系人)
 	 */
-	private String contacts;
+	private String firstContacts;
 	
 	/**
-	 * 联系人手机
+	 * 联系人手机(第一联系人)
 	 */
-	private String contactMobile;
+	private String firstMobile;
 	
 	/**
 	 * 联系人电话
@@ -269,20 +269,21 @@ public class OrgBasicInfoBo {
 		this.postcode = postcode;
 	}
 
-	public String getContacts() {
-		return contacts;
+
+	public String getFirstContacts() {
+		return firstContacts;
 	}
 
-	public void setContacts(String contacts) {
-		this.contacts = contacts;
+	public void setFirstContacts(String firstContacts) {
+		this.firstContacts = firstContacts;
 	}
 
-	public String getContactMobile() {
-		return contactMobile;
+	public String getFirstMobile() {
+		return firstMobile;
 	}
 
-	public void setContactMobile(String contactMobile) {
-		this.contactMobile = contactMobile;
+	public void setFirstMobile(String firstMobile) {
+		this.firstMobile = firstMobile;
 	}
 
 	public String getContactsFixedTel() {

+ 424 - 0
src/main/java/com/goafanti/user/bo/OrgIdentityDetailBo.java

@@ -0,0 +1,424 @@
+package com.goafanti.user.bo;
+
+import java.math.BigDecimal;
+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 OrgIdentityDetailBo {
+	private String		id;
+
+	private String		uid;
+
+	/**
+	 * 用户名
+	 */
+	private String		aftUsername;
+
+	/**
+	 * 单位名称
+	 */
+	private String		unitName;
+
+	/**
+	 * 身份类型
+	 */
+	private Integer		identityType;
+
+	/**
+	 * 第一联系人
+	 */
+	private String		firstContacts;
+
+	/**
+	 * 第一联系人电话
+	 */
+	private String		firstMobile;
+
+	/**
+	 * 第二联系人
+	 */
+	private String		secondContacts;
+
+	/**
+	 * 第二联系人电话
+	 */
+	private String		secondMobile;
+
+	/**
+	 * 第三联系人
+	 */
+	private String		thirdContacts;
+
+	/**
+	 * 第三联系人电话
+	 */
+	private String		thirdMobile;
+
+	/**
+	 * 法人
+	 */
+	private String		legalPerson;
+
+	/**
+	 * 法人身份证号
+	 */
+	private String		legalPersonIdCard;
+
+	/**
+	 * 注册时间
+	 */
+	private Date		registrationTime;
+
+	/**
+	 * 营业执照注册号
+	 */
+	private String		licenceNumber;
+
+	/**
+	 * 营业执照所在地--省
+	 */
+	private String		licenceProvince;
+
+	/**
+	 * 营业执照所在地-市
+	 */
+	private String		licenceCity;
+
+	/**
+	 * 营业执照所在地-区(县)
+	 */
+	private String		licenceArea;
+
+	/**
+	 * 营业执照副本扫描件URL
+	 */
+	private String		licenceScanningUrl;
+
+	/**
+	 * 组织机构代码证号码
+	 */
+	private String		orgCode;
+
+	/**
+	 * 组织机构代码证URL
+	 */
+	private String		orgCodeUrl;
+
+	/**
+	 * 开户行
+	 */
+	private String		banks;
+
+	/**
+	 * 开户行支行
+	 */
+	private String		bankBranch;
+
+	/**
+	 * 银行卡号
+	 */
+	private String		bankCardNumber;
+
+	/**
+	 * 开户行所在地-省
+	 */
+	private String		locationProvince;
+
+	/**
+	 * 开户行所在地-市
+	 */
+	private String		locationCity;
+
+	/**
+	 * 开户行所在地-区(县)
+	 */
+	private String		locationArea;
+
+	/**
+	 * 打入账内信息
+	 */
+	private BigDecimal	validationAmount;
+
+	/**
+	 * 打款日期
+	 */
+	private Date		paymentDate;
+
+	/**
+	 * 审核状态
+	 */
+	private Integer		auditStatus;
+	/**
+	 * 上年度纳税报表
+	 */
+	private String		lastYearTaxReportUrl;
+
+	public String getLastYearTaxReportUrl() {
+		return lastYearTaxReportUrl;
+	}
+
+	public void setLastYearTaxReportUrl(String lastYearTaxReportUrl) {
+		this.lastYearTaxReportUrl = lastYearTaxReportUrl;
+	}
+
+	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 String getAftUsername() {
+		return aftUsername;
+	}
+
+	public void setAftUsername(String aftUsername) {
+		this.aftUsername = aftUsername;
+	}
+
+	public String getUnitName() {
+		return unitName;
+	}
+
+	public void setUnitName(String unitName) {
+		this.unitName = unitName;
+	}
+
+	@JsonFormat(shape = Shape.STRING)
+	public Integer getIdentityType() {
+		return identityType;
+	}
+
+	public void setIdentityType(Integer identityType) {
+		this.identityType = identityType;
+	}
+
+	public String getFirstMobile() {
+		return firstMobile;
+	}
+
+	public void setFirstMobile(String firstMobile) {
+		this.firstMobile = firstMobile;
+	}
+
+	public String getSecondContacts() {
+		return secondContacts;
+	}
+
+	public void setSecondContacts(String secondContacts) {
+		this.secondContacts = secondContacts;
+	}
+
+	public String getSecondMobile() {
+		return secondMobile;
+	}
+
+	public void setSecondMobile(String secondMobile) {
+		this.secondMobile = secondMobile;
+	}
+
+	public String getThirdContacts() {
+		return thirdContacts;
+	}
+
+	public void setThirdContacts(String thirdContacts) {
+		this.thirdContacts = thirdContacts;
+	}
+
+	public String getThirdMobile() {
+		return thirdMobile;
+	}
+
+	public void setThirdMobile(String thirdMobile) {
+		this.thirdMobile = thirdMobile;
+	}
+
+	public String getLegalPerson() {
+		return legalPerson;
+	}
+
+	public void setLegalPerson(String legalPerson) {
+		this.legalPerson = legalPerson;
+	}
+
+	public String getLegalPersonIdCard() {
+		return legalPersonIdCard;
+	}
+
+	public void setLegalPersonIdCard(String legalPersonIdCard) {
+		this.legalPersonIdCard = legalPersonIdCard;
+	}
+
+	public Date getRegistrationTime() {
+		return registrationTime;
+	}
+
+	public void setRegistrationTime(Date registrationTime) {
+		this.registrationTime = registrationTime;
+	}
+
+	public String getLicenceNumber() {
+		return licenceNumber;
+	}
+
+	public void setLicenceNumber(String licenceNumber) {
+		this.licenceNumber = licenceNumber;
+	}
+
+	public String getLicenceProvince() {
+		return licenceProvince;
+	}
+
+	public void setLicenceProvince(String licenceProvince) {
+		this.licenceProvince = licenceProvince;
+	}
+
+	public String getLicenceCity() {
+		return licenceCity;
+	}
+
+	public void setLicenceCity(String licenceCity) {
+		this.licenceCity = licenceCity;
+	}
+
+	public String getLicenceArea() {
+		return licenceArea;
+	}
+
+	public void setLicenceArea(String licenceArea) {
+		this.licenceArea = licenceArea;
+	}
+
+	public String getLicenceScanningUrl() {
+		return licenceScanningUrl;
+	}
+
+	public void setLicenceScanningUrl(String licenceScanningUrl) {
+		this.licenceScanningUrl = licenceScanningUrl;
+	}
+
+	public String getOrgCode() {
+		return orgCode;
+	}
+
+	public void setOrgCode(String orgCode) {
+		this.orgCode = orgCode;
+	}
+
+	public String getOrgCodeUrl() {
+		return orgCodeUrl;
+	}
+
+	public void setOrgCodeUrl(String orgCodeUrl) {
+		this.orgCodeUrl = orgCodeUrl;
+	}
+
+	public String getBanks() {
+		return banks;
+	}
+
+	public void setBanks(String banks) {
+		this.banks = banks;
+	}
+
+	public String getBankBranch() {
+		return bankBranch;
+	}
+
+	public void setBankBranch(String bankBranch) {
+		this.bankBranch = bankBranch;
+	}
+
+	public String getBankCardNumber() {
+		return bankCardNumber;
+	}
+
+	public void setBankCardNumber(String bankCardNumber) {
+		this.bankCardNumber = bankCardNumber;
+	}
+
+	public String getLocationProvince() {
+		return locationProvince;
+	}
+
+	public void setLocationProvince(String locationProvince) {
+		this.locationProvince = locationProvince;
+	}
+
+	public String getLocationCity() {
+		return locationCity;
+	}
+
+	public void setLocationCity(String locationCity) {
+		this.locationCity = locationCity;
+	}
+
+	public String getLocationArea() {
+		return locationArea;
+	}
+
+	public void setLocationArea(String locationArea) {
+		this.locationArea = locationArea;
+	}
+
+	public BigDecimal getValidationAmount() {
+		return validationAmount;
+	}
+
+	public void setValidationAmount(BigDecimal validationAmount) {
+		this.validationAmount = validationAmount;
+	}
+
+	public Date getPaymentDate() {
+		return paymentDate;
+	}
+
+	public void setPaymentDate(Date paymentDate) {
+		this.paymentDate = paymentDate;
+	}
+
+	@JsonFormat(shape = Shape.STRING)
+	public Integer getAuditStatus() {
+		return auditStatus;
+	}
+
+	public void setAuditStatus(Integer auditStatus) {
+		this.auditStatus = auditStatus;
+	}
+
+	public String getFirstContacts() {
+		return firstContacts;
+	}
+
+	public void setFirstContacts(String firstContacts) {
+		this.firstContacts = firstContacts;
+	}
+
+	// 打款日期
+	public String getPaymentDateFormattedDate() {
+		if (this.paymentDate == null) {
+			return null;
+		} else {
+			return DateFormatUtils.format(this.getPaymentDate(), AFTConstants.YYYYMMDD);
+		}
+	}
+
+	public void setPaymentDateFormattedDate(String paymentDateFormattedDate) {
+
+	}
+
+}

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

@@ -28,6 +28,18 @@ public class OrgListBo {
     private String unitName;
     
     private Integer type;
+    
+    private String managerName;
+    
+    
+
+	public String getManagerName() {
+		return managerName;
+	}
+
+	public void setManagerName(String managerName) {
+		this.managerName = managerName;
+	}
 
 	public String getId() {
 		return id;

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

@@ -27,6 +27,8 @@ public class UserListBo {
     
     private String adminName;
     
+    private String managerName;
+    
     
 	public String getId() {
 		return id;
@@ -93,6 +95,16 @@ public class UserListBo {
 	public void setAdminName(String adminName) {
 		this.adminName = adminName;
 	}
+	
+	
+
+	public String getManagerName() {
+		return managerName;
+	}
+
+	public void setManagerName(String managerName) {
+		this.managerName = managerName;
+	}
 
 	//注册时间
 	public String getCreateTimeFormattedDate(){

+ 9 - 1
src/main/java/com/goafanti/user/service/OrganizationIdentityService.java

@@ -6,8 +6,10 @@ import java.util.Map;
 import com.goafanti.common.bo.Result;
 import com.goafanti.common.model.OrgHumanResource;
 import com.goafanti.common.model.OrganizationIdentity;
+import com.goafanti.user.bo.AuditorOrgIdentityDetailBo;
 import com.goafanti.user.bo.OrgBasicInfoBo;
 import com.goafanti.user.bo.OrgIdentityBo;
+import com.goafanti.user.bo.OrgIdentityDetailBo;
 import com.goafanti.user.bo.OrgUnitNames;
 
 public interface OrganizationIdentityService {
@@ -30,12 +32,18 @@ public interface OrganizationIdentityService {
 
 	int saveOrgIndentityProcess(Result res, OrganizationIdentity o, String uid);
 
-	int updateOrgDetail(OrganizationIdentity orgIdentity);
+	int updateOrgDetail(OrganizationIdentity orgIdentity, String aid, String mid);
 
 	OrgBasicInfoBo selectBasicInfo(String uid, int year);
 
 	int saveBasicInfo(OrganizationIdentity oi, OrgHumanResource ohr);
 
+	OrgIdentityDetailBo selectOrgIdentityDetailByUserId(String uid);
+
+	AuditorOrgIdentityDetailBo selectAuditorOrgIdentityDetailByUserId(String uid);
+
+	OrganizationIdentity insertByAdmin(OrganizationIdentity oi, String aid, String mid);
+
 
 
 	

+ 7 - 1
src/main/java/com/goafanti/user/service/UserIdentityService.java

@@ -2,6 +2,7 @@ package com.goafanti.user.service;
 
 import com.goafanti.common.bo.Result;
 import com.goafanti.common.model.UserIdentity;
+import com.goafanti.user.bo.AuditorUserIdentityDetailBo;
 import com.goafanti.user.bo.UserIdentityBo;
 
 public interface UserIdentityService {
@@ -18,7 +19,12 @@ public interface UserIdentityService {
 
 	int  saveUserIdentityProcess(Result res, UserIdentity u, String uid);
 
-	int updateUserDetail(UserIdentity userIdentity);
+	int updateUserDetail(UserIdentity userIdentity, String aid, String mid);
+
+	UserIdentity insertByAdmin(UserIdentity ui, String aid, String mid);
+
+	AuditorUserIdentityDetailBo selectAuditorUserIdentityByUserId(String uid);
+
 
 
 }

+ 147 - 18
src/main/java/com/goafanti/user/service/impl/OrganizationIdentityServiceImpl.java

@@ -12,19 +12,28 @@ import org.springframework.stereotype.Service;
 
 import com.goafanti.common.bo.Result;
 import com.goafanti.common.constant.AFTConstants;
+import com.goafanti.common.dao.NoticeMapper;
 import com.goafanti.common.dao.OrgHumanResourceMapper;
 import com.goafanti.common.dao.OrgRatepayMapper;
 import com.goafanti.common.dao.OrganizationIdentityMapper;
 import com.goafanti.common.dao.UserMapper;
+import com.goafanti.common.dao.UserRoleMapper;
 import com.goafanti.common.enums.DeleteStatus;
+import com.goafanti.common.enums.IdentityAuditStatus;
+import com.goafanti.common.enums.NoticeReadStatus;
+import com.goafanti.common.enums.NoticeStatus;
+import com.goafanti.common.enums.UserLevel;
+import com.goafanti.common.model.Notice;
 import com.goafanti.common.model.OrgHumanResource;
 import com.goafanti.common.model.OrgRatepay;
 import com.goafanti.common.model.OrganizationIdentity;
 import com.goafanti.common.model.User;
 import com.goafanti.core.mybatis.BaseMybatisDao;
 import com.goafanti.core.shiro.token.TokenManager;
+import com.goafanti.user.bo.AuditorOrgIdentityDetailBo;
 import com.goafanti.user.bo.OrgBasicInfoBo;
 import com.goafanti.user.bo.OrgIdentityBo;
+import com.goafanti.user.bo.OrgIdentityDetailBo;
 import com.goafanti.user.bo.OrgUnitNames;
 import com.goafanti.user.service.OrganizationIdentityService;
 
@@ -38,7 +47,11 @@ public class OrganizationIdentityServiceImpl extends BaseMybatisDao<Organization
 	@Autowired
 	private UserMapper					userMapper;
 	@Autowired
-	private OrgHumanResourceMapper orgHumanResourceMapper;
+	private OrgHumanResourceMapper		orgHumanResourceMapper;
+	@Autowired
+	private NoticeMapper				noticeMapper;
+	@Autowired
+	private UserRoleMapper				userRoleMapper;
 
 	@Override
 	public OrganizationIdentity insert(OrganizationIdentity organizationIdentity) {
@@ -112,7 +125,7 @@ public class OrganizationIdentityServiceImpl extends BaseMybatisDao<Organization
 				userMapper.updateByPrimaryKeySelective(u);
 				Calendar now = Calendar.getInstance();
 				if (null != o.getLastYearTaxReportUrl()
-						&& null == orgRatepayMapper.selectRatepayByUidAndYear(uid, now.get(Calendar.YEAR)-1)) {
+						&& null == orgRatepayMapper.selectRatepayByUidAndYear(uid, now.get(Calendar.YEAR) - 1)) {
 					OrgRatepay r = new OrgRatepay();
 					r.setId(UUID.randomUUID().toString());
 					r.setUid(uid);
@@ -127,27 +140,47 @@ public class OrganizationIdentityServiceImpl extends BaseMybatisDao<Organization
 	}
 
 	@Override
-	public int updateOrgDetail(OrganizationIdentity orgIdentity) {
-		if (null != orgIdentity.getAuditStatus() && 5 == orgIdentity.getAuditStatus() && !StringUtils.isBlank(orgIdentity.getUid())) {
+	public int updateOrgDetail(OrganizationIdentity orgIdentity, String aid, String mid) {
+		if (null != orgIdentity.getAuditStatus() && 5 == orgIdentity.getAuditStatus()
+				&& !StringUtils.isBlank(orgIdentity.getUid())) {
 			User u = new User();
 			u.setId(orgIdentity.getUid());
-			u.setLvl(1);
+			u.setLvl(UserLevel.CERTIFIED.getCode());
 			userMapper.updateByPrimaryKeySelective(u);
-			
 
 			Calendar cal = Calendar.getInstance();
-			if (null != orgIdentity.getLastYearTaxReportUrl()
-					&& null == orgRatepayMapper.selectRatepayByUidAndYear(orgIdentity.getUid(), Calendar.YEAR - 1)) {
-				OrgRatepay r = new OrgRatepay();
-				r.setId(UUID.randomUUID().toString());
-				r.setUid(orgIdentity.getUid());
-				r.setYear(cal.get(Calendar.YEAR) - 1);
-				r.setDeletedSign(0);
-				r.setTaxReturnUrl(orgIdentity.getLastYearTaxReportUrl());
-				orgRatepayMapper.insert(r);
+			if (null != orgIdentity.getLastYearTaxReportUrl()) {
+				OrgRatepay rate = orgRatepayMapper.selectRatepayByUidAndYear(orgIdentity.getUid(), Calendar.YEAR - 1);
+				if (null == rate) {
+					OrgRatepay r = new OrgRatepay();
+					r.setId(UUID.randomUUID().toString());
+					r.setUid(orgIdentity.getUid());
+					r.setYear(cal.get(Calendar.YEAR) - 1);
+					r.setDeletedSign(0);
+					r.setTaxReturnUrl(orgIdentity.getLastYearTaxReportUrl());
+					orgRatepayMapper.insert(r);
+				} else {
+					rate.setTaxReturnUrl(orgIdentity.getLastYearTaxReportUrl());
+					orgRatepayMapper.updateByPrimaryKeySelective(rate);
+				}
 			}
 		}
+		User user = userMapper.selectByPrimaryKey(orgIdentity.getUid());
+		if (!TokenManager.hasRole(AFTConstants.AUDITORADMIN) && !TokenManager.hasRole(AFTConstants.SUPERADMIN)){
+			user.setAid(TokenManager.getAdminId());
+			createAuditorNotice(user);
+		} else {
+			if (!StringUtils.isBlank(aid)){
+				user.setAid(aid);
+			}
+			if (!StringUtils.isBlank(mid)){
+				user.setMid(mid);
+			}
+			createNotice(user, orgIdentity.getAuditStatus());
+		}
+		userMapper.updateByPrimaryKeySelective(user);
 		return organizationIdentityMapper.updateByPrimaryKeySelective(orgIdentity);
+
 	}
 
 	@Override
@@ -157,14 +190,14 @@ public class OrganizationIdentityServiceImpl extends BaseMybatisDao<Organization
 
 	@Override
 	public int saveBasicInfo(OrganizationIdentity oi, OrgHumanResource ohr) {
-		if (StringUtils.isBlank(oi.getId())){
+		if (StringUtils.isBlank(oi.getId())) {
 			oi.setId(UUID.randomUUID().toString());
 			organizationIdentityMapper.insert(oi);
 		} else {
 			organizationIdentityMapper.updateByPrimaryKeySelective(oi);
 		}
-		
-		if (StringUtils.isBlank(ohr.getId())){
+
+		if (StringUtils.isBlank(ohr.getId())) {
 			ohr.setId(UUID.randomUUID().toString());
 			ohr.setDeletedSign(DeleteStatus.UNDELETE.getCode());
 			Calendar now = Calendar.getInstance();
@@ -176,4 +209,100 @@ public class OrganizationIdentityServiceImpl extends BaseMybatisDao<Organization
 		return 1;
 	}
 
+	@Override
+	public OrgIdentityDetailBo selectOrgIdentityDetailByUserId(String uid) {
+		return organizationIdentityMapper.selectOrgIdentityDetailByUserId(uid);
+	}
+
+	@Override
+	public AuditorOrgIdentityDetailBo selectAuditorOrgIdentityDetailByUserId(String uid) {
+		return organizationIdentityMapper.selectAuditorOrgIdentityDetailByUserId(uid);
+	}
+
+	@Override
+	public OrganizationIdentity insertByAdmin(OrganizationIdentity oi, String aid, String mid) {
+		organizationIdentityMapper.insert(oi);
+		User u = userMapper.selectByPrimaryKey(oi.getUid());
+		if (!TokenManager.hasRole(AFTConstants.AUDITORADMIN) && !TokenManager.hasRole(AFTConstants.SUPERADMIN)) {
+			u.setAid(TokenManager.getAdminId());
+			userMapper.updateByPrimaryKeySelective(u);
+			createAuditorNotice(u);
+		}
+		if (TokenManager.hasRole(AFTConstants.AUDITORADMIN) || TokenManager.hasRole(AFTConstants.SUPERADMIN)) {
+			u.setAid(aid);
+			u.setMid(mid);
+			if (IdentityAuditStatus.PASSED.getCode() == oi.getAuditStatus()) {
+				u.setLvl(UserLevel.CERTIFIED.getCode());
+			}
+			userMapper.updateByPrimaryKeySelective(u);
+			createNotice(u, oi.getAuditStatus());
+		}
+		return null;
+	}
+
+	// 给业务员及客户经理发送通知
+	private void createNotice(User u, Integer status) {
+		if (!StringUtils.isBlank(u.getAid())) {
+			Notice n = new Notice();
+			n.setPid(u.getAid());
+			n.setAid(u.getAid());
+			notice(n, status);
+		}
+
+		if (!StringUtils.isBlank(u.getMid())) {
+			Notice n = new Notice();
+			notice(n, status);
+		}
+
+	}
+
+	// 给所有审核员发送审核通知
+	private void createAuditorNotice(User u) {
+		List<String> ids = userRoleMapper.listAuditor();
+		if (ids.size() > 0 && null != ids) {
+			for (String s : ids) {
+				Notice n = new Notice();
+				Calendar now = Calendar.getInstance();
+				now.set(Calendar.MILLISECOND, 0);
+				n.setId(UUID.randomUUID().toString());
+				n.setCreateTime(now.getTime());
+				n.setReaded(NoticeReadStatus.UNREAD.getCode());
+
+				if (null != u) {
+					n.setPid(u.getAid());
+				}
+
+				n.setAid(s);
+				n.setContent(NoticeStatus.CERTIFY.getDesc() + " " + IdentityAuditStatus.COMMITTED.getDesc());
+				n.setNoticeType(NoticeStatus.CERTIFY.getCode());
+				noticeMapper.insert(n);
+			}
+		}
+	}
+
+	private void notice(Notice n, Integer status) {
+		Calendar now = Calendar.getInstance();
+		now.set(Calendar.MILLISECOND, 0);
+		n.setId(UUID.randomUUID().toString());
+		n.setCreateTime(now.getTime());
+		n.setReaded(NoticeReadStatus.UNREAD.getCode());
+		String content = NoticeStatus.CERTIFY.getDesc();
+		if (IdentityAuditStatus.UNCOMMITTED.getCode() == status) {
+			content = content + " " + IdentityAuditStatus.UNCOMMITTED.getDesc();
+		} else if (IdentityAuditStatus.COMMITTED.getCode() == status) {
+			content = content + " " + IdentityAuditStatus.COMMITTED.getDesc();
+		} else if (IdentityAuditStatus.UNPAID.getCode() == status) {
+			content = content + " " + IdentityAuditStatus.UNPAID.getDesc();
+		} else if (IdentityAuditStatus.PAID.getCode() == status) {
+			content = content + " " + IdentityAuditStatus.PAID.getDesc();
+		} else if (IdentityAuditStatus.PASSED.getCode() == status) {
+			content = content + " " + IdentityAuditStatus.PASSED.getDesc();
+		} else {
+			content = content + " " + IdentityAuditStatus.NOTPASSED.getDesc();
+		}
+		n.setContent(content);
+		n.setNoticeType(NoticeStatus.CERTIFY.getCode());
+		noticeMapper.insert(n);
+	}
+
 }

+ 128 - 4
src/main/java/com/goafanti/user/service/impl/UserIdentityServiceImpl.java

@@ -1,5 +1,7 @@
 package com.goafanti.user.service.impl;
 
+import java.util.Calendar;
+import java.util.List;
 import java.util.UUID;
 
 import org.apache.commons.lang3.StringUtils;
@@ -7,19 +9,34 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import com.goafanti.common.bo.Result;
+import com.goafanti.common.constant.AFTConstants;
+import com.goafanti.common.dao.NoticeMapper;
 import com.goafanti.common.dao.UserIdentityMapper;
 import com.goafanti.common.dao.UserMapper;
+import com.goafanti.common.dao.UserRoleMapper;
+import com.goafanti.common.enums.IdentityAuditStatus;
+import com.goafanti.common.enums.NoticeReadStatus;
+import com.goafanti.common.enums.NoticeStatus;
+import com.goafanti.common.enums.UserLevel;
+import com.goafanti.common.model.Notice;
 import com.goafanti.common.model.User;
 import com.goafanti.common.model.UserIdentity;
+import com.goafanti.core.shiro.token.TokenManager;
+import com.goafanti.user.bo.AuditorUserIdentityDetailBo;
 import com.goafanti.user.bo.UserIdentityBo;
 import com.goafanti.user.service.UserIdentityService;
 
 @Service
 public class UserIdentityServiceImpl implements UserIdentityService{
 	@Autowired
-	UserIdentityMapper userIdentityMapper;
+	private UserIdentityMapper userIdentityMapper;
 	@Autowired
-	UserMapper userMapper;
+	private UserMapper userMapper;
+	@Autowired
+	private UserRoleMapper userRoleMapper;
+	@Autowired
+	private NoticeMapper noticeMapper;
+	
 	
 	@Override
 	public UserIdentity selectUserIdentityByUserId(String uid) {
@@ -69,14 +86,121 @@ public class UserIdentityServiceImpl implements UserIdentityService{
 	}
 
 	@Override
-	public int updateUserDetail(UserIdentity u) {
+	public int updateUserDetail(UserIdentity u, String aid, String mid) {
 		if (null != u.getAuditStatus() && 5 == u.getAuditStatus() && !StringUtils.isBlank(u.getUid())){
 			User user = new User();
 			user.setId(u.getUid());
-			user.setLvl(1);
+			user.setLvl(UserLevel.CERTIFIED.getCode());
 			userMapper.updateByPrimaryKeySelective(user);
 		} 
+		User user = userMapper.selectByPrimaryKey(u.getUid());
+		if (!TokenManager.hasRole(AFTConstants.AUDITORADMIN) && !TokenManager.hasRole(AFTConstants.SUPERADMIN)){
+			user.setAid(TokenManager.getAdminId());
+			createAuditorNotice(user);
+		} else {
+			if (!StringUtils.isBlank(aid)){
+				user.setAid(aid);
+			}
+			if (!StringUtils.isBlank(mid)){
+				user.setMid(mid);
+			}
+			createNotice(user, u.getAuditStatus());
+		}
+		userMapper.updateByPrimaryKeySelective(user);
 		return userIdentityMapper.updateByPrimaryKeySelective(u);
 	}
 
+	@Override
+	public UserIdentity insertByAdmin(UserIdentity ui, String aid, String mid) {
+		userIdentityMapper.insert(ui);
+		User u = userMapper.selectByPrimaryKey(ui.getUid());
+		if (!TokenManager.hasRole(AFTConstants.AUDITORADMIN) && !TokenManager.hasRole(AFTConstants.SUPERADMIN)){
+			u.setAid(TokenManager.getAdminId());
+			userMapper.updateByPrimaryKeySelective(u);
+			createAuditorNotice(u);
+		}
+		if (TokenManager.hasRole(AFTConstants.AUDITORADMIN) || TokenManager.hasRole(AFTConstants.SUPERADMIN)){
+			u.setAid(aid);
+			u.setMid(mid);
+			if (IdentityAuditStatus.PASSED.getCode() == ui.getAuditStatus()){
+				u.setLvl(UserLevel.CERTIFIED.getCode());
+			}
+			userMapper.updateByPrimaryKeySelective(u);
+			createNotice(u, ui.getAuditStatus());
+		}
+		return ui;
+	}
+	
+	//给业务员及客户经理发送通知
+	private void createNotice(User u, Integer status){
+		if (!StringUtils.isBlank(u.getAid())){
+			Notice n = new Notice();
+			n.setPid(u.getAid());
+			n.setAid(u.getAid());
+			notice(n, status);
+		}
+		
+		if (!StringUtils.isBlank(u.getMid())){
+			Notice n = new Notice();
+			notice(n, status);
+		}
+		
+		
+	}
+	
+	//给所有审核员发送审核通知
+	private void createAuditorNotice(User u){
+		List<String> ids = userRoleMapper.listAuditor();
+		if (ids.size() > 0 && null != ids){
+			for (String s : ids){
+				Notice n = new Notice();
+				Calendar now = Calendar.getInstance();
+				now.set(Calendar.MILLISECOND, 0);
+				n.setId(UUID.randomUUID().toString());
+				n.setCreateTime(now.getTime());
+				n.setReaded(NoticeReadStatus.UNREAD.getCode());
+				
+				if (null != u) {
+					n.setPid(u.getAid());
+				}
+				
+				n.setAid(s);
+				n.setContent(NoticeStatus.CERTIFY.getDesc() + " " + IdentityAuditStatus.COMMITTED.getDesc());
+				n.setNoticeType(NoticeStatus.CERTIFY.getCode());
+				noticeMapper.insert(n);
+			}
+		}
+	}
+
+	@Override
+	public AuditorUserIdentityDetailBo selectAuditorUserIdentityByUserId(String uid) {
+		return userIdentityMapper.selectAuditorUserIdentityByUserId(uid);
+	}
+	
+	private void notice(Notice n, Integer status){
+		Calendar now = Calendar.getInstance();
+		now.set(Calendar.MILLISECOND, 0);
+		n.setId(UUID.randomUUID().toString());
+		n.setCreateTime(now.getTime());
+		n.setReaded(NoticeReadStatus.UNREAD.getCode());
+		String content = NoticeStatus.CERTIFY.getDesc();
+		if (IdentityAuditStatus.UNCOMMITTED.getCode() == status){
+			content = content + " " + IdentityAuditStatus.UNCOMMITTED.getDesc();
+		} else if (IdentityAuditStatus.COMMITTED.getCode() == status){
+			content = content + " " + IdentityAuditStatus.COMMITTED.getDesc();
+		} else if (IdentityAuditStatus.UNPAID.getCode() == status){
+			content = content + " " + IdentityAuditStatus.UNPAID.getDesc();
+		} else if (IdentityAuditStatus.PAID.getCode() == status){
+			content = content + " " + IdentityAuditStatus.PAID.getDesc();
+		} else if(IdentityAuditStatus.PASSED.getCode() == status){
+			content = content + " " + IdentityAuditStatus.PASSED.getDesc();
+		} else {
+			content = content + " " + IdentityAuditStatus.NOTPASSED.getDesc();
+		}
+		n.setContent(content);
+		n.setNoticeType(NoticeStatus.CERTIFY.getCode());
+		noticeMapper.insert(n);
+	}
+
+
 }

+ 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.23
+static.host=//afts.hnzhiming.com/1.0.24
 
 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.23
+static.host=//afts.hnzhiming.com/1.0.24
 
 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.23
+static.host=//afts.hnzhiming.com/1.0.24

+ 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.23
+static.host=//aftts.hnzhiming.com/1.0.24
 
 upload.path=/data/aft/public/upload
 upload.private.path=/data/aft/private/upload

+ 11 - 0
src/main/webapp/WEB-INF/views/admin/servicesManage/highTechInfo.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/highTechInfo.css" rel="stylesheet">
+</head>
+<body>
+	<div id="root"></div>
+	<script type="text/javascript" src="${staticHost}/admin/servicesManage/highTechInfo.js"></script>
+</body>
+</html>

+ 12 - 1
src/main/webapp/WEB-INF/views/header.jsp

@@ -62,6 +62,9 @@
 	window.showOrgList = true;
 	window.showUserList = true;
 	window.showOrgList = true;
+	window.showPermissionList = true;
+	window.showRoleList = true;
+	window.showAuditStatus = true;
 	</shiro:hasRole>
 
 	<shiro:hasPermission name="admin/userManage">
@@ -88,6 +91,14 @@
 	<shiro:hasPermission name="api/admin/orgList">
 	window.showOrgList = true;
 	</shiro:hasPermission>
-	
+	<shiro:hasPermission name="api/admin/permissionList">
+	window.showPermissionList = true;
+	</shiro:hasPermission>
+	<shiro:hasPermission name="api/admin/roleList">
+	window.showRoleList = true;
+	</shiro:hasPermission>
+	<shiro:hasPermission name="api/admin/auditStatus">
+	window.showAuditStatus = true;
+	</shiro:hasPermission>
 </script>
 <script type="text/javascript" src="${staticHost}/vendors.js"></script>