Explorar o código

客户端合同详情-科技项目列表、高企记录、软著列表、专利列表

Antiloveg %!s(int64=8) %!d(string=hai) anos
pai
achega
f0bde2a59f

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

@@ -26,7 +26,10 @@ import com.goafanti.common.utils.StringUtils;
 import com.goafanti.contract.bo.InputSaveContract;
 import com.goafanti.contract.service.ContractLogService;
 import com.goafanti.contract.service.ContractService;
+import com.goafanti.copyright.service.CopyrightInfoService;
 import com.goafanti.core.shiro.token.TokenManager;
+import com.goafanti.patent.service.PatentInfoService;
+import com.goafanti.techproject.service.TechProjectService;
 
 @RestController
 @RequestMapping(value = "/api/user/contract")
@@ -37,6 +40,68 @@ public class ContractApiController extends CertifyApiController {
 	private OrgCognizanceService	orgCognizanceService;
 	@Resource
 	private ContractLogService		contractLogService;
+	@Resource
+	private CopyrightInfoService	copyrightInfoService;
+	@Resource
+	private TechProjectService		techProjectService;
+	@Resource
+	private PatentInfoService		patentInfoService;
+
+	/**
+	 * 合同详情-科技项目列表
+	 */
+	@RequestMapping(value = "/techProject", method = RequestMethod.GET)
+	public Result listTechProject(String contractId) {
+		Result res = new Result();
+		if (StringUtils.isBlank(contractId)) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到合同ID", "合同ID"));
+			return res;
+		}
+		res.setData(techProjectService.listContractTechProjectByContractId(contractId));
+		return res;
+	}
+
+	/**
+	 * 合同详情-高企记录
+	 */
+	@RequestMapping(value = "/cognizance", method = RequestMethod.GET)
+	public Result cognizance(String contractId) {
+		Result res = new Result();
+		if (StringUtils.isBlank(contractId)) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到合同ID", "合同ID"));
+			return res;
+		}
+		res.setData(orgCognizanceService.selectContractCognizanceByContractId(contractId));
+		return res;
+	}
+
+	/**
+	 * 合同详情-软著列表
+	 */
+	@RequestMapping(value = "/copyright", method = RequestMethod.GET)
+	public Result listCopyright(String contractId) {
+		Result res = new Result();
+		if (StringUtils.isBlank(contractId)) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到合同ID", "合同ID"));
+			return res;
+		}
+		res.setData(copyrightInfoService.listContractCopyrightByContractId(contractId));
+		return res;
+	}
+
+	/**
+	 * 合同详情-专利列表
+	 */
+	@RequestMapping(value = "/patent", method = RequestMethod.GET)
+	public Result listPatent(String contractId) {
+		Result res = new Result();
+		if (StringUtils.isBlank(contractId)) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到合同ID", "合同ID"));
+			return res;
+		}
+		res.setData(patentInfoService.listContractPatentByContractId(contractId));
+		return res;
+	}
 
 	/**
 	 * 合同流转日志

+ 2 - 2
src/main/java/com/goafanti/demand/controller/DemandApiController.java

@@ -21,7 +21,7 @@ public class DemandApiController {
 	 */
 	@RequestMapping(value = "/list", method = RequestMethod.GET)
 	public Result list(Integer serialNumber, String name, String keyword, Integer demandType,
-			String validityPeriodStartDate, String validityPeriodEndDate, String username, Integer status,
+			String validityPeriodStartDate, String validityPeriodEndDate, Integer status,
 			Integer releaseStatus, String releaseDateStartDate, String releaseDateEndDate, String pageNo,
 			String pageSize) {
 		Result res = new Result();
@@ -35,7 +35,7 @@ public class DemandApiController {
 			pNo = Integer.parseInt(pageNo);
 		}
 		res.setData(demandService.listDemand(serialNumber, name, keyword, demandType,
-				validityPeriodStartDate, validityPeriodEndDate, username, status, releaseStatus, releaseDateStartDate,
+				validityPeriodStartDate, validityPeriodEndDate, status, releaseStatus, releaseDateStartDate,
 				releaseDateEndDate, pNo, pSize));
 		return res;
 	}

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

@@ -34,7 +34,7 @@ public interface DemandService {
 
 
 	Pagination<DemandListBo> listDemand(Integer serialNumber, String name, String keyword, Integer demandType,
-			String validityPeriodStartDate, String validityPeriodEndDate, String username, Integer status,
+			String validityPeriodStartDate, String validityPeriodEndDate, Integer status,
 			Integer releaseStatus, String releaseDateStartDate, String releaseDateEndDate, Integer pNo, Integer pSize);
 
 }

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

@@ -339,7 +339,7 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 	@SuppressWarnings("unchecked")
 	@Override
 	public Pagination<DemandListBo> listDemand(Integer serialNumber, String name, String keyword, Integer demandType,
-			String validityPeriodStartDate, String validityPeriodEndDate, String username, Integer status,
+			String validityPeriodStartDate, String validityPeriodEndDate, Integer status,
 			Integer releaseStatus, String releaseDateStartDate, String releaseDateEndDate, Integer pNo, Integer pSize) {
 		Map<String, Object> params = new HashMap<>();
 		Date vStart = null;
@@ -405,10 +405,6 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 			params.put("keyword", keyword);
 		}
 
-		if (!StringUtils.isBlank(username)) {
-			params.put("username", username);
-		}
-
 		if (null != demandType) {
 			params.put("demandType", demandType);
 		}