Antiloveg il y a 8 ans
Parent
commit
4f571cf693

+ 16 - 32
src/main/java/com/goafanti/admin/controller/AdminApiController.java

@@ -45,7 +45,6 @@ import com.goafanti.cognizance.bo.InputOrgTechAchievement;
 import com.goafanti.cognizance.bo.InputOrgTechCenter;
 import com.goafanti.cognizance.bo.InputOrgTechCenterDetail;
 import com.goafanti.cognizance.bo.InputOrgTechProduct;
-import com.goafanti.cognizance.bo.LatelyCogRecord;
 import com.goafanti.cognizance.bo.OrgIntellectualPropertyDetailBo;
 import com.goafanti.cognizance.service.OrgActivityCostService;
 import com.goafanti.cognizance.service.OrgActivityService;
@@ -121,7 +120,6 @@ import com.goafanti.common.model.UserIdentity;
 import com.goafanti.common.utils.DateUtils;
 import com.goafanti.common.utils.PasswordUtil;
 import com.goafanti.common.utils.StringUtils;
-import com.goafanti.common.utils.TimeUtils;
 import com.goafanti.copyright.bo.CopyrightInfoDetail;
 import com.goafanti.copyright.service.CopyrightInfoService;
 import com.goafanti.core.mybatis.page.Pagination;
@@ -692,7 +690,8 @@ public class AdminApiController extends CertifyApiController {
 			return res;
 		}
 
-		if (!saveSign.equals(CertifySubmitType.SAVE.getCode()) && !saveSign.equals(CertifySubmitType.SUBMIT.getCode())) {
+		if (!saveSign.equals(CertifySubmitType.SAVE.getCode())
+				&& !saveSign.equals(CertifySubmitType.SUBMIT.getCode())) {
 			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "保存提交方式"));
 			return res;
 		}
@@ -765,8 +764,7 @@ public class AdminApiController extends CertifyApiController {
 		res.setData(organizationIdentityService.selectOrgIdentityDetailByUserId(uid));
 		return res;
 	}
-	
-    
+
 	/**
 	 * 修改团体用户信息
 	 * 
@@ -795,7 +793,8 @@ public class AdminApiController extends CertifyApiController {
 			return res;
 		}
 
-		if (!saveSign.equals(CertifySubmitType.SAVE.getCode()) && !saveSign.equals(CertifySubmitType.SUBMIT.getCode())){
+		if (!saveSign.equals(CertifySubmitType.SAVE.getCode())
+				&& !saveSign.equals(CertifySubmitType.SUBMIT.getCode())) {
 			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "保存提交方式"));
 			return res;
 		}
@@ -1803,12 +1802,12 @@ public class AdminApiController extends CertifyApiController {
 
 		OrgActivityCost oac = new OrgActivityCost();
 		BeanUtils.copyProperties(orgActivityCost, oac);
-		
+
 		if (null != orgActivityCostService.selectOrgActivityCostByAidAndYear(oac.getAid(), oac.getYear())) {
 			res.getError().add(buildError(ErrorConstants.DUPLICATE_DATA_ERROR, "该研究项目当前年份费用详情已录入!"));
 			return res;
 		}
-		
+
 		if (StringUtils.isBlank(oac.getId())) {
 			OrgActivity ac = orgActivityService.selectOrgActivityByPrimaryKey(oac.getAid());
 			if (null != ac) {
@@ -3007,33 +3006,13 @@ public class AdminApiController extends CertifyApiController {
 			return res;
 		}
 
-		LatelyCogRecord lcr = orgCognizanceService.selectLatelyRecord(cog.getUid());
-
-		if (null != lcr && null != lcr.getState() && OrgCognizanceStatus.FOSTER.getCode() == lcr.getState()) {
-			res.getError().add(buildError(ErrorConstants.STATUS_ERROR, "高企培育中!无法提交新申请!", "高企培育中!无法提交新申请!"));
+		Integer latelyYear = orgCognizanceService.selectLatelyRecordYear(cog.getUid());
+		if (null != latelyYear && cog.getYear() - latelyYear < 4) {
+			res.getError()
+					.add(buildError(ErrorConstants.STATUS_ERROR, "高企认定申请中或认定未到期!无法提交新申请!", "高企认定申请中或认定未到期!无法提交新申请!"));
 			return res;
 		}
 
-		if (null != lcr && null != lcr.getState() && OrgCognizanceStatus.SETTLEMENT.getCode() != lcr.getState()
-				&& OrgCognizanceStatus.CALLBACK.getCode() != lcr.getState()) {
-			res.getError().add(buildError(ErrorConstants.STATUS_ERROR, "高企申请中!无法提交新申请!", "高企申请中!无法提交新申请!"));
-			return res;
-		}
-
-		if (null != lcr && null != lcr.getState() && OrgCognizanceStatus.SETTLEMENT.getCode() == lcr.getState()) {
-			if (null == lcr.getIssuingDate()) {
-				res.getError().add(buildError(ErrorConstants.STATUS_ERROR, "高企认定未过期!无法提交新申请!", "高企认定未过期!无法提交新申请!"));
-				return res;
-			}
-			try {
-				if (Boolean.FALSE == TimeUtils.checkCogExpire(lcr.getIssuingDate())) {
-					res.getError().add(buildError(ErrorConstants.STATUS_ERROR, "高企认定未过期,无法提交新申请!", "高企认定未过期,无法提交新申请!"));
-					return res;
-				}
-			} catch (ParseException e) {
-			}
-		}
-		
 		String salesman = cog.getSalesman();
 		OrgCognizance oc = new OrgCognizance();
 		BeanUtils.copyProperties(cog, oc);
@@ -3157,6 +3136,11 @@ public class AdminApiController extends CertifyApiController {
 			res.getError().add(buildError(ErrorConstants.RECORD_SETTLEMENT, "当前记录已结款,无法修改!"));
 			return res;
 		}
+		
+		if (OrgCognizanceStatus.REJECT.getCode() == o.getState()) {
+			res.getError().add(buildError(ErrorConstants.RECORD_REJECT, "当前申请未通过,无法修改,请重新申请"));
+			return res;
+		}
 
 		if (!checkCertify(res, cog.getUid()).getError().isEmpty()) {
 			return res;

+ 14 - 33
src/main/java/com/goafanti/admin/controller/AdminContractApiController.java

@@ -1,6 +1,5 @@
 package com.goafanti.admin.controller;
 
-import java.text.ParseException;
 import java.util.Map;
 import java.util.TreeMap;
 
@@ -15,7 +14,6 @@ import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
 import com.goafanti.admin.service.AdminService;
-import com.goafanti.cognizance.bo.LatelyCogRecord;
 import com.goafanti.cognizance.service.OrgCognizanceService;
 import com.goafanti.common.bo.Result;
 import com.goafanti.common.constant.AFTConstants;
@@ -25,11 +23,9 @@ import com.goafanti.common.enums.ContractBusinessStatus;
 import com.goafanti.common.enums.ContractFields;
 import com.goafanti.common.enums.ContractLogFields;
 import com.goafanti.common.enums.ContractStatus;
-import com.goafanti.common.enums.OrgCognizanceStatus;
 import com.goafanti.common.model.Contract;
 import com.goafanti.common.model.User;
 import com.goafanti.common.utils.StringUtils;
-import com.goafanti.common.utils.TimeUtils;
 import com.goafanti.contract.bo.InputContactLog;
 import com.goafanti.contract.bo.InputContract;
 import com.goafanti.contract.bo.InputSaveContract;
@@ -87,7 +83,7 @@ public class AdminContractApiController extends CertifyApiController {
 		}
 
 		if (null != c.getCognizanceYear()) {
-			if (!disposeCog(c.getUid(), res).getError().isEmpty()) {
+			if (!disposeCog(c.getCognizanceYear(), c.getUid(), res).getError().isEmpty()) {
 				return res;
 			}
 		}
@@ -289,11 +285,11 @@ public class AdminContractApiController extends CertifyApiController {
 		}
 
 		if (null != contract.getCognizanceYear()) {
-			if (!disposeCog(contract.getUid(), res).getError().isEmpty()) {
+			if (!disposeCog(contract.getCognizanceYear(), contract.getUid(), res).getError().isEmpty()) {
 				return res;
 			}
 		}
-		
+
 		Contract c = new Contract();
 		BeanUtils.copyProperties(contract, c);
 		if (StringUtils.isBlank(contract.getId())) {
@@ -332,14 +328,18 @@ public class AdminContractApiController extends CertifyApiController {
 		}
 
 		if (null != ic.getCognizanceYear()) {
-			if (!disposeCog(ic.getUid(), res).getError().isEmpty()) {
+			if (!disposeCog(ic.getCognizanceYear(), ic.getUid(), res).getError().isEmpty()) {
 				return res;
 			}
 		}
 
 		Contract c = new Contract();
 		BeanUtils.copyProperties(ic, c);
-		contractService.insertManageSubmit(c, principals, signDateFormattedDate);
+		if (StringUtils.isBlank(ic.getId())) {
+			contractService.insertManageSubmit(c, principals, signDateFormattedDate);
+		} else {
+			contractService.updateByPrimaryKeySelective(c);
+		}
 		return res;
 	}
 
@@ -418,32 +418,13 @@ public class AdminContractApiController extends CertifyApiController {
 		return res;
 	}
 
-	private Result disposeCog(String uid, Result res) {
-		LatelyCogRecord lcr = orgCognizanceService.selectLatelyRecord(uid);
-		if (null != lcr && null != lcr.getState() && OrgCognizanceStatus.FOSTER.getCode() == lcr.getState()) {
-			res.getError().add(buildError(ErrorConstants.STATUS_ERROR, "高企培育中!无法提交新申请!", "高企培育中!无法提交新申请!"));
-			return res;
-		}
-
-		if (null != lcr && null != lcr.getState() && OrgCognizanceStatus.SETTLEMENT.getCode() != lcr.getState()
-				&& OrgCognizanceStatus.CALLBACK.getCode() != lcr.getState()) {
-			res.getError().add(buildError(ErrorConstants.STATUS_ERROR, "高企申请中!无法提交新申请!", "高企申请中!无法提交新申请!"));
+	private Result disposeCog(Integer year, String uid, Result res) {
+		Integer latelyYear = orgCognizanceService.selectLatelyRecordYear(uid);
+		if (null != latelyYear && year - latelyYear < 4) {
+			res.getError()
+					.add(buildError(ErrorConstants.STATUS_ERROR, "高企认定申请中或认定未到期!无法提交新申请!", "高企认定申请中或认定未到期!无法提交新申请!"));
 			return res;
 		}
-
-		if (null != lcr && null != lcr.getState() && OrgCognizanceStatus.SETTLEMENT.getCode() == lcr.getState()) {
-			if (null == lcr.getIssuingDate()) {
-				res.getError().add(buildError(ErrorConstants.STATUS_ERROR, "高企认定未过期!无法提交新申请!", "高企认定未过期!无法提交新申请!"));
-				return res;
-			}
-			try {
-				if (Boolean.FALSE == TimeUtils.checkCogExpire(lcr.getIssuingDate())) {
-					res.getError().add(buildError(ErrorConstants.STATUS_ERROR, "高企认定未过期,无法提交新申请!", "高企认定未过期,无法提交新申请!"));
-					return res;
-				}
-			} catch (ParseException e) {
-			}
-		}
 		return res;
 	}
 

+ 6 - 6
src/main/java/com/goafanti/admin/controller/AdminPatentApiController.java

@@ -156,7 +156,7 @@ public class AdminPatentApiController extends CertifyApiController {
 	 * @throws ParseException
 	 */
 	@RequestMapping(value = "/patentList", method = RequestMethod.GET)
-	public Result patentList(Integer serialNumber, String patentNumber, String office, String locationProvince,
+	public Result patentList(String contractId, Integer serialNumber, String patentNumber, String office, String locationProvince,
 			String unitName, Integer patentCatagory, String patentName, Integer patentState, String uid,
 			@RequestParam(name = "createTime[]", required = false) String[] createTime,
 			@RequestParam(name = "patentApplicationDate[]", required = false) String[] patentApplicationDate,
@@ -170,7 +170,7 @@ public class AdminPatentApiController extends CertifyApiController {
 		if (StringUtils.isNumeric(pageNo)) {
 			pNo = Integer.parseInt(pageNo);
 		}
-		res.setData(patentInfoService.getManagePatentList(serialNumber, patentNumber, office, locationProvince,
+		res.setData(patentInfoService.getManagePatentList(contractId, serialNumber, patentNumber, office, locationProvince,
 				unitName, patentCatagory, patentName, patentState, createTime, patentApplicationDate, author, uid, pNo,
 				pSize));
 		return res;
@@ -818,7 +818,7 @@ public class AdminPatentApiController extends CertifyApiController {
 	 */
 	@SuppressWarnings("unchecked")
 	@RequestMapping(value = "/exportComposite", method = RequestMethod.GET)
-	public Result exportComposite(@RequestParam(name = "serialNumber", required = false) String serialNumber,
+	public Result exportComposite(String contractId, @RequestParam(name = "serialNumber", required = false) String serialNumber,
 			String patentNumber, String office, String locationProvince, String unitName, String uid,
 			@RequestParam(name = "patentCatagory", required = false) String patentCatagory, String patentName,
 			@RequestParam(name = "patentState", required = false) String patentState,
@@ -831,7 +831,7 @@ public class AdminPatentApiController extends CertifyApiController {
 		Integer pc = (!StringUtils.isNumeric(patentCatagory) ? null : Integer.parseInt(patentCatagory));
 		Integer ps = (!StringUtils.isNumeric(patentState) ? null : Integer.parseInt(patentState));
 		String lp = ("undefined".equals(locationProvince)) ? null : locationProvince;
-		List<PatentManageListBo> composites = (List<PatentManageListBo>) getManagePatentList(sn, patentNumber, office,
+		List<PatentManageListBo> composites = (List<PatentManageListBo>) getManagePatentList(contractId, sn, patentNumber, office,
 				lp, unitName, pc, patentName, ps, createTime, patentApplicationDate, author, uid, 1, 1000).getList();
 		if (res.getError().isEmpty()) {
 			exportComosites(response, composites);
@@ -1138,11 +1138,11 @@ public class AdminPatentApiController extends CertifyApiController {
 	}
 
 	// 管理端申请专利列表(专利综合管理)
-	private Pagination<PatentManageListBo> getManagePatentList(Integer serialNumber, String patentNumber, String office,
+	private Pagination<PatentManageListBo> getManagePatentList(String contractId, Integer serialNumber, String patentNumber, String office,
 			String locationProvince, String unitName, Integer patentCatagory, String patentName, Integer patentState,
 			String[] createTime, String[] patentApplicationDate, String author, String uid, Integer pNo, Integer pSize)
 			throws ParseException {
-		return patentInfoService.getManagePatentList(serialNumber, patentNumber, office, locationProvince, unitName,
+		return patentInfoService.getManagePatentList(contractId, serialNumber, patentNumber, office, locationProvince, unitName,
 				patentCatagory, patentName, patentState, createTime, patentApplicationDate, author, uid, pNo, pSize);
 	}
 

+ 7 - 16
src/main/java/com/goafanti/cognizance/bo/LatelyCogRecord.java

@@ -1,16 +1,13 @@
 package com.goafanti.cognizance.bo;
 
-import java.util.Date;
 
 public class LatelyCogRecord {
 	
 	private String id;
 	
-	private Date issuingDate;
-	
 	private Integer state;
 	
-	private Date recordTime;
+	private Integer year;
 
 	public String getId() {
 		return id;
@@ -20,14 +17,6 @@ public class LatelyCogRecord {
 		this.id = id;
 	}
 
-	public Date getIssuingDate() {
-		return issuingDate;
-	}
-
-	public void setIssuingDate(Date issuingDate) {
-		this.issuingDate = issuingDate;
-	}
-
 	public Integer getState() {
 		return state;
 	}
@@ -36,14 +25,16 @@ public class LatelyCogRecord {
 		this.state = state;
 	}
 
-	public Date getRecordTime() {
-		return recordTime;
+	public Integer getYear() {
+		return year;
 	}
 
-	public void setRecordTime(Date recordTime) {
-		this.recordTime = recordTime;
+	public void setYear(Integer year) {
+		this.year = year;
 	}
 	
 	
+	
+	
 
 }

+ 4 - 23
src/main/java/com/goafanti/cognizance/controller/CognizanceApiController.java

@@ -40,7 +40,6 @@ import com.goafanti.cognizance.bo.InputOrgTechAchievement;
 import com.goafanti.cognizance.bo.InputOrgTechCenter;
 import com.goafanti.cognizance.bo.InputOrgTechCenterDetail;
 import com.goafanti.cognizance.bo.InputOrgTechProduct;
-import com.goafanti.cognizance.bo.LatelyCogRecord;
 import com.goafanti.cognizance.bo.OrgIntellectualPropertyDetailBo;
 import com.goafanti.cognizance.service.OrgActivityCostService;
 import com.goafanti.cognizance.service.OrgActivityService;
@@ -99,7 +98,6 @@ import com.goafanti.common.utils.DateUtils;
 import com.goafanti.common.utils.FileUtils;
 import com.goafanti.common.utils.LoggerUtils;
 import com.goafanti.common.utils.StringUtils;
-import com.goafanti.common.utils.TimeUtils;
 import com.goafanti.copyright.bo.CopyrightInfoDetail;
 import com.goafanti.copyright.service.CopyrightInfoService;
 import com.goafanti.core.shiro.token.TokenManager;
@@ -2299,30 +2297,13 @@ public class CognizanceApiController extends CertifyApiController {
 			return res;
 		}
 
-		LatelyCogRecord lcr = orgCognizanceService.selectLatelyRecord(TokenManager.getUserId());
-
-		if (null != lcr && null != lcr.getState() && OrgCognizanceStatus.SETTLEMENT.getCode() != lcr.getState()
-				&& OrgCognizanceStatus.FOSTER.getCode() != lcr.getState()
-				&& OrgCognizanceStatus.CALLBACK.getCode() != lcr.getState()) {
-			res.getError().add(buildError(ErrorConstants.STATUS_ERROR, "", "高企申请中!无法提交新申请!"));
+		Integer latelyYear = orgCognizanceService.selectLatelyRecordYear(cog.getUid());
+		if (null != latelyYear && cog.getYear() - latelyYear < 4) {
+			res.getError()
+					.add(buildError(ErrorConstants.STATUS_ERROR, "高企认定申请中或认定未到期!无法提交新申请!", "高企认定申请中或认定未到期!无法提交新申请!"));
 			return res;
 		}
 
-		if (null != lcr && null != lcr.getState() && OrgCognizanceStatus.SETTLEMENT.getCode() == lcr.getState()) {
-			if (null == lcr.getIssuingDate()) {
-				res.getError().add(buildError(ErrorConstants.STATUS_ERROR, "", "高企申请中!无法提交新申请!"));
-				return res;
-			}
-			try {
-				if (Boolean.FALSE == TimeUtils.checkCogExpire(lcr.getIssuingDate())) {
-					res.getError().add(buildError(ErrorConstants.STATUS_ERROR, "", "高企认定未过期,无法提交新申请!"));
-					return res;
-				}
-			} catch (ParseException e) {
-			}
-
-		}
-
 		OrgCognizance oc = new OrgCognizance();
 		BeanUtils.copyProperties(cog, oc);
 		oc.setUid(TokenManager.getUserId());

+ 1 - 2
src/main/java/com/goafanti/cognizance/service/OrgCognizanceService.java

@@ -13,7 +13,6 @@ import com.goafanti.cognizance.bo.CognizanceManageCostBo;
 import com.goafanti.cognizance.bo.CognizanceOrgInfoBo;
 import com.goafanti.cognizance.bo.CognizanceResearchCostBo;
 import com.goafanti.cognizance.bo.CultivationListBo;
-import com.goafanti.cognizance.bo.LatelyCogRecord;
 import com.goafanti.common.model.Contract;
 import com.goafanti.common.model.OrgCognizance;
 import com.goafanti.common.model.OrgCognizanceLog;
@@ -51,7 +50,7 @@ public interface OrgCognizanceService {
 
 	OrgCognizance selectByPrimaryKey(String id);
 
-	LatelyCogRecord selectLatelyRecord(String uid);
+	Integer selectLatelyRecordYear(String uid);
 
 	BusinessCountBo countBusiness(String uid);
 

+ 2 - 3
src/main/java/com/goafanti/cognizance/service/impl/OrgCognizanceServiceImpl.java

@@ -21,7 +21,6 @@ import com.goafanti.cognizance.bo.CognizanceManageCostBo;
 import com.goafanti.cognizance.bo.CognizanceOrgInfoBo;
 import com.goafanti.cognizance.bo.CognizanceResearchCostBo;
 import com.goafanti.cognizance.bo.CultivationListBo;
-import com.goafanti.cognizance.bo.LatelyCogRecord;
 import com.goafanti.cognizance.service.OrgCognizanceService;
 import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.dao.CopyrightInfoMapper;
@@ -332,8 +331,8 @@ public class OrgCognizanceServiceImpl extends BaseMybatisDao<OrgCognizanceMapper
 	}
 
 	@Override
-	public LatelyCogRecord selectLatelyRecord(String uid) {
-		return orgCognizanceMapper.selectLatelyRecord(uid);
+	public Integer selectLatelyRecordYear(String uid) {
+		return orgCognizanceMapper.selectLatelyRecordYear(uid);
 	}
 
 	@Override

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

@@ -78,4 +78,6 @@ public class ErrorConstants {
 
 	public static final String	CONTRACT_COGNIZANCE_CREATED		= "CONTRACT_COGNIZANCE_CREATED";
 
+	public static final String	RECORD_REJECT					= "RECORD_REJECT";
+
 }

+ 1 - 2
src/main/java/com/goafanti/common/dao/OrgCognizanceMapper.java

@@ -8,7 +8,6 @@ import com.goafanti.cognizance.bo.CognizanceContractBo;
 import com.goafanti.cognizance.bo.CognizanceManageCostBo;
 import com.goafanti.cognizance.bo.CognizanceOrgInfoBo;
 import com.goafanti.cognizance.bo.CognizanceResearchCostBo;
-import com.goafanti.cognizance.bo.LatelyCogRecord;
 import com.goafanti.common.model.OrgCognizance;
 
 public interface OrgCognizanceMapper {
@@ -38,7 +37,7 @@ public interface OrgCognizanceMapper {
 
 	int batchDeleteByPrimaryKey(List<String> id);
 
-	LatelyCogRecord selectLatelyRecord(String uid);
+	Integer selectLatelyRecordYear(String uid);
 
 	List<CognizanceContractBo> selectContractCognizanceByContractId(String contractId);
 

+ 4 - 5
src/main/java/com/goafanti/common/mapper/OrgActivityMapper.xml

@@ -374,15 +374,14 @@
     select 
     <include refid="Base_Column_List" />
     from org_activity
-    where uid = #{1} and (
+    where uid = #{1} and (start_date <![CDATA[ <> ]]> null and
     start_date 
 		 >= (select  str_to_date(CONCAT(#{0}-2,'-01-01'), '%Y-%m-%d %H'))
-				and  start_date   <![CDATA[ < ]]> (select  str_to_date(CONCAT(#{0}+1,'-01-01'), '%Y-%m-%d %H'))
-	)
-	or (
+				or  start_date   <![CDATA[ < ]]> (select  str_to_date(CONCAT(#{0}+1,'-01-01'), '%Y-%m-%d %H'))
+	or end_date <![CDATA[ <> ]]> null and 
 	end_date 
 		 >= (select  str_to_date(CONCAT(#{0}-2,'-01-01'), '%Y-%m-%d %H'))
-				and  end_date   <![CDATA[ < ]]> (select  str_to_date(CONCAT(#{0}+1,'-01-01'), '%Y-%m-%d %H'))
+				or  end_date   <![CDATA[ < ]]> (select  str_to_date(CONCAT(#{0}+1,'-01-01'), '%Y-%m-%d %H'))
 	)
 	and deleted_sign = 0 order by start_date 
   </select>

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

@@ -513,10 +513,10 @@
 	</if>
   </select>
   
-  <select id="selectLatelyRecord" resultType="com.goafanti.cognizance.bo.LatelyCogRecord" parameterType="java.lang.String" >
-    select c.id, c.issuing_date as issuingDate, l.state, MAX(l.record_time) as recordTime
-		   from org_cognizance c LEFT JOIN org_cognizance_log l on 
-    c.id = l.cid  where c.uid = #{uid,jdbcType=VARCHAR} and c.deleted_sign = 0 group by  c.id
+  <select id="selectLatelyRecordYear" resultType="Integer" parameterType="java.lang.String" >
+  select Max(year)  from  org_cognizance  where state not in (8, 11, 13)
+	 and deleted_sign = 0 and uid= #{uid,jdbcType=VARCHAR} 
+
   </select>
   
   <select id="selectContractCognizanceByContractId" resultType="com.goafanti.cognizance.bo.CognizanceContractBo" parameterType="java.lang.String" >

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

@@ -608,7 +608,7 @@
 		p.patent_application_date as
 		patentApplicationDate, p.authorized_date as authorizedDate,
 		a.name as
-		author, ad.name as founder
+		author, ad.name as founder, p.contract_id as contractId
 		from patent_info p
 		LEFT JOIN organization_identity o on p.uid =
 		o.uid
@@ -621,6 +621,9 @@
 		<if test="principal != null">
 			and  l.principal = #{principal,jdbcType=VARCHAR}
 		</if>
+		<if test="contractId != null">
+			and p.contract_id = #{contractId,jdbcType=VARCHAR}
+		</if>
 		<if test="serialNumber != null">
 			and p.serial_number = #{serialNumber,jdbcType=INTEGER}
 		</if>
@@ -696,7 +699,9 @@
 		<if test="principal != null">
 			and  l.principal = #{principal,jdbcType=VARCHAR}
 		</if>
-		
+		<if test="contractId != null">
+			and p.contract_id = #{contractId,jdbcType=VARCHAR}
+		</if>
 		<if test="serialNumber != null">
 			and p.serial_number = #{serialNumber,jdbcType=INTEGER}
 		</if>

+ 14 - 2
src/main/java/com/goafanti/patent/bo/PatentManageListBo.java

@@ -36,9 +36,20 @@ public class PatentManageListBo {
 	private String	author;
 
 	private String	founder;
+
+	private Integer	patentCatagory;
+
+	private String	contractId;
 	
-	private Integer patentCatagory;
-	
+
+	public String getContractId() {
+		return contractId;
+	}
+
+	public void setContractId(String contractId) {
+		this.contractId = contractId;
+	}
+
 	@JsonFormat(shape = Shape.STRING)
 	public Integer getPatentCatagory() {
 		return patentCatagory;
@@ -47,6 +58,7 @@ public class PatentManageListBo {
 	public void setPatentCatagory(Integer patentCatagory) {
 		this.patentCatagory = patentCatagory;
 	}
+
 	public String getFounder() {
 		return founder;
 	}

+ 1 - 1
src/main/java/com/goafanti/patent/service/PatentInfoService.java

@@ -25,7 +25,7 @@ public interface PatentInfoService {
 	Pagination<PatentInfo> getClientApplyList(String userId, String patentNumber, String patentName,
 			Integer parentCatagory, Integer patentState, Integer pNo, Integer pSize);
 
-	Pagination<PatentManageListBo> getManagePatentList(Integer serialNumber, String patentNumber, String office,
+	Pagination<PatentManageListBo> getManagePatentList(String contractId, Integer serialNumber, String patentNumber, String office,
 			String locationProvince, String unitName, Integer patentCatagory, String patentName, Integer patentState,
 			String[] createTime, String[] patentApplicationDate, String author, String uid, Integer pNo, Integer pSize);
 

+ 5 - 1
src/main/java/com/goafanti/patent/service/impl/PatentInfoServiceImpl.java

@@ -133,7 +133,7 @@ public class PatentInfoServiceImpl extends BaseMybatisDao<PatentInfoMapper> impl
 
 	@SuppressWarnings("unchecked")
 	@Override
-	public Pagination<PatentManageListBo> getManagePatentList(Integer serialNumber, String patentNumber, String office,
+	public Pagination<PatentManageListBo> getManagePatentList(String contractId, Integer serialNumber, String patentNumber, String office,
 			String locationProvince, String unitName, Integer patentCatagory, String patentName, Integer patentState,
 			String[] cDate, String[] pDate, String author, String uid, Integer pageNo, Integer pageSize) {
 		Map<String, Object> params = new HashMap<>();
@@ -179,6 +179,10 @@ public class PatentInfoServiceImpl extends BaseMybatisDao<PatentInfoMapper> impl
 		if (pEnd != null) {
 			params.put("pEnd", pEnd);
 		}
+		
+		if (!StringUtils.isBlank(contractId)){
+			params.put("contractId", contractId);
+		}
 
 		if (serialNumber != null) {
 			params.put("serialNumber", serialNumber);

+ 2 - 0
src/main/resources/props/error.properties

@@ -44,6 +44,8 @@ RECORD_CALLBACK=\u5f53\u524d\u8bb0\u5f55\u5df2\u9000\u5355\uff0c\u65e0\u6cd5\u4f
 
 RECORD_SETTLEMENT=\u5f53\u524d\u8bb0\u5f55\u5df2\u7ed3\u6b3e\uff0c\u65e0\u6cd5\u4fee\u6539\uff01
 
+RECORD_REJECT=\u5f53\u524d\u7533\u8bf7\u672a\u901a\u8fc7\uff0c\u65e0\u6cd5\u4fee\u6539\uff0c\u8bf7\u91cd\u65b0\u7533\u8bf7\uff01
+
 CONTRACT_PATENT_CREATED=\u5f53\u524d\u5408\u540c\u4e13\u5229\u7533\u8bf7\u5df2\u521b\u5efa,\u65e0\u6cd5\u91cd\u590d\u521b\u5efa\uff01
 
 CONTRACT_COPYRIGHT_CREATED=\u5f53\u524d\u5408\u540c\u8f6f\u8457\u7533\u8bf7\u5df2\u521b\u5efa,\u65e0\u6cd5\u91cd\u590d\u521b\u5efa\uff01