Browse Source

门户科技需求详情

Antiloveg 8 years ago
parent
commit
64cf6cdbff

+ 3 - 0
src/main/java/com/goafanti/common/dao/DemandMapper.java

@@ -4,6 +4,7 @@ import java.util.List;
 
 import com.goafanti.common.model.Demand;
 import com.goafanti.demand.bo.DemandManageDetailBo;
+import com.goafanti.portal.bo.DemandSearchDetailBo;
 
 public interface DemandMapper {
     int deleteByPrimaryKey(String id);
@@ -27,4 +28,6 @@ public interface DemandMapper {
 	int updateReleaseDate(String id);
 
 	void insertBatch(List<Demand> demandList);
+
+	DemandSearchDetailBo selectDemandSearchDetail(String id);
 }

+ 16 - 0
src/main/java/com/goafanti/common/mapper/DemandMapper.xml

@@ -963,4 +963,20 @@
   		and d.audit_status = 4
   </select>
   
+  <select id="selectDemandSearchDetail" parameterType="java.lang.String" resultType="com.goafanti.portal.bo.DemandSearchDetailBo"> 
+  	select 
+  		d.id, d.serial_number as serialNumber, d.keyword, 
+  		d.data_category as dataCategory, d.name, d.industry_category_a as industryCategoryA,
+  		d.industry_category_b as industryCategoryB, d.demand_type as demandType, d.budget_cost as budgetCost,
+  		d.problem_des as problemDes, d.release_date as releaseDate, d.technical_requirements as technicalRequirements,
+  		d.picture_url as pictureUrl, d.text_file_url as textFileUrl, d.video_url as videoUrl,
+  		d.fixed_cycle as fixedCycle, d.people_number as peopleNumber, d.fixed_scheme as fixedScheme,
+  		d.cost_escrow as costEscrow, d.validity_period as validityPeriod, ui.username,
+  		oi.unit_name as unitName
+  	from demand d
+  	left join user_identity ui on ui.uid = d.employer_id
+  	left join organization_identity oi on oi.uid = employer_id
+  	where d.id = #{id,jdbcType=VARCHAR}
+  </select>
+  
 </mapper>

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

@@ -10,6 +10,7 @@ import com.goafanti.demand.bo.DemandImportBo;
 import com.goafanti.demand.bo.DemandListBo;
 import com.goafanti.demand.bo.DemandManageDetailBo;
 import com.goafanti.demand.bo.DemandManageListBo;
+import com.goafanti.portal.bo.DemandSearchDetailBo;
 import com.goafanti.portal.bo.DemandSearchListBo;
 
 public interface DemandService {
@@ -54,4 +55,6 @@ public interface DemandService {
 			Integer industryCategoryB, Integer demandType, BigDecimal budgetCostLower, BigDecimal budgetCostUpper,
 			Integer pNo, Integer pSize);
 
+	DemandSearchDetailBo selectDemandSearchDetail(String id);
+
 }

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

@@ -46,6 +46,7 @@ import com.goafanti.demand.bo.DemandListBo;
 import com.goafanti.demand.bo.DemandManageDetailBo;
 import com.goafanti.demand.bo.DemandManageListBo;
 import com.goafanti.demand.service.DemandService;
+import com.goafanti.portal.bo.DemandSearchDetailBo;
 import com.goafanti.portal.bo.DemandSearchListBo;
 
 @Service
@@ -383,6 +384,12 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 				"findSearchDemandCount", params, pNo, pSize);
 	}
 	
+	@Override
+	public DemandSearchDetailBo selectDemandSearchDetail(String id) {
+		return demandMapper.selectDemandSearchDetail(id);
+	}
+
+	
 	
 
 	private Map<String, Object> disposeParams(Integer auditStatus, String province, Integer serialNumber, String name,
@@ -557,6 +564,7 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 	}
 
 	
+	
 
 	
 

+ 139 - 0
src/main/java/com/goafanti/portal/bo/DemandSearchDetailBo.java

@@ -0,0 +1,139 @@
+package com.goafanti.portal.bo;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+import org.apache.commons.lang3.time.DateFormatUtils;
+
+import com.goafanti.common.constant.AFTConstants;
+
+public class DemandSearchDetailBo extends DemandSearchListBo{
+	/**
+	 * 技术指标要求
+	 */
+	private String technicalRequirements;
+	
+	/**
+	 * 需求文件--图片URL
+	 */
+	private String pictureUrl;
+	
+	/**
+	 * 需求文件--文本文件
+	 */
+	private String textFileUrl;
+	
+	/**
+	 * 需求文件--视屏文件URL
+	 */
+	private String videoUrl;
+	
+	/**
+	 * 固定周期
+	 */
+	private String fixedCycle;
+	
+	/**
+	 * 固定人数
+	 */
+	private Integer peopleNumber; 
+	
+	/**
+	 * 固定方案
+	 */
+	private String fixedScheme;
+	
+	/**
+	 * 费用托管
+	 */
+	private BigDecimal costEscrow;
+	
+	/**
+	 * 有效期限
+	 */
+	private Date validityPeriod;
+
+	public String getTechnicalRequirements() {
+		return technicalRequirements;
+	}
+
+	public void setTechnicalRequirements(String technicalRequirements) {
+		this.technicalRequirements = technicalRequirements;
+	}
+
+	public String getPictureUrl() {
+		return pictureUrl;
+	}
+
+	public void setPictureUrl(String pictureUrl) {
+		this.pictureUrl = pictureUrl;
+	}
+
+	public String getTextFileUrl() {
+		return textFileUrl;
+	}
+
+	public void setTextFileUrl(String textFileUrl) {
+		this.textFileUrl = textFileUrl;
+	}
+
+	public String getVideoUrl() {
+		return videoUrl;
+	}
+
+	public void setVideoUrl(String videoUrl) {
+		this.videoUrl = videoUrl;
+	}
+
+	public String getFixedCycle() {
+		return fixedCycle;
+	}
+
+	public void setFixedCycle(String fixedCycle) {
+		this.fixedCycle = fixedCycle;
+	}
+
+	public Integer getPeopleNumber() {
+		return peopleNumber;
+	}
+
+	public void setPeopleNumber(Integer peopleNumber) {
+		this.peopleNumber = peopleNumber;
+	}
+
+	public String getFixedScheme() {
+		return fixedScheme;
+	}
+
+	public void setFixedScheme(String fixedScheme) {
+		this.fixedScheme = fixedScheme;
+	}
+
+	public BigDecimal getCostEscrow() {
+		return costEscrow;
+	}
+
+	public void setCostEscrow(BigDecimal costEscrow) {
+		this.costEscrow = costEscrow;
+	}
+
+	public Date getValidityPeriod() {
+		return validityPeriod;
+	}
+
+	public void setValidityPeriod(Date validityPeriod) {
+		this.validityPeriod = validityPeriod;
+	}
+	
+	public String getValidityPeriodFormattedDate() {
+		if (this.validityPeriod == null) {
+			return null;
+		} else {
+			return DateFormatUtils.format(this.getValidityPeriod(), AFTConstants.YYYYMMDD);
+		}
+	}
+
+	public void setValidityPeriodFormattedDate(String validityPeriodFormattedDate) {
+
+	}
+}

+ 22 - 7
src/main/java/com/goafanti/portal/controller/PortalSearchApiController.java

@@ -27,9 +27,9 @@ public class PortalSearchApiController extends BaseApiController {
 	 * 科技成果搜索
 	 */
 	@RequestMapping(value = "/achievementList", method = RequestMethod.GET)
-	public Result achievementSearchList(Integer bargainingMode, Integer category, Integer maturity, BigDecimal transferPriceLower,
-			BigDecimal transferPriceUpper, Integer transferMode, String keyword, Integer fieldA, Integer fieldB,
-			String pageNo, String pageSize) {
+	public Result achievementSearchList(Integer bargainingMode, Integer category, Integer maturity,
+			BigDecimal transferPriceLower, BigDecimal transferPriceUpper, Integer transferMode, String keyword,
+			Integer fieldA, Integer fieldB, String pageNo, String pageSize) {
 		Result res = new Result();
 		Integer pNo = 1;
 		Integer pSize = 10;
@@ -49,7 +49,8 @@ public class PortalSearchApiController extends BaseApiController {
 	 */
 	@RequestMapping(value = "/demandList", method = RequestMethod.GET)
 	public Result demandSerarchList(String keyword, Integer industryCategoryA, Integer industryCategoryB,
-			Integer demandType, BigDecimal budgetCostLower, BigDecimal budgetCostUpper,String pageNo, String pageSize) {
+			Integer demandType, BigDecimal budgetCostLower, BigDecimal budgetCostUpper, String pageNo,
+			String pageSize) {
 		Result res = new Result();
 		Integer pNo = 1;
 		Integer pSize = 10;
@@ -63,14 +64,14 @@ public class PortalSearchApiController extends BaseApiController {
 				budgetCostLower, budgetCostUpper, pNo, pSize));
 		return res;
 	}
-	
+
 	/**
 	 * 科技成果详情
 	 */
 	@RequestMapping(value = "/achievementDetail", method = RequestMethod.GET)
-	public Result achievementDetail(String id){
+	public Result achievementDetail(String id) {
 		Result res = new Result();
-		if (StringUtils.isBlank(id)){
+		if (StringUtils.isBlank(id)) {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到成果ID", "成果ID"));
 			return res;
 		}
@@ -78,4 +79,18 @@ public class PortalSearchApiController extends BaseApiController {
 		return res;
 	}
 
+	/**
+	 * 科技需求详情
+	 */
+	@RequestMapping(value = "/demandDetail", method = RequestMethod.GET)
+	public Result demandDetail(String id) {
+		Result res = new Result();
+		if (StringUtils.isBlank(id)) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到需求ID", "需求ID"));
+			return res;
+		}
+		res.setData(demandService.selectDemandSearchDetail(id));
+		return res;
+	}
+
 }