Antiloveg %!s(int64=8) %!d(string=hai) anos
pai
achega
d13f0e88ac

+ 22 - 0
schema/2017-05-04.sql

@@ -0,0 +1,22 @@
+
+alter table `patent_info`
+MODIFY COLUMN  `patent_name` VARCHAR(64) NULL COMMENT '专利名称';
+
+alter table `patent_info`
+MODIFY COLUMN  `author` VARCHAR(36) NULL COMMENT '专利资料撰写人';
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

+ 1 - 1
schema/permission.sql

@@ -372,7 +372,7 @@ values
 
 insert into `permission`(`id`, `url`, `name`) 
 values
-(UUID(), 'api/admin/api/admin/auditStatus', '用户认证--获取认证下拉'),
+(UUID(), 'api/admin/auditStatus', '用户认证--获取认证下拉'),
 (UUID(), 'api/admin/userCertify/upload', '用户认证--上传认证资料(营业执照图片、组织机构代码证图片、上年度纳税申报表)'),
 (UUID(), 'api/admin/userCertify/userDetail', '用户认证--个人用户详情(审核员)'),
 (UUID(), 'api/admin/userCertify/updateUserDetail', '用户认证--审核个人用户信息(审核员)'),

+ 2 - 1
schema/role_init.sql

@@ -1,4 +1,5 @@
 INSERT INTO `role` (`id`, `role_name`, `role_type`) 
 VALUES ('1', '超级管理员', '999999'),
 VALUES ('2', '地区管理员', '99999'),
-VALUES ('3', '审核员', '9999');
+VALUES ('3', '审核员', '9999'),
+VALUES ('4', '客户经理', '9');

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

@@ -1,10 +1,24 @@
 package com.goafanti.admin.controller;
 
+
 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;
+
 @RestController
 @RequestMapping(value = "/api/admin/homePage")
 public class AdminHomePageApiController {
-
+	/**
+	 * 首页业务数量统计(进行中/已完成)
+	 * @return
+	 */
+	@RequestMapping(value = "/count", method = RequestMethod.GET)
+	public Result count(){
+		Result res = new Result();
+		//Map<String, Integer> map = new TreeMap<String, Integer>();
+		
+		return res;
+	}
 }

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

@@ -2,6 +2,9 @@ package com.goafanti.admin.controller;
 
 import java.text.ParseException;
 import java.util.Calendar;
+import java.util.List;
+import java.util.Map;
+import java.util.TreeMap;
 import java.util.UUID;
 
 import javax.annotation.Resource;
@@ -15,6 +18,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RestController;
 
+import com.goafanti.admin.service.AdminService;
 import com.goafanti.common.bo.Result;
 import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.constant.ErrorConstants;
@@ -24,6 +28,7 @@ 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.Admin;
 import com.goafanti.common.model.OrganizationIdentity;
 import com.goafanti.common.model.UserIdentity;
 import com.goafanti.common.utils.DateUtils;
@@ -37,9 +42,33 @@ import com.goafanti.user.service.UserIdentityService;
 public class AdminUserCertifyApiController extends CertifyApiController {
 	@Resource
 	private UserIdentityService			userIdentityService;
-
 	@Resource
 	private OrganizationIdentityService	organizationIdentityService;
+	@Resource
+	private AdminService adminService;
+	
+	/**
+	 * 审核员--获取客户经理下拉
+	 */
+	@RequestMapping(value = "/accountManager", method = RequestMethod.GET)
+	public Result getAccountManager(){
+		Result res = new Result();
+		List<Admin> list = adminService.selectAccoutManager();
+		res.setData(disposeAdminList(list));
+		return res;
+	}
+	
+	/**
+	 * 审核员--获取业务员(技术员)下拉
+	 * @return
+	 */
+	@RequestMapping(value = "/technician", method = RequestMethod.GET)
+	public Result getTechnician(){
+		Result res = new Result();
+		List<Admin> list = adminService.selectTechnician();
+		res.setData(disposeAdminList(list));
+		return res;
+	}
 
 	/**
 	 * 上传认证资料(营业执照图片、组织机构代码证图片、上年度纳税申报表)
@@ -236,4 +265,12 @@ public class AdminUserCertifyApiController extends CertifyApiController {
 		}
 		return res;
 	}
+	
+	private Map<String, String> disposeAdminList(List<Admin> list){
+		Map<String, String> map = new TreeMap<String, String>();
+		for (Admin o : list) {
+			map.put(o.getId(), o.getName()+ " " + (null == o.getPosition() ? "" : o.getPosition()));
+		}
+		return map;
+	}
 }

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

@@ -45,4 +45,8 @@ public interface AdminService {
 
 	List<String> listAuditor();
 
+	List<Admin> selectAccoutManager();
+
+	List<Admin> selectTechnician();
+
 }

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

@@ -164,4 +164,14 @@ public class AdminServiceImpl extends BaseMybatisDao<AdminMapper> implements Adm
 		return userRoleMapper.listAuditor();
 	}
 
+	@Override
+	public List<Admin> selectAccoutManager() {
+		return adminMapper.selectAccoutManager();
+	}
+
+	@Override
+	public List<Admin> selectTechnician() {
+		return adminMapper.selectTechnician();
+	}
+
 }

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

@@ -41,4 +41,8 @@ public interface AdminMapper {
 	List<Admin> selectTechprojectPrincipal();
 
 	List<String> selectRoleByPrimaryKey(String uid);
+
+	List<Admin> selectAccoutManager();
+
+	List<Admin> selectTechnician();
 }

+ 3 - 2
src/main/java/com/goafanti/common/enums/NoticeStatus.java

@@ -10,8 +10,9 @@ public enum NoticeStatus {
 	COGNIZANCE(2, "高企认定管理"),
 	COPYRIGHT(3, "软著申请管理"),
 	TECHPROJECT(4, "科技项目申报管理"),
-	CERTIFY(5, "用户认证审核"),
-	OTHER(5, "其他");
+	PERSONALCERTIFY(5, "个人用户认证审核"),
+	ORGANIZATIONCERTIFY(6, "团体组织用户认证审核"),
+	OTHER(7, "其他");
 
 	private NoticeStatus(Integer code, String desc) {
 		this.code = code;

+ 34 - 21
src/main/java/com/goafanti/common/mapper/AdminMapper.xml

@@ -206,24 +206,24 @@
   </select>
   
   <select id="selectCognizancePrincipal" resultMap="BaseResultMap"  >
-    select 
-    <include refid="Base_Column_List" />
-    from admin
-    where id  <![CDATA[ <> ]]> '1'
+    select a.id, a.name, a.position from admin a 
+		INNER JOIN user_role  ur on a.id = ur.uid
+	where ur.rid not in('1','2','3','4')
+	group by a.id
   </select>
   
   <select id="selectPatentAuthor" resultMap="BaseResultMap"  >
-    select 
-    <include refid="Base_Column_List" />
-    from admin
-    where id  <![CDATA[ <> ]]> '1'
+    select a.id, a.name, a.position from admin a 
+		INNER JOIN user_role  ur on a.id = ur.uid
+	where ur.rid not in('1','2','3','4')
+	group by a.id
   </select>
   
   <select id="selectPatentPrincipal" resultMap="BaseResultMap"  >
-    select 
-    <include refid="Base_Column_List" />
-    from admin
-    where id  <![CDATA[ <> ]]> '1'
+    select a.id, a.name, a.position from admin a 
+		INNER JOIN user_role  ur on a.id = ur.uid
+	where ur.rid not in('1','2','3','4')
+	group by a.id
   </select>
   
    <select id="selectCopyrightConsultant" resultMap="BaseResultMap"  >
@@ -234,10 +234,10 @@
   </select>
   
    <select id="selectCopyrightPrincipal" resultMap="BaseResultMap"  >
-    select 
-    <include refid="Base_Column_List" />
-    from admin
-    where id  <![CDATA[ <> ]]> '1'
+    select a.id, a.name, a.position from admin a 
+		INNER JOIN user_role  ur on a.id = ur.uid
+	where ur.rid not in('1','2','3','4')
+	group by a.id
   </select>
   
    <select id="selectTechprojectConsultant" resultMap="BaseResultMap"  >
@@ -248,15 +248,28 @@
   </select>
   
    <select id="selectTechprojectPrincipal" resultMap="BaseResultMap"  >
-    select 
-    <include refid="Base_Column_List" />
-    from admin
-    where id  <![CDATA[ <> ]]> '1'
+    select a.id, a.name, a.position from admin a 
+		INNER JOIN user_role  ur on a.id = ur.uid
+	where ur.rid not in('1','2','3','4')
+	group by a.id
   </select>
   
    <select id="selectRoleByPrimaryKey" parameterType="java.lang.String" resultType="String">
    	SELECT rid FROM user_role 
-   	where uid = #{uid,jdbcType=VARCHAR}
+   		where uid = #{uid,jdbcType=VARCHAR}
+   </select>
+   
+   <select id="selectAccoutManager" resultMap="BaseResultMap">
+   	select a.id, a.name, a.position from admin a 
+		INNER JOIN user_role  ur on a.id = ur.uid
+	where ur.rid = '4' 
+   </select>
+   
+   <select id="selectTechnician" resultMap="BaseResultMap">
+   select a.id, a.name, a.position from admin a 
+		INNER JOIN user_role  ur on a.id = ur.uid
+	where ur.rid not in('1','2','3','4')
+	group by a.id
    </select>
   
 </mapper>

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

@@ -585,7 +585,7 @@
 	<select id="findManagePatentListByPage" resultType="com.goafanti.patent.bo.PatentManageListBo"
 		parameterType="String">
 		select p.id, p.uid, p.serial_number as serialNumber, p.patent_number
-		as patentNumber, p.office,
+		as patentNumber, p.office, p.patent_catagory as patentCatagory,
 		o.licence_province as locationProvince,
 		o.unit_name as unitName,
 		p.patent_name as patentName, p.patent_state as
@@ -924,7 +924,7 @@
 		select p.id, p.uid, o.unit_name as unitName,o.org_code as orgCode,
 		o.licence_province as locationProvince,
 		o.licence_city as locationCity, o.licence_area as locationArea, o.postal_address as postalAddress,
-		p.contacts,
+		p.contacts, p.author,
 		p.serial_number as serialNumber , p.patent_number as patentNumber ,
 		p.patent_name as patentName, p.office,
 		p.patent_catagory as patentCatagory,p.patent_state as patentState,

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

@@ -156,6 +156,12 @@ public class Notice {
 			if (NoticeStatus.TECHPROJECT.getCode() == this.noticeType){
 				return NoticeStatus.TECHPROJECT.getDesc();
 			}
+			if (NoticeStatus.PERSONALCERTIFY.getCode() == this.noticeType){
+				return NoticeStatus.PERSONALCERTIFY.getDesc();
+			}
+			if (NoticeStatus.ORGANIZATIONCERTIFY.getCode() == this.noticeType){
+				return NoticeStatus.ORGANIZATIONCERTIFY.getDesc();
+			}
 			return NoticeStatus.OTHER.getDesc();
 		}
 	}

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

@@ -17,7 +17,7 @@ public class InputPatentInfo {
 	@Min(value = 1, message = "{" + ErrorConstants.PARAM_ERROR + "}")
 	private Integer	contacts;
 
-	@Size(min = 0, max = 16, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
+	@Size(min = 0, max = 64, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
 	private String	patentName;
 
 	@Max(value = 9, message = "{" + ErrorConstants.PARAM_ERROR + "}")

+ 10 - 0
src/main/java/com/goafanti/patent/bo/PatentInfoDetailBo.java

@@ -65,6 +65,16 @@ public class PatentInfoDetailBo {
 	private String	patentCertificateUrl;
 
 	private String	office;
+	
+	private String author;
+	
+	public String getAuthor() {
+		return author;
+	}
+
+	public void setAuthor(String author) {
+		this.author = author;
+	}
 
 	public String getId() {
 		return id;

+ 10 - 0
src/main/java/com/goafanti/patent/bo/PatentManageListBo.java

@@ -4,6 +4,8 @@ import java.util.Date;
 
 import org.apache.commons.lang3.time.DateFormatUtils;
 
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonFormat.Shape;
 import com.goafanti.common.constant.AFTConstants;
 
 public class PatentManageListBo {
@@ -35,8 +37,16 @@ public class PatentManageListBo {
 
 	private String	founder;
 	
+	private Integer patentCatagory;
 	
+	@JsonFormat(shape = Shape.STRING)
+	public Integer getPatentCatagory() {
+		return patentCatagory;
+	}
 
+	public void setPatentCatagory(Integer patentCatagory) {
+		this.patentCatagory = patentCatagory;
+	}
 	public String getFounder() {
 		return founder;
 	}

+ 7 - 6
src/main/java/com/goafanti/user/service/impl/OrganizationIdentityServiceImpl.java

@@ -121,7 +121,6 @@ public class OrganizationIdentityServiceImpl extends BaseMybatisDao<Organization
 				User u = new User();
 				u.setId(uid);
 				u.setLvl(1);
-				;
 				userMapper.updateByPrimaryKeySelective(u);
 				Calendar now = Calendar.getInstance();
 				if (null != o.getLastYearTaxReportUrl()
@@ -246,11 +245,13 @@ public class OrganizationIdentityServiceImpl extends BaseMybatisDao<Organization
 			Notice n = new Notice();
 			n.setPid(u.getAid());
 			n.setAid(u.getAid());
+			n.setUid(u.getId());
 			notice(n, status);
 		}
 
 		if (!StringUtils.isBlank(u.getMid())) {
 			Notice n = new Notice();
+			n.setUid(u.getId());
 			notice(n, status);
 		}
 
@@ -271,10 +272,10 @@ public class OrganizationIdentityServiceImpl extends BaseMybatisDao<Organization
 				if (null != u) {
 					n.setPid(u.getAid());
 				}
-
+				n.setUid(u.getId());
 				n.setAid(s);
-				n.setContent(NoticeStatus.CERTIFY.getDesc() + " " + IdentityAuditStatus.COMMITTED.getDesc());
-				n.setNoticeType(NoticeStatus.CERTIFY.getCode());
+				n.setContent(NoticeStatus.ORGANIZATIONCERTIFY.getDesc() + " " + IdentityAuditStatus.COMMITTED.getDesc());
+				n.setNoticeType(NoticeStatus.ORGANIZATIONCERTIFY.getCode());
 				noticeMapper.insert(n);
 			}
 		}
@@ -286,7 +287,7 @@ public class OrganizationIdentityServiceImpl extends BaseMybatisDao<Organization
 		n.setId(UUID.randomUUID().toString());
 		n.setCreateTime(now.getTime());
 		n.setReaded(NoticeReadStatus.UNREAD.getCode());
-		String content = NoticeStatus.CERTIFY.getDesc();
+		String content = NoticeStatus.ORGANIZATIONCERTIFY.getDesc();
 		if (IdentityAuditStatus.UNCOMMITTED.getCode() == status) {
 			content = content + " " + IdentityAuditStatus.UNCOMMITTED.getDesc();
 		} else if (IdentityAuditStatus.COMMITTED.getCode() == status) {
@@ -301,7 +302,7 @@ public class OrganizationIdentityServiceImpl extends BaseMybatisDao<Organization
 			content = content + " " + IdentityAuditStatus.NOTPASSED.getDesc();
 		}
 		n.setContent(content);
-		n.setNoticeType(NoticeStatus.CERTIFY.getCode());
+		n.setNoticeType(NoticeStatus.ORGANIZATIONCERTIFY.getCode());
 		noticeMapper.insert(n);
 	}
 

+ 7 - 5
src/main/java/com/goafanti/user/service/impl/UserIdentityServiceImpl.java

@@ -137,11 +137,13 @@ public class UserIdentityServiceImpl implements UserIdentityService{
 			Notice n = new Notice();
 			n.setPid(u.getAid());
 			n.setAid(u.getAid());
+			n.setUid(u.getId());
 			notice(n, status);
 		}
 		
 		if (!StringUtils.isBlank(u.getMid())){
 			Notice n = new Notice();
+			n.setUid(u.getId());
 			notice(n, status);
 		}
 		
@@ -163,10 +165,10 @@ public class UserIdentityServiceImpl implements UserIdentityService{
 				if (null != u) {
 					n.setPid(u.getAid());
 				}
-				
+				n.setUid(u.getId());
 				n.setAid(s);
-				n.setContent(NoticeStatus.CERTIFY.getDesc() + " " + IdentityAuditStatus.COMMITTED.getDesc());
-				n.setNoticeType(NoticeStatus.CERTIFY.getCode());
+				n.setContent(NoticeStatus.PERSONALCERTIFY.getDesc() + " " + IdentityAuditStatus.COMMITTED.getDesc());
+				n.setNoticeType(NoticeStatus.PERSONALCERTIFY.getCode());
 				noticeMapper.insert(n);
 			}
 		}
@@ -183,7 +185,7 @@ public class UserIdentityServiceImpl implements UserIdentityService{
 		n.setId(UUID.randomUUID().toString());
 		n.setCreateTime(now.getTime());
 		n.setReaded(NoticeReadStatus.UNREAD.getCode());
-		String content = NoticeStatus.CERTIFY.getDesc();
+		String content = NoticeStatus.PERSONALCERTIFY.getDesc();
 		if (IdentityAuditStatus.UNCOMMITTED.getCode() == status){
 			content = content + " " + IdentityAuditStatus.UNCOMMITTED.getDesc();
 		} else if (IdentityAuditStatus.COMMITTED.getCode() == status){
@@ -198,7 +200,7 @@ public class UserIdentityServiceImpl implements UserIdentityService{
 			content = content + " " + IdentityAuditStatus.NOTPASSED.getDesc();
 		}
 		n.setContent(content);
-		n.setNoticeType(NoticeStatus.CERTIFY.getCode());
+		n.setNoticeType(NoticeStatus.PERSONALCERTIFY.getCode());
 		noticeMapper.insert(n);
 	}