Procházet zdrojové kódy

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

wubb před 8 roky
rodič
revize
a115244977

+ 9 - 14
src/main/java/com/goafanti/achievement/controller/AchievementApiController.java

@@ -218,7 +218,7 @@ public class AchievementApiController extends CertifyApiController {
 	public Result download(HttpServletResponse response, String id, String sign) {
 		Result res = new Result();
 
-		if (StringUtils.isEmpty(id)) {
+		if (StringUtils.isBlank(id)) {
 			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "科技成果ID"));
 			return res;
 		}
@@ -229,20 +229,15 @@ public class AchievementApiController extends CertifyApiController {
 			return res;
 		}
 
-		if (TokenManager.getUserId().equals(a.getOwnerId())) {
-			AttachmentType attachmentType = AttachmentType.getField(sign);
-			if (attachmentType == AttachmentType.ACHIEVEMENT_MATURITY_TEXT_FILE) {
-				downloadUnPrivateFile(response, a.getMaturityTextFileDownloadFileName(), a.getMaturityTextFileUrl());
-			} else if (attachmentType == AttachmentType.ACHIEVEMENT_TECH_PLAN) {
-				downloadUnPrivateFile(response, a.getTechPlanDownloadFileName(), a.getTechPlanUrl());
-			} else if (attachmentType == AttachmentType.ACHIEVEMENT_BUSINESS_PLAN) {
-				downloadUnPrivateFile(response, a.getBusinessPlanDownloadFileName(), a.getBusinessPlanUrl());
-			} else {
-				res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "附件标示"));
-			}
+		AttachmentType attachmentType = AttachmentType.getField(sign);
+		if (attachmentType == AttachmentType.ACHIEVEMENT_MATURITY_TEXT_FILE) {
+			downloadUnPrivateFile(response, a.getMaturityTextFileDownloadFileName(), a.getMaturityTextFileUrl());
+		} else if (attachmentType == AttachmentType.ACHIEVEMENT_TECH_PLAN) {
+			downloadUnPrivateFile(response, a.getTechPlanDownloadFileName(), a.getTechPlanUrl());
+		} else if (attachmentType == AttachmentType.ACHIEVEMENT_BUSINESS_PLAN) {
+			downloadUnPrivateFile(response, a.getBusinessPlanDownloadFileName(), a.getBusinessPlanUrl());
 		} else {
-			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "科技成果ID"));
-			return res;
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "附件标示"));
 		}
 
 		return res;

+ 10 - 3
src/main/java/com/goafanti/admin/controller/AdminApiController.java

@@ -219,6 +219,7 @@ public class AdminApiController extends CertifyApiController {
 	@RequestMapping(value = "/confirmProportion", method = RequestMethod.POST)
 	public Result confirmProportion(String id, String uid, String sign, Integer status) {
 		Result res = new Result();
+
 		if (StringUtils.isBlank(uid)) {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到用户", "用户ID"));
 			return res;
@@ -239,7 +240,8 @@ public class AdminApiController extends CertifyApiController {
 			return res;
 		}
 
-		if (StringUtils.isBlank(id)) {
+		OrgCognizanceProportion oo = orgCognizanceProportionService.selectByUid(uid);
+		if (null == oo && StringUtils.isBlank(id)) {
 			OrgCognizanceProportion cp = new OrgCognizanceProportion();
 			cp.setId(UUID.randomUUID().toString());
 			cp.setUid(uid);
@@ -247,6 +249,11 @@ public class AdminApiController extends CertifyApiController {
 			return res;
 		}
 
+		if (StringUtils.isBlank(id)) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到用户", "比重ID"));
+			return res;
+		}
+
 		OrgCognizanceProportion ocp = orgCognizanceProportionService.selectByPrimaryKey(id);
 		if (null == ocp) {
 			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "比重ID"));
@@ -2301,8 +2308,8 @@ public class AdminApiController extends CertifyApiController {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到用户", "用户"));
 			return res;
 		}
-		
-		if (StringUtils.isBlank(orgTechCenter.getCenterName())){
+
+		if (StringUtils.isBlank(orgTechCenter.getCenterName())) {
 			res.getError().add(buildError(ErrorConstants.DATA_EMPTY_ERROR, "", "研发部门名称"));
 			return res;
 		}

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

@@ -94,4 +94,11 @@ public class ErrorConstants {
 
 	public static final String	MCODE_EMPTY_ERROR				= "MCODE_EMPTY_ERROR";
 
+	public static final String	IDENTITY_PAY_OVER_TIME			= "IDENTITY_PAY_OVER_TIME";
+
+	public static final String	OVER_MAX_WRONG_COUNT			= "OVER_MAX_WRONG_COUNT";
+
+	public static final String	WRONG_MONEY						= "WRONG_MONEY";
+
+	public static final String	M_CODE_ERROR					= "M_CODE_ERROR";
 }

+ 11 - 7
src/main/java/com/goafanti/common/controller/PublicController.java

@@ -168,7 +168,7 @@ public class PublicController extends BaseController {
 		String paramString = "{\"code\":\"" + mobileVerifyCode + "\",\"product\":\"阿凡提信息科技\"}";
 		String ret = MobileMessageUtils.sendMessage(mobileCodeTemplate, paramString, mobile, accessKey, accessSecret);
 		if (StringUtils.isNotBlank(ret)) {
-			res.getError().add(buildError(ErrorConstants.MCODE_ERROR, "", "获取手机验证码异常!"));
+			res.getError().add(buildError(ErrorConstants.M_CODE_ERROR));
 		}
 		return res;
 	}
@@ -184,7 +184,7 @@ public class PublicController extends BaseController {
 	public Result downLoadPicture(HttpServletResponse response, String path, HttpServletRequest request) {
 		Result res = new Result();
 		if (StringUtils.isBlank(path)) {
-			res.getError().add(buildError(ErrorConstants.FILE_NON_EXISTENT, "下载文件不存在!"));
+			res.getError().add(buildError(ErrorConstants.FILE_NON_EXISTENT));
 			return res;
 		}
 		String filename = Long.toString(System.nanoTime()) + ".jpg";
@@ -209,19 +209,23 @@ public class PublicController extends BaseController {
 			}
 		} catch (IOException e) {
 			LoggerUtils.fmtError(getClass(), e, "IO错误:%s", e.getMessage());
-			res.getError().add(buildError(ErrorConstants.FILE_NON_EXISTENT, "下载文件不存在!"));
+			res.getError().add(buildError(ErrorConstants.FILE_NON_EXISTENT));
 		} finally {
 			try {
-				in.close();
+				if (null != in) {
+					in.close();
+				}
 			} catch (IOException e) {
 				LoggerUtils.fmtError(getClass(), e, "IO错误:%s", e.getMessage());
-				res.getError().add(buildError(ErrorConstants.FILE_NON_EXISTENT, "下载文件不存在!"));
+				res.getError().add(buildError(ErrorConstants.FILE_NON_EXISTENT));
 			}
 			try {
-				out.close();
+				if (null != out) {
+					out.close();
+				}
 			} catch (IOException e) {
 				LoggerUtils.fmtError(getClass(), e, "IO错误:%s", e.getMessage());
-				res.getError().add(buildError(ErrorConstants.FILE_NON_EXISTENT, "下载文件不存在!"));
+				res.getError().add(buildError(ErrorConstants.FILE_NON_EXISTENT));
 			}
 		}
 		return res;

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

@@ -292,7 +292,7 @@
    <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','5','6')
+	where ur.rid not in('1','2','3','4')
 	group by a.id
    </select>
    

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

@@ -530,7 +530,7 @@
     select 
     	<include refid="Base_Column_List" />
     from contract 
-    where year =  
+    where cognizance_year =  
 	   	(select
 	   		Max(cognizance_year)
 	   	from contract

+ 59 - 116
src/main/java/com/goafanti/common/mapper/OrganizationIdentityMapper.xml

@@ -867,128 +867,71 @@
 		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=INTEGER},
-		licence_city =
-		#{licenceCity,jdbcType=INTEGER},
-		licence_area =
-		#{licenceArea,jdbcType=INTEGER},
-		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=INTEGER},
+		licence_city = #{licenceCity,jdbcType=INTEGER},
+		licence_area = #{licenceArea,jdbcType=INTEGER},
+		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=INTEGER},
-		location_city =
-		#{locationCity,jdbcType=INTEGER},
-		location_area =
-		#{locationArea,jdbcType=INTEGER},
-		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=INTEGER},
+		location_city = #{locationCity,jdbcType=INTEGER},
+		location_area = #{locationArea,jdbcType=INTEGER},
+		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},
-		patent_prory_statement_url =
-		#{patentProryStatementUrl,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},
+		tech_principal = #{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>
 
@@ -1097,7 +1040,7 @@
 	
 	<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.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,
@@ -1106,7 +1049,7 @@
 			 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
+			 oi.last_year_tax_report_url as lastYearTaxReportUrl, oi.field
 		from user u 
 		LEFT JOIN organization_identity oi on oi.uid = u.id
 		where uid = #{uid,jdbcType=VARCHAR}

+ 26 - 6
src/main/java/com/goafanti/common/mapper/UserIdentityMapper.xml

@@ -324,7 +324,8 @@
   
    
   <select id="selectUserIdentityBoByUserId" parameterType="java.lang.String" resultType="com.goafanti.user.bo.UserIdentityBo">
-  	select t.id, t.uid, t.username, t.sex, t.date_of_birth_year as dateOfBirthYear,
+  	select 
+  		   t.id, t.uid, t.username, t.sex, t.date_of_birth_year as dateOfBirthYear,
   		   t.date_of_birth_month as dateOfBirthMonth, t.id_number as idNumber, t.audit_status as auditStatus,
 		   u.mobile, u.number from user u left JOIN user_identity t
 	on t.uid = u.id where t.uid=#{uid,jdbcType=VARCHAR}
@@ -332,11 +333,30 @@
   
   <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, ui.expert, ui.celebrity
+  		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, 
+  		ui.expert, 
+  		ui.celebrity
   	from user u 
   	LEFT JOIN user_identity ui on u.id = ui.uid
   	where u.id = #{uid,jdbcType=VARCHAR}

+ 3 - 3
src/main/java/com/goafanti/common/utils/MobileMessageUtils.java

@@ -26,7 +26,7 @@ public class MobileMessageUtils {
 			DefaultProfile.addEndpoint("cn-hangzhou", "cn-hangzhou", "Sms", "sms.aliyuncs.com");
 		} catch (ClientException e1) {
 			LoggerUtils.fmtError(MobileMessageUtils.class, e1, CLIENT_EXCEPTION, e1.getMessage());
-			return ErrorConstants.MCODE_ERROR;
+			return ErrorConstants.M_CODE_ERROR;
 		}
 		IAcsClient client = new DefaultAcsClient(profile);
 		SingleSendSmsRequest request = new SingleSendSmsRequest();
@@ -38,10 +38,10 @@ public class MobileMessageUtils {
 			SingleSendSmsResponse httpResponse = client.getAcsResponse(request);
 		} catch (ServerException e) {
 			LoggerUtils.fmtError(MobileMessageUtils.class, e, SERVER_EXCEPTION, e.getMessage());
-			return ErrorConstants.MCODE_ERROR;
+			return ErrorConstants.M_CODE_ERROR;
 		} catch (ClientException e) {
 			LoggerUtils.fmtError(MobileMessageUtils.class, e, CLIENT_EXCEPTION, e.getMessage());
-			return ErrorConstants.MCODE_ERROR;
+			return ErrorConstants.M_CODE_ERROR;
 		}
 		return null;
 	}

+ 1 - 1
src/main/java/com/goafanti/contract/bo/InputContract.java

@@ -16,7 +16,7 @@ public class InputContract {
 	@Size(min = 0, max = 8, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
 	private String previousFee;
 	
-	@Max(value = 3, message = "{" + ErrorConstants.PARAM_ERROR + "}")
+	@Max(value = 4, message = "{" + ErrorConstants.PARAM_ERROR + "}")
 	@Min(value = 1, message = "{" + ErrorConstants.PARAM_ERROR + "}")
 	private Integer	type;
 

+ 1 - 1
src/main/java/com/goafanti/contract/bo/InputSaveContract.java

@@ -19,7 +19,7 @@ public class InputSaveContract {
 
 	private Integer	serialNumber;
 
-	@Max(value = 3, message = "{" + ErrorConstants.PARAM_ERROR + "}")
+	@Max(value = 4, message = "{" + ErrorConstants.PARAM_ERROR + "}")
 	@Min(value = 0, message = "{" + ErrorConstants.PARAM_ERROR + "}")
 	private Integer	type;
 

+ 1 - 1
src/main/java/com/goafanti/contract/controller/ContractApiController.java

@@ -193,7 +193,7 @@ public class ContractApiController extends CertifyApiController {
 		Contract c = new Contract();
 		BeanUtils.copyProperties(contract, c);
 		Contract ct = contractService.selectByPrimaryKey(c.getId());
-		if (null != ct && !ContractStatus.CREATE.getCode().equals(ct.getStatus())) {
+		if (null != ct && ContractStatus.CREATE.getCode().equals(ct.getStatus())) {
 			res.setData(contractService.updateByPrimaryKeySelective(c));
 		} else {
 			res.getError().add(buildError("", "当前合同为非草稿状态,无法操作!"));

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

@@ -158,6 +158,16 @@ public class OrgIdentityDetailBo {
 	 */
 	private String		lastYearTaxReportUrl;
 
+	private String		field;
+
+	public String getField() {
+		return field;
+	}
+
+	public void setField(String field) {
+		this.field = field;
+	}
+
 	public String getLastYearTaxReportUrl() {
 		return lastYearTaxReportUrl;
 	}

+ 26 - 23
src/main/java/com/goafanti/user/controller/UserApiController.java

@@ -187,10 +187,15 @@ public class UserApiController extends BaseApiController {
 		}
 		User user = userService.selectByPrimaryKey(TokenManager.getUserId());
 		if (mobile.equals(user.getMobile())) {
-			res.getError().add(buildError(ErrorConstants.MOBILE_SAME_ERROR, "新手机号必须和原手机号不同!"));
+			res.getError().add(buildError(ErrorConstants.MOBILE_SAME_ERROR));
 			return res;
 		}
-		if (res.getError().isEmpty() && TokenManager.isLogin()) {
+		User u = userService.selectByMobieAndType(mobile, user.getType());	
+		if (null != u){
+			res.getError().add(buildError(ErrorConstants.DUNPLICATE_KAY_ERROR, "", mobile));
+			return res;
+		}
+		if (res.getError().isEmpty()) {
 			user.setMobile(mobile);
 			res.setData(userService.updateByPrimaryKey(user));
 		}
@@ -687,12 +692,13 @@ public class UserApiController extends BaseApiController {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "process"));
 			return res;
 		}
-		if (StringUtils.isBlank(verificationCode)) {
-			res.getError().add(buildError(ErrorConstants.VCODE_EMPTY_ERROR));
-			return res;
-		}
+
 		if (STEP_ONE.equals(userIdentity.getProcess())) {
-			if (!TokenManager.getSession().getAttribute(VerifyCodeUtils.V_CODE).equals(verificationCode)) {
+			if (StringUtils.isBlank(verificationCode)) {
+				res.getError().add(buildError(ErrorConstants.VCODE_EMPTY_ERROR));
+				return res;
+			}
+			if (!VerifyCodeUtils.verifyCode(verificationCode)) {
 				res.getError().add(buildError(ErrorConstants.VCODE_ERROR));
 				return res;
 			}
@@ -707,14 +713,14 @@ public class UserApiController extends BaseApiController {
 			if ((System.currentTimeMillis() - u.getPaymentDate().getTime()) > 432000000) {
 				u.setAuditStatus(IdentityAuditStatus.NOTPASSED.getCode());// 4
 				userIdentityService.updateByPrimaryKeySelective(u);
-				res.getError().add(buildError("", "1"));// 超过打款日期5日,无法提交确认
+				res.getError().add(buildError(ErrorConstants.IDENTITY_PAY_OVER_TIME));// 超过打款日期5日,无法提交确认
 				return res;
 			}
 			if (MAX_WRONG_COUNT.equals(u.getWrongCount())) {
 				u.setAuditStatus(IdentityAuditStatus.NOTPASSED.getCode());// 4
 				u.setProcess(IdentityProcess.RESULTS.getCode());// 5
 				userIdentityService.updateByPrimaryKeySelective(u);
-				res.getError().add(buildError("", "2"));// 输入错误金额次数过多
+				res.getError().add(buildError(ErrorConstants.OVER_MAX_WRONG_COUNT));// 输入错误金额次数过多
 				return res;
 			}
 			if (0 != (u.getAmountMoney().compareTo(userIdentity.getAmountMoney()))) {
@@ -724,9 +730,9 @@ public class UserApiController extends BaseApiController {
 				if (0 == t) {
 					u.setAuditStatus(IdentityAuditStatus.NOTPASSED.getCode());// 4
 					u.setProcess(IdentityProcess.RESULTS.getCode());// 5
-					res.getError().add(buildError("", "2"));// 输入错误金额次数过多
+					res.getError().add(buildError(ErrorConstants.OVER_MAX_WRONG_COUNT));// 输入错误金额次数过多
 				} else {
-					res.getError().add(buildError("", "输入打款金额错误,您还有" + t + "次机会"));
+					res.getError().add(buildError(ErrorConstants.WRONG_MONEY, "", t));
 				}
 				userIdentityService.updateByPrimaryKeySelective(u);
 				return res;
@@ -752,7 +758,6 @@ public class UserApiController extends BaseApiController {
 	/**
 	 * 团体实名认证流程下一步
 	 * 
-	 * @throws ParseException
 	 */
 	@RequestMapping(value = "/orgNextPro", method = RequestMethod.POST)
 	public Result orgNextProcess(OrganizationIdentity orgIdentity, String listedDateFormattedDate,
@@ -762,11 +767,12 @@ public class UserApiController extends BaseApiController {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "process"));
 			return res;
 		}
-		if (StringUtils.isBlank(verificationCode)) {
-			res.getError().add(buildError(ErrorConstants.VCODE_EMPTY_ERROR));
-			return res;
-		}
+
 		if (STEP_ONE.equals(orgIdentity.getProcess())) {
+			if (StringUtils.isBlank(verificationCode)) {
+				res.getError().add(buildError(ErrorConstants.VCODE_EMPTY_ERROR));
+				return res;
+			}
 			if (!TokenManager.getSession().getAttribute(VerifyCodeUtils.V_CODE).equals(verificationCode)) {
 				res.getError().add(buildError(ErrorConstants.VCODE_ERROR));
 				return res;
@@ -785,14 +791,14 @@ public class UserApiController extends BaseApiController {
 			if (System.currentTimeMillis() - o.getPaymentDate().getTime() > 432000000) {
 				o.setAuditStatus(IdentityAuditStatus.NOTPASSED.getCode());// 4
 				organizationIdentityService.updateByPrimaryKeySelective(o);
-				res.getError().add(buildError("", "1"));// 超过打款日期5日,无法提交确认
+				res.getError().add(buildError(ErrorConstants.IDENTITY_PAY_OVER_TIME));// 超过打款日期5日,无法提交确认
 				return res;
 			}
 			if (MAX_WRONG_COUNT.equals(o.getWrongCount())) {
 				o.setAuditStatus(IdentityAuditStatus.NOTPASSED.getCode());// 4
 				o.setProcess(IdentityProcess.RESULTS.getCode());// 5
 				organizationIdentityService.updateByPrimaryKeySelective(o);
-				res.getError().add(buildError("", "2"));// 输入错误金额次数过多
+				res.getError().add(buildError(ErrorConstants.OVER_MAX_WRONG_COUNT));// 输入错误金额次数过多
 				return res;
 			}
 			if (0 != (o.getValidationAmount().compareTo(orgIdentity.getValidationAmount()))) {
@@ -801,9 +807,9 @@ public class UserApiController extends BaseApiController {
 				if (0 == t) {
 					o.setAuditStatus(IdentityAuditStatus.NOTPASSED.getCode());// 4
 					o.setProcess(IdentityProcess.RESULTS.getCode());// 5
-					res.getError().add(buildError("", "2"));// 输入错误金额次数过多
+					res.getError().add(buildError(ErrorConstants.OVER_MAX_WRONG_COUNT));// 输入错误金额次数过多
 				} else {
-					res.getError().add(buildError("", "输入打款金额错误,您还有" + t + "次机会"));
+					res.getError().add(buildError(ErrorConstants.WRONG_MONEY, "", t));
 				}
 				organizationIdentityService.updateByPrimaryKeySelective(o);
 				return res;
@@ -825,9 +831,6 @@ public class UserApiController extends BaseApiController {
 
 	/**
 	 * 获取公司联系人
-	 * 
-	 * @param uid
-	 * @return
 	 */
 	@RequestMapping(value = "/getContacts", method = RequestMethod.GET)
 	public Result getContacts() {

+ 11 - 1
src/main/resources/props/error.properties

@@ -45,7 +45,7 @@ MCODE_ERROR=\u624b\u673a\u9a8c\u8bc1\u7801\u9519\u8bef\uff01
 
 NON_CERTIFIED=\u672a\u901a\u8fc7\u5b9e\u540d\u8ba4\u8bc1\uff0c\u65e0\u6cd5\u64cd\u4f5c\uff01
 
-FILE_NON_EXISTENT=\u627e\u4e0d\u5230\u6587\u4ef6\uff01
+FILE_NON_EXISTENT=\u6587\u4ef6\u4e0d\u5b58\u5728\uff01
 
 RECORD_CALLBACK=\u5f53\u524d\u8bb0\u5f55\u5df2\u9000\u5355\uff0c\u65e0\u6cd5\u4fee\u6539\uff01
 
@@ -80,3 +80,13 @@ MCODE_OVERTIME_ERROR=\u624b\u673a\u9a8c\u8bc1\u7801\u8d85\u65f6\u5931\u6548\uff0
 RESET_CODE_ERROR=\u9875\u9762\u5931\u6548,\u8bf7\u91cd\u65b0\u83b7\u53d6\u9a8c\u8bc1\u7801\uff01
 
 RESET_CODE_OVERTIME=\u9875\u9762\u8d85\u65f6\u5931\u6548,\u8bf7\u91cd\u65b0\u83b7\u53d6\u9a8c\u8bc1\u7801\uff01
+
+IDENTITY_PAY_OVER_TIME=\u8d85\u8fc7\u6253\u6b3e\u65e5\u671f5\u65e5\uff0c\u65e0\u6cd5\u63d0\u4ea4\u786e\u8ba4\uff01
+
+OVER_MAX_WRONG_COUNT=\u8f93\u5165\u9519\u8bef\u91d1\u989d\u6b21\u6570\u8fc7\u591a\uff01
+
+WRONG_MONEY=\u8f93\u5165\u6253\u6b3e\u91d1\u989d\u9519\u8bef\uff0c\u60a8\u8fd8\u6709{0}\u6b21\u673a\u4f1a\uff01
+
+M_CODE_ERROR=\u624b\u673a\u9a8c\u8bc1\u7801\u83b7\u53d6\u5f02\u5e38\uff0c\u8bf7\u7a0d\u540e\u91cd\u8bd5\uff01
+
+MOBILE_SAME_ERROR=\u65b0\u624b\u673a\u53f7\u5fc5\u987b\u548c\u539f\u624b\u673a\u53f7\u4e0d\u540c\uff01