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

+ 4 - 0
src/main/java/com/goafanti/achievement/service/impl/AchievementServiceImpl.java

@@ -276,6 +276,10 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 			a.setReleaseDate(now.getTime());
 			a.setReleaseStatus(DemandReleaseStatus.RELEASED.getCode());
 			a.setTechBrokerId(techBroderId);
+			if (StringUtils.isNotBlank(a.getKeyword())) {
+				String[] keywords = a.getKeyword().trim().split(",|,");
+				disposeAchievementKeyword(keywords, a, false);
+			}
 			String ownerId = a.getOwnerId();
 			if (StringUtils.isNotBlank(ownerId)) {
 				if (UserType.PERSONAL.getCode().equals(a.getOwnerType())) {

+ 29 - 12
src/main/java/com/goafanti/admin/controller/AdminContractApiController.java

@@ -58,6 +58,8 @@ public class AdminContractApiController extends CertifyApiController {
 	@Resource
 	private TechProjectService		techProjectService;
 
+	private static final Integer	SECTION_YEAR	= 4;
+
 	/**
 	 * 批量删除合同
 	 */
@@ -108,7 +110,7 @@ public class AdminContractApiController extends CertifyApiController {
 		}
 
 		if (null != c.getCognizanceYear() && !c.getCognizanceYear().equals(0)) {
-			if (!disposeCog(c.getCognizanceYear(), c.getUid(), res).getError().isEmpty()) {
+			if (!disposeCog(c.getId(), c.getCognizanceYear(), c.getUid(), res).getError().isEmpty()) {
 				return res;
 			}
 		}
@@ -303,8 +305,8 @@ public class AdminContractApiController extends CertifyApiController {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到用户", "用户"));
 			return res;
 		}
-		
-		if (null == contract.getType()){
+
+		if (null == contract.getType()) {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "合同类型"));
 			return res;
 		}
@@ -315,7 +317,7 @@ public class AdminContractApiController extends CertifyApiController {
 		}
 
 		if (null != contract.getCognizanceYear() && !contract.getCognizanceYear().equals(0)) {
-			if (!disposeCog(contract.getCognizanceYear(), contract.getUid(), res).getError().isEmpty()) {
+			if (!disposeCog(contract.getId(), contract.getCognizanceYear(), contract.getUid(), res).getError().isEmpty()) {
 				return res;
 			}
 		}
@@ -356,8 +358,8 @@ public class AdminContractApiController extends CertifyApiController {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到用户", "用户"));
 			return res;
 		}
-		
-		if (null == ic.getType()){
+
+		if (null == ic.getType()) {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "合同类型"));
 			return res;
 		}
@@ -368,7 +370,7 @@ public class AdminContractApiController extends CertifyApiController {
 		}
 
 		if (null != ic.getCognizanceYear() && !ic.getCognizanceYear().equals(0)) {
-			if (!disposeCog(ic.getCognizanceYear(), ic.getUid(), res).getError().isEmpty()) {
+			if (!disposeCog(ic.getId(), ic.getCognizanceYear(), ic.getUid(), res).getError().isEmpty()) {
 				return res;
 			}
 		}
@@ -468,17 +470,32 @@ public class AdminContractApiController extends CertifyApiController {
 		return res;
 	}
 
-	private Result disposeCog(Integer year, String uid, Result res) {
+	private Result disposeCog(String id, Integer year, String uid, Result res) {
 		Integer latelyYear = orgCognizanceService.selectLatelyRecordYear(uid);
-		if (null != latelyYear && year - latelyYear < 4) {
+		if (null != latelyYear && year - latelyYear < SECTION_YEAR) {
 			res.getError()
-					.add(buildError(ErrorConstants.STATUS_ERROR, "高企认定申请中或认定未到期!无法提交新申请!", "高企认定申请中或认定未到期!无法提交新申请!"));
+					.add(buildError(ErrorConstants.STATUS_ERROR, "高企认定申请中或认定未到期!无法提交新申请!", "高企认定申请中或认定未到期!无法提交新申请"));
 			return res;
 		}
-		Contract c = contractService.findByUidAndYear(uid, year);
+		
+		Contract c = contractService.findLatelyRecordByUid(uid);
+		boolean flag = Boolean.TRUE;
 		if (null != c) {
-			res.getError().add(buildError("", "当前年份已有合同申请,无法提交新申请!"));
+			if (StringUtils.isNotBlank(id)) {
+				if (null != c.getCognizanceYear() && year - c.getCognizanceYear() < SECTION_YEAR
+						&& !id.equals(c.getId())) {
+					flag = false;
+				}
+			} else {
+				if (null != c.getCognizanceYear() && year - c.getCognizanceYear() < SECTION_YEAR) {
+					flag = false;
+				}
+			}
 		}
+		if (!flag) {
+			res.getError().add(buildError(ErrorConstants.CONTRACT_YEAR_SECTION));
+		}
+
 		return res;
 	}
 

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

@@ -248,7 +248,7 @@
 		and u.number = #{number,jdbcType=INTEGER}
 	</if>
 	<if test="username != null">
-		and i.username like CONCAT('%', #{username,jdbcType=VARCHAR}, '%')   
+		and i.username like '%'#{username,jdbcType=VARCHAR}'%'   
 	</if>
 	<if test="auditStatus != null">
 		and i.audit_status= #{auditStatus,jdbcType=INTEGER}
@@ -280,7 +280,7 @@
 		and u.number = #{number,jdbcType=INTEGER}
 	</if>
 	<if test="username != null">
-		and i.username like CONCAT('%', #{username,jdbcType=VARCHAR}, '%')   
+		and i.username like '%'#{username,jdbcType=VARCHAR}'%'   
 	</if>
 	<if test="auditStatus != null">
 		and i.audit_status= #{auditStatus,jdbcType=INTEGER}
@@ -785,11 +785,13 @@
 		info.logo_url AS logoUrl,
 		info.company_introduction AS company_introduction,
 		info.publicity_picture_url AS publicityPictureUrl,
+		ot.search_area_category as field, 
 		interest.id as interestId
 	FROM
 	<![CDATA[ user ]]> u
 	LEFT JOIN organization_identity oi ON oi.uid = u.id
 	LEFT JOIN organization_info info ON info.uid = u.id
+	LEFT JOIN organization_tech ot ON ot.uid = u.id
 	LEFT JOIN user_ability ua ON ua.uid = u.id
 	LEFT JOIN user_interest interest on interest.to_uid = u.id and interest.from_uid = #{tokenId,jdbcType=VARCHAR}
 	WHERE

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

@@ -41,7 +41,7 @@ public class UserInfo {
 	/**
 	 * 生活照
 	 */
-	@Size(min = 0, max = 255, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
+	@Size(min = 0, max = 1000, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
 	private String	lifePhotoUrl;
 
 	/**

+ 6 - 0
src/main/java/com/goafanti/demand/service/impl/DemandServiceImpl.java

@@ -298,6 +298,12 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 			d.setReleaseDate(now.getTime());
 			d.setReleaseStatus(DemandReleaseStatus.RELEASED.getCode());
 			d.setTechBrokerId(techBroderId);
+			
+			if (StringUtils.isNotBlank(d.getKeyword())){
+				String[] keywords = d.getKeyword().trim().split(",|,");
+				disposeDemandKeyword(keywords, d, false);
+			}
+			
 			String employerId = d.getEmployerId();
 			if (StringUtils.isNotBlank(employerId)) {
 				if (UserType.PERSONAL.getCode().equals(d.getDataCategory())) {

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

@@ -177,7 +177,7 @@ public class UserServiceImpl extends BaseMybatisDao<UserMapper> implements UserS
 		}
 
 		if (!StringUtils.isBlank(aftUsername)) {
-			params.put("username", aftUsername);
+			params.put("aftUsername", aftUsername);
 		}
 
 		if (pageNo == null || pageNo < 0) {