Parcourir la source

技术经纪人流转

Antiloveg il y a 8 ans
Parent
commit
b796c7af1f

+ 5 - 0
schema/data/permission.sql

@@ -510,3 +510,8 @@ insert into `permission`(`id`, `url`, `name`)
 values
 (UUID(), 'api/admin/cognizanceRecord/search', '高企信息管理--高企信息查询'),
 (UUID(), 'api/admin/cognizanceRecord/import', '高企信息管理--高企信息批量导入');
+
+insert into `permission`(`id`, `url`, `name`) 
+values
+(UUID(), 'api/admin/audit/modifyAchievementTechBroker', '科技成果技术经纪人流转(审核员)'),
+(UUID(), 'api/admin/audit/modifyDemandTechBroker', '科技需求技术经纪人流转(审核员)');

+ 2 - 0
src/main/java/com/goafanti/achievement/service/AchievementService.java

@@ -66,5 +66,7 @@ public interface AchievementService {
 
 	List<AchievementPortalSimilarListBo> findByFieldA(Integer fieldA, String id, Integer type);
 
+	int updateByPrimaryKeySelective(Achievement a);
+
 
 }

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

@@ -590,4 +590,9 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 		return null;
 	}
 
+	@Override
+	public int updateByPrimaryKeySelective(Achievement a) {
+		return achievementMapper.updateByPrimaryKey(a);
+	}
+
 }

+ 64 - 0
src/main/java/com/goafanti/admin/controller/AdminAuditApiController.java

@@ -27,6 +27,70 @@ public class AdminAuditApiController extends CertifyApiController {
 	private DemandService		demandService;
 	@Resource
 	private AchievementService	achievementService;
+	
+	/**
+	 * 科技成果技术经纪人流转
+	 */
+	@RequestMapping(value = "/modifyAchievementTechBroker", method = RequestMethod.POST)
+	public Result modifyAchievementTechBroker(String id, String techBrokerId){
+		Result res =new Result();
+		if (StringUtils.isBlank(id)){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "科技成果ID"));
+			return res;
+		}
+		
+		if(StringUtils.isBlank(techBrokerId)){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "技术经纪人ID"));
+			return res;
+		}
+		
+		Achievement a = achievementService.selectByPrimaryKey(id);
+		if (null == a){
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "科技成果ID"));
+			return res;
+		}
+		
+		if (!AchievementAuditStatus.AUDITED.getCode().equals(a.getAuditStatus())){
+			res.getError().add(buildError("", "当前状态无法更改技术经纪人!"));
+			return res;
+		}
+		
+		
+		a.setTechBrokerId(techBrokerId);
+		res.setData(achievementService.updateByPrimaryKeySelective(a));
+		return res;
+	}
+	
+	/**
+	 * 科技需求技术经纪人流转
+	 */
+	@RequestMapping(value = "/modifyDemandTechBroker", method = RequestMethod.POST)
+	public Result modifyDemandTechBroker(String id, String techBrokerId){
+		Result res =new Result();
+		if (StringUtils.isBlank(id)){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "科技需求ID"));
+			return res;
+		}
+		
+		if(StringUtils.isBlank(techBrokerId)){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "技术经纪人ID"));
+			return res;
+		}
+		
+		Demand d = demandService.selectByPrimaryKey(id);
+		if (null == d){
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "科技需求ID"));
+			return res;
+		}
+		
+		if (!DemandAuditStatus.AUDITED.getCode().equals(d.getAuditStatus())){
+			res.getError().add(buildError("", "当前状态无法更改技术经纪人!"));
+			return res;
+		}
+		d.setTechBrokerId(techBrokerId);
+		res.setData(demandService.updateByPrimaryKeySelective(d));
+		return res;
+	}
 
 	/**
 	 * 获取技术经纪人下拉

+ 51 - 50
src/main/java/com/goafanti/common/constant/ErrorConstants.java

@@ -2,103 +2,104 @@ package com.goafanti.common.constant;
 
 public class ErrorConstants {
 
-	public static final String	NON_LOGIN						= "NON_LOGIN";
+	public static final String	NON_LOGIN							= "NON_LOGIN";
 
-	public static final String	VCODE_ERROR						= "VCODE_ERROR";
+	public static final String	VCODE_ERROR							= "VCODE_ERROR";
 
-	public static final String	NO_AUTH_ERROR					= "NO_AUTH_ERROR";
+	public static final String	NO_AUTH_ERROR						= "NO_AUTH_ERROR";
 
-	public static final String	PARAM_ERROR						= "PARAM_ERROR";
+	public static final String	PARAM_ERROR							= "PARAM_ERROR";
 
-	public static final String	PARAM_INTEGER_ERROR				= "PARAM_INTEGER_ERROR";
+	public static final String	PARAM_INTEGER_ERROR					= "PARAM_INTEGER_ERROR";
 
-	public static final String	PARAM_EMPTY_ERROR				= "PARAM_EMPTY_ERROR";
+	public static final String	PARAM_EMPTY_ERROR					= "PARAM_EMPTY_ERROR";
 
-	public static final String	PARAM_SIZE_ERROR				= "PARAM_SIZE_ERROR";
+	public static final String	PARAM_SIZE_ERROR					= "PARAM_SIZE_ERROR";
 
-	public static final String	PARAM_PATTERN_ERROR				= "PARAM_PATTERN_ERROR";
+	public static final String	PARAM_PATTERN_ERROR					= "PARAM_PATTERN_ERROR";
 
-	public static final String	EMAIL_SIZE_ERROR				= "EMAIL_SIZE_ERROR";
+	public static final String	EMAIL_SIZE_ERROR					= "EMAIL_SIZE_ERROR";
 
-	public static final String	EMAIL_PATTERN_ERROR				= "EMAIL_PATTERN_ERROR";
+	public static final String	EMAIL_PATTERN_ERROR					= "EMAIL_PATTERN_ERROR";
 
-	public static final String	DUNPLICATE_KAY_ERROR			= "DUNPLICATE_KAY_ERROR";
+	public static final String	DUNPLICATE_KAY_ERROR				= "DUNPLICATE_KAY_ERROR";
 
-	public static final String	DATA_EMPTY_ERROR				= "DATA_EMPTY_ERROR";
+	public static final String	DATA_EMPTY_ERROR					= "DATA_EMPTY_ERROR";
 
-	public static final String	PWD_NOT_MATCH_ERROR				= "PWD_NOT_MATCH_ERROR";
+	public static final String	PWD_NOT_MATCH_ERROR					= "PWD_NOT_MATCH_ERROR";
 
-	public static final String	PWD_SAME_ERROR					= "PWD_SAME_ERROR";
+	public static final String	PWD_SAME_ERROR						= "PWD_SAME_ERROR";
 
-	public static final String	USER_ALREADY_EXIST				= "USER_ALREADY_EXIST";
+	public static final String	USER_ALREADY_EXIST					= "USER_ALREADY_EXIST";
 
-	public static final String	MOBILE_PATTERN_ERROR			= "MOBILE_PATTERN_ERROR";
+	public static final String	MOBILE_PATTERN_ERROR				= "MOBILE_PATTERN_ERROR";
 
-	public static final String	MOBILE_SIZE_ERROR				= "MOBILE_SIZE_ERROR";
+	public static final String	MOBILE_SIZE_ERROR					= "MOBILE_SIZE_ERROR";
 
-	public static final String	MOBILE_SAME_ERROR				= "MOBILE_SAME_ERROR";
+	public static final String	MOBILE_SAME_ERROR					= "MOBILE_SAME_ERROR";
 
-	public static final String	MOBILE_EMPTY_ERROR				= "MOBILE_EMPTY_ERROR";
+	public static final String	MOBILE_EMPTY_ERROR					= "MOBILE_EMPTY_ERROR";
 
-	public static final String	IDNUMBER_SIZE_ERROR				= "IDNUMBER_SIZE_ERROR";
+	public static final String	IDNUMBER_SIZE_ERROR					= "IDNUMBER_SIZE_ERROR";
 
-	public static final String	IDNUMBER_PATTERN_ERROR			= "IDNUMBER_PATTERN_ERROR";
+	public static final String	IDNUMBER_PATTERN_ERROR				= "IDNUMBER_PATTERN_ERROR";
 
-	public static final String	MCODE_ERROR						= "MCODE_ERROR";
+	public static final String	MCODE_ERROR							= "MCODE_ERROR";
 
-	public static final String	MCODE_OVERTIME_ERROR			= "MCODE_OVERTIME_ERROR";
+	public static final String	MCODE_OVERTIME_ERROR				= "MCODE_OVERTIME_ERROR";
 
-	public static final String	NON_REGISTER					= "NON_REGISTER";
+	public static final String	NON_REGISTER						= "NON_REGISTER";
 
-	public static final String	RESET_CODE_ERROR				= "RESET_CODE_ERROR";
+	public static final String	RESET_CODE_ERROR					= "RESET_CODE_ERROR";
 
-	public static final String	RESET_CODE_OVERTIME				= "RESET_CODE_OVERTIME";
+	public static final String	RESET_CODE_OVERTIME					= "RESET_CODE_OVERTIME";
 
-	public static final String	FILE_NON_EXISTENT				= "FILE_NON_EXISTENT";
+	public static final String	FILE_NON_EXISTENT					= "FILE_NON_EXISTENT";
 
-	public static final String	INSUFFICIENT_AUTHORITY_ERROR	= "INSUFFICIENT_AUTHORITY_ERROR";
+	public static final String	INSUFFICIENT_AUTHORITY_ERROR		= "INSUFFICIENT_AUTHORITY_ERROR";
 
-	public static final String	NON_CERTIFIED					= "NON_CERTIFIED";
+	public static final String	NON_CERTIFIED						= "NON_CERTIFIED";
 
-	public static final String	DUPLICATE_DATA_ERROR			= "DUPLICATE_DATA_ERROR";
+	public static final String	DUPLICATE_DATA_ERROR				= "DUPLICATE_DATA_ERROR";
 
-	public static final String	FILE_PATTERN_ERROR				= "FILE_PATTERN_ERROR";
+	public static final String	FILE_PATTERN_ERROR					= "FILE_PATTERN_ERROR";
 
-	public static final String	RECORD_CALLBACK					= "RECORD_CALLBACK";
+	public static final String	RECORD_CALLBACK						= "RECORD_CALLBACK";
 
-	public static final String	RECORD_SETTLEMENT				= "RECORD_SETTLEMENT";
+	public static final String	RECORD_SETTLEMENT					= "RECORD_SETTLEMENT";
 
-	public static final String	STATUS_ERROR					= "STATUS_ERROR";
+	public static final String	STATUS_ERROR						= "STATUS_ERROR";
 
-	public static final String	CONTRACT_PATENT_CREATED			= "CONTRACT_PATENT_CREATED";
+	public static final String	CONTRACT_PATENT_CREATED				= "CONTRACT_PATENT_CREATED";
 
-	public static final String	CONTRACT_COPYRIGHT_CREATED		= "CONTRACT_COPYRIGHT_CREATED";
+	public static final String	CONTRACT_COPYRIGHT_CREATED			= "CONTRACT_COPYRIGHT_CREATED";
 
-	public static final String	CONTRACT_TECHPROJECT_CREATED	= "CONTRACT_TECHPROJECT_CREATED";
+	public static final String	CONTRACT_TECHPROJECT_CREATED		= "CONTRACT_TECHPROJECT_CREATED";
 
-	public static final String	CONTRACT_COGNIZANCE_CREATED		= "CONTRACT_COGNIZANCE_CREATED";
+	public static final String	CONTRACT_COGNIZANCE_CREATED			= "CONTRACT_COGNIZANCE_CREATED";
 
-	public static final String	RECORD_REJECT					= "RECORD_REJECT";
+	public static final String	RECORD_REJECT						= "RECORD_REJECT";
 
-	public static final String	EVALUATE_ID						= "EVALUATE_ID";
+	public static final String	EVALUATE_ID							= "EVALUATE_ID";
 
-	public static final String	EVALUATE_STEP					= "EVALUATE_STEP";
+	public static final String	EVALUATE_STEP						= "EVALUATE_STEP";
 
-	public static final String	EVALUATE_PARAM					= "EVALUATE_PARAM";
+	public static final String	EVALUATE_PARAM						= "EVALUATE_PARAM";
 
-	public static final String	CONTRACT_YEAR_SECTION			= "CONTRACT_YEAR_SECTION";
+	public static final String	CONTRACT_YEAR_SECTION				= "CONTRACT_YEAR_SECTION";
 
-	public static final String	VCODE_EMPTY_ERROR				= "VCODE_EMPTY_ERROR";
+	public static final String	VCODE_EMPTY_ERROR					= "VCODE_EMPTY_ERROR";
 
-	public static final String	MCODE_FREQUENCY_ERROR			= "MCODE_FREQUENCY_ERROR";
+	public static final String	MCODE_FREQUENCY_ERROR				= "MCODE_FREQUENCY_ERROR";
 
-	public static final String	MCODE_EMPTY_ERROR				= "MCODE_EMPTY_ERROR";
+	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	IDENTITY_PAY_OVER_TIME				= "IDENTITY_PAY_OVER_TIME";
 
-	public static final String	OVER_MAX_WRONG_COUNT			= "OVER_MAX_WRONG_COUNT";
+	public static final String	OVER_MAX_WRONG_COUNT				= "OVER_MAX_WRONG_COUNT";
 
-	public static final String	WRONG_MONEY						= "WRONG_MONEY";
+	public static final String	WRONG_MONEY							= "WRONG_MONEY";
+
+	public static final String	M_CODE_ERROR						= "M_CODE_ERROR";
 
-	public static final String	M_CODE_ERROR					= "M_CODE_ERROR";
 }

+ 2 - 0
src/main/java/com/goafanti/demand/service/DemandService.java

@@ -70,6 +70,8 @@ public interface DemandService {
 
 	List<DemandPortalSimilarListBo> findByIndustryCategoryA(Integer industryCategoryA, String id);
 
+	int updateByPrimaryKeySelective(Demand d);
+
 
 
 }

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

@@ -706,4 +706,9 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 		return demandMapper.findByIndustryCategoryA(industryCategoryA, id);
 	}
 
+	@Override
+	public int updateByPrimaryKeySelective(Demand d) {
+		return demandMapper.updateByPrimaryKeySelective(d);
+	}
+
 }