Antiloveg лет назад: 8
Родитель
Сommit
2c12777c06

+ 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';
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

+ 4 - 31
src/main/java/com/goafanti/admin/controller/AdminApiController.java

@@ -691,7 +691,7 @@ public class AdminApiController extends CertifyApiController {
 		
 		if (StringUtils.isBlank(ui.getId())) {
 			ui.setId(UUID.randomUUID().toString());
-			res.setData(userIdentityService.insertByAdmin(ui));
+			res.setData(userIdentityService.insertByAdmin(ui, null, null));
 		} else {
 			res.setData(userIdentityService.updateUserDetail(ui, null, null));
 		}
@@ -741,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;
 	}
 
@@ -779,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;
 	}

+ 40 - 8
src/main/java/com/goafanti/admin/controller/AdminUserCertifyApiController.java

@@ -70,14 +70,30 @@ public class AdminUserCertifyApiController extends CertifyApiController {
 	}
 	
 	/**
+	 * 审核员--个人用户详情
+	 * @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 = "/user", method = RequestMethod.POST)
-	public Result disposeCertify(@Valid InputUserIdentity userIdentity, BindingResult bindingResult,
+	@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()) {
@@ -114,7 +130,7 @@ public class AdminUserCertifyApiController extends CertifyApiController {
 					|| IdentityAuditStatus.PASSED.getCode() == ui.getAuditStatus()) {
 				ui.setProcess(IdentityProcess.RESULTS.getCode());
 			}
-			res.setData(userIdentityService.insert(ui));
+			res.setData(userIdentityService.insertByAdmin(ui, aid, mid));
 		} else {
 			ui.setAuditStatus(null == ui.getAuditStatus() ? 0 : ui.getAuditStatus());
 			if (IdentityAuditStatus.UNCOMMITTED.getCode() == ui.getAuditStatus()) {
@@ -134,15 +150,31 @@ public class AdminUserCertifyApiController extends CertifyApiController {
 	}
 	
 	/**
+	 * 审核员---团体用户详情
+	 * @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 = "/org", method = RequestMethod.POST)
-	public Result updateOrgDetail(@Valid InputOrganizationIdentity orgIdentity, BindingResult bindingResult,
-			String paymentDateFormattedDate) {
+	@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()) {
@@ -182,7 +214,7 @@ public class AdminUserCertifyApiController extends CertifyApiController {
 			}
 			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, aid, mid));
 		} else {
 			oi.setAuditStatus(null == oi.getAuditStatus() ? 0 : oi.getAuditStatus());
 			if (IdentityAuditStatus.UNCOMMITTED.getCode() == oi.getAuditStatus()) {
@@ -196,7 +228,7 @@ public class AdminUserCertifyApiController extends CertifyApiController {
 					|| IdentityAuditStatus.PASSED.getCode() == oi.getAuditStatus()) {
 				oi.setProcess(IdentityProcess.RESULTS.getCode());
 			}
-			res.setData(organizationIdentityService.updateOrgDetail(oi));
+			res.setData(organizationIdentityService.updateOrgDetail(oi, aid, mid));
 		}
 		return res;
 	}

+ 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);
 }

+ 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);
 }

+ 304 - 126
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="tech_principal" property="techPrincipal" 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, tech_principal, 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,
+		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},
 		#{techPrincipal,jdbcType=VARCHAR},
-		#{contactsFixedTel,jdbcType=VARCHAR}, #{contactsFax,jdbcType=VARCHAR}, #{legalPersonTel,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
@@ -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">
@@ -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},
@@ -747,7 +799,8 @@
 				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},
-		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}
+		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,80 @@
 
 	<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.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
+		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
+		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
+		from user u 
+		LEFT JOIN organization_identity oi on oi.uid = u.id
+		where uid = #{uid,jdbcType=VARCHAR}
+	</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>

Разница между файлами не показана из-за своего большого размера
+ 550 - 538
src/main/java/com/goafanti/common/model/OrganizationIdentity.java


+ 17 - 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) {
@@ -201,7 +205,7 @@ public class PatentInfoServiceImpl extends BaseMybatisDao<PatentInfoMapper> impl
 		if (author != null && author != "") {
 			params.put("author", author);
 		}
-		
+
 		if (uid != null && uid != "") {
 			params.put("uid", uid);
 		}
@@ -356,6 +360,11 @@ public class PatentInfoServiceImpl extends BaseMybatisDao<PatentInfoMapper> impl
 		log.setComment(patentInfo.getPatentDes());
 		patentLogMapper.insert(log);
 
+		if (!StringUtils.isBlank(patentInfo.getPatentProryStatementUrl()) && TokenManager.getToken() instanceof Admin) {
+			OrganizationIdentity oi = organizationIdentityMapper.selectOrgIdentityByUserId(patentInfo.getUid());
+			oi.setPatentProryStatementUrl(patentInfo.getPatentProryStatementUrl());
+			organizationIdentityMapper.updateByPrimaryKeySelective(oi);
+		}
 		createNotice(patentInfo, log);
 		return patentInfo;
 	}

+ 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;
+	}
+
+	
+	
+
+}

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

@@ -0,0 +1,415 @@
+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;
+
+	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) {
+
+	}
+
+}

+ 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);
+
 
 
 	

+ 4 - 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 {
@@ -20,7 +21,9 @@ public interface UserIdentityService {
 
 	int updateUserDetail(UserIdentity userIdentity, String aid, String mid);
 
-	UserIdentity insertByAdmin(UserIdentity ui);
+	UserIdentity insertByAdmin(UserIdentity ui, String aid, String mid);
+
+	AuditorUserIdentityDetailBo selectAuditorUserIdentityByUserId(String uid);
 
 
 

+ 143 - 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,43 @@ 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()) {
+				if (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);
+				}
 			}
 		}
+		User user = userMapper.selectByPrimaryKey(orgIdentity.getUid());
+		if (!TokenManager.hasRole(AFTConstants.AUDITORADMIN)){
+			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 +186,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 +205,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)) {
+			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);
+	}
+
 }

+ 57 - 27
src/main/java/com/goafanti/user/service/impl/UserIdentityServiceImpl.java

@@ -22,6 +22,7 @@ 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;
 
@@ -105,47 +106,46 @@ public class UserIdentityServiceImpl implements UserIdentityService{
 			}
 			createNotice(user, u.getAuditStatus());
 		}
-		userMapper.updateByPrimaryKey(user);
+		userMapper.updateByPrimaryKeySelective(user);
 		return userIdentityMapper.updateByPrimaryKeySelective(u);
 	}
 
 	@Override
-	public UserIdentity insertByAdmin(UserIdentity ui) {
+	public UserIdentity insertByAdmin(UserIdentity ui, String aid, String mid) {
 		userIdentityMapper.insert(ui);
-		if (!TokenManager.hasRole(AFTConstants.AUDITORADMIN)){
-			User u = userMapper.selectByPrimaryKey(ui.getUid());
+		User u = userMapper.selectByPrimaryKey(ui.getUid());
+		if (!TokenManager.hasRole(AFTConstants.AUDITORADMIN) && !TokenManager.hasRole(AFTConstants.SUPERADMIN)){
 			u.setAid(TokenManager.getAdminId());
-			userMapper.updateByPrimaryKey(u);
+			userMapper.updateByPrimaryKeySelective(u);
 			createAuditorNotice(u);
 		}
+		if (TokenManager.hasRole(AFTConstants.AUDITORADMIN)){
+			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){
-		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());
-		n.setPid(u.getAid());
+		if (!StringUtils.isBlank(u.getAid())){
+			Notice n = new Notice();
+			n.setPid(u.getAid());
+			n.setAid(u.getAid());
+			notice(n, status);
+		}
 		
-		n.setAid(u.getAid());
-		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 {
-			content = content + " " + IdentityAuditStatus.NOTPASSED.getDesc();
+		if (!StringUtils.isBlank(u.getMid())){
+			Notice n = new Notice();
+			notice(n, status);
 		}
-		n.setContent(content);
-		n.setNoticeType(NoticeStatus.CERTIFY.getCode());
-		noticeMapper.insert(n);
+		
+		
 	}
 	
 	//给所有审核员发送审核通知
@@ -172,5 +172,35 @@ public class UserIdentityServiceImpl implements UserIdentityService{
 		}
 	}
 
+	@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);
+	}
+
 
 }