Parcourir la source

科技需求首页:人才需求、研产资金需求

liliang4869 il y a 7 ans
Parent
commit
53c549a3d4

+ 25 - 5
src/main/java/com/goafanti/common/controller/WebpageController.java

@@ -6,6 +6,7 @@ import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 import javax.validation.constraints.Min;
 
+import org.apache.commons.fileupload.util.LimitedInputStream;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
@@ -431,8 +432,8 @@ public class WebpageController extends BaseController {
 		List<DemandListBo> urgentDemand2=urgentDemand.subList(0, Math.min(2, urgentDemand.size()));
 		List<DemandListBo> urgentDemand3=urgentDemand.subList( Math.min(2, urgentDemand.size()),  Math.min(5, urgentDemand.size()));
 		System.out.print("u2:"+urgentDemand2.size()+" u3:"+urgentDemand3.size());
-		LimitLengthUtil.limiteDemandLength(urgentDemand2,10,30);
-		LimitLengthUtil.limiteDemandLength(urgentDemand3,10,30);
+		LimitLengthUtil.limiteDemandLength(urgentDemand2,13,30);
+		LimitLengthUtil.limiteDemandLength(urgentDemand3,13,33);
 		modelview.addObject("urgentDemand2",urgentDemand2);
 		modelview.addObject("urgentDemand3",urgentDemand3);
 		
@@ -441,8 +442,8 @@ public class WebpageController extends BaseController {
 		List<DemandListBo> hotDemand2=hotDemand.subList(0, Math.min(2, hotDemand.size()));
 		List<DemandListBo> hotDemand3=hotDemand.subList( Math.min(2, hotDemand.size()),  Math.min(5, hotDemand.size()));
 		System.out.print("u2:"+hotDemand2.size()+" u3:"+hotDemand3.size());
-		LimitLengthUtil.limiteDemandLength(hotDemand2,10,30);
-		LimitLengthUtil.limiteDemandLength(hotDemand3,10,30);
+		LimitLengthUtil.limiteDemandLength(hotDemand2,13,30);
+		LimitLengthUtil.limiteDemandLength(hotDemand3,13,33);
 		modelview.addObject("hotDemand2",hotDemand2);
 		modelview.addObject("hotDemand3",hotDemand3);
 		
@@ -469,15 +470,34 @@ public class WebpageController extends BaseController {
 		
 		//产学研需求 最多9个
 		List<DemandListBo> proLearnStudyDemand=demandService.proLearnStudyDemand();
-		List <DemandListBo>nightMaxProLearnStudyDemand=proLearnStudyDemand.subList(0,Math.min(4, proLearnStudyDemand.size()));
+		List <DemandListBo>nightMaxProLearnStudyDemand=proLearnStudyDemand.subList(0,Math.min(9, proLearnStudyDemand.size()));
 		for(DemandListBo demandListBo:nightMaxProLearnStudyDemand) {
 			if(demandListBo.getPictureUrl()==null || !demandListBo.getPictureUrl().contains("."))demandListBo.setPictureUrl(null);
 			else demandListBo.setPictureUrl(demandListBo.getPictureUrl().split(",")[0]);
 		}
 		LimitLengthUtil.limiteDemandLength(nightMaxProLearnStudyDemand,10,208);
+		LimitLengthUtil.limiteDemandCompanyAndName(nightMaxProLearnStudyDemand, 10, 208);
 		modelview.addObject("proLearnStudyDemandList",nightMaxProLearnStudyDemand);
 		
+		//研产资金需求 最多4个
+		List<DemandListBo> fundDemand=demandService.getFundCrowdDemand();
+		List <DemandListBo>fourMaxFundDemand=fundDemand.subList(0,Math.min(4, fundDemand.size()));
+		for(DemandListBo demandListBo:fourMaxFundDemand) {
+			if(demandListBo.getPictureUrl()==null || !demandListBo.getPictureUrl().contains("."))demandListBo.setPictureUrl(null);
+			else demandListBo.setPictureUrl(demandListBo.getPictureUrl().split(",")[0]);
+		}
+		LimitLengthUtil.limiteDemandLength(fourMaxFundDemand,9,30);
+		modelview.addObject("fundDemandList",fourMaxFundDemand);
 		
+		//技术人才需求
+		List<DemandListBo> personnelDemand=demandService.getPersonnelDemand();
+		List <DemandListBo>fourMaxPersonnelDemand=personnelDemand.subList(0,Math.min(6, personnelDemand.size()));
+		for(DemandListBo demandListBo:fourMaxPersonnelDemand) {
+			if(demandListBo.getPictureUrl()==null || !demandListBo.getPictureUrl().contains("."))demandListBo.setPictureUrl(null);
+			else demandListBo.setPictureUrl(demandListBo.getPictureUrl().split(",")[0]);
+		}
+		LimitLengthUtil.limiteDemandLength(fourMaxPersonnelDemand,7,30);
+		modelview.addObject("personnelDemandList",fourMaxPersonnelDemand);
 		return modelview;
 	}
 	

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

@@ -77,5 +77,9 @@ public interface DemandMapper {
 	List<DemandListBo> getAreaDemand();
 	
 	List<DemandListBo> 	getProLearnStudyDemand();
+	
+	List<DemandListBo> getFundCrowdDemand();
+	
+	List<DemandListBo> getPersonnelDemand();
 
 }

+ 13 - 2
src/main/java/com/goafanti/common/mapper/DemandMapper.xml

@@ -2149,10 +2149,21 @@ select
   </select>
   
    <select id="getAreaDemand" resultType="com.goafanti.demand.bo.DemandListBo">
- select name,picture_url as pictureUrl ,problem_des,id as problemDes from demand d  where d.demand_type=4  order by  release_date  desc
+ select name,picture_url as pictureUrl ,problem_des as problemDes ,id from demand d  where d.demand_type=4  order by  release_date  desc
   </select>
   
      <select id="getProLearnStudyDemand" resultType="com.goafanti.demand.bo.DemandListBo">
- select name,picture_url as pictureUrl ,problem_des,id as problemDes from demand d  where d.demand_type=2  order by  release_date  desc
+    select d.name as name,picture_url as pictureUrl ,problem_des as problemDes,employer_name as employerName,d.id,fg.name as industryCategory1,fgg.name as industryCategory2 from demand d  
+    left join aft.field_glossory  fg  on fg.id=d.industry_category_a
+    left join aft.field_glossory fgg  on fgg.id=d.industry_category_b
+ where d.demand_type=2  order by  release_date  desc
   </select>
+   <select id="getFundCrowdDemand" resultType="com.goafanti.demand.bo.DemandListBo">
+  select name,picture_url as pictureUrl ,problem_des as problemDes ,id,fund_for_crowd as fundForCrowd from demand d  where d.demand_type=3  order by  release_date  desc
+  </select>
+  
+   <select id="getPersonnelDemand" resultType="com.goafanti.demand.bo.DemandListBo">
+  select name,picture_url as pictureUrl ,problem_des as problemDes ,id,fund_for_personnel as fundForPersonnel from demand d  where d.demand_type=3  order by  release_date  desc
+  </select>
+  
 </mapper>

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

@@ -110,6 +110,7 @@ public interface DemandService {
 
 	Demand DemandFollowDetails(String id);
 	
+	//科技需求首页列表
 	List<DemandListBo> recentDemand();
 	
 	List<DemandListBo> companyDemand();
@@ -123,4 +124,8 @@ public interface DemandService {
 	
 	List<DemandListBo> proLearnStudyDemand();
 	
+	List<DemandListBo> getFundCrowdDemand();
+	
+	List<DemandListBo> getPersonnelDemand();
+	
 }

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

@@ -1146,6 +1146,18 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 		// TODO Auto-generated method stub
 		return demandMapper.getProLearnStudyDemand();
 	}
+
+	@Override
+	public List<DemandListBo> getFundCrowdDemand() {
+		// TODO Auto-generated method stub
+		return demandMapper.getFundCrowdDemand();
+	}
+
+	@Override
+	public List<DemandListBo> getPersonnelDemand() {
+		// TODO Auto-generated method stub
+		return demandMapper.getPersonnelDemand();
+	}
 	
 	
 	

+ 31 - 197
src/main/webapp/WEB-INF/views/portal/technologyTrading/demand.html

@@ -240,7 +240,7 @@
 								 <span class="problemDes" th:text="${u2.problemDes}"></span>	
 								 <span class="colorTime" th:if="${u2.validityPeriod}!=null" th:text="${#dates.format(u2.validityPeriod,'yyyy-MM-dd')+'到期'}"></span>
 								 <span class="colorOrange" th:if="${u2.demandType}==5" th:text="${'¥'+u2.fundForPersonnel}+'元/月'"></span>
-								 <span class="colorOrange" th:if="${u2.demandType}==3" th:text="${'¥'+u2.fundForCrowd}+'万'"></span>
+								 <span class="colorOrange" th:if="${u2.demandType}==3" th:text="${'期望资金:¥'+u2.fundForCrowd}+'万'"></span>
 							</div>
 						</div>
 					</div>
@@ -258,8 +258,10 @@
 										class="talents" th:case='4' th:text="地区产业需求"></span> <span
 										class="talents" th:case='5' th:text="技术人才需求"></span>
 									<span th:text="${u3.name}"></span>	
+									<span class="colorOrange" th:if="${u3.demandType}==3" th:text="${u3.researchType}==0?'用途:研发':'用途:扩大再生产'"></span>
 									<span class="colorOrange" th:if="${u3.demandType}==5" th:text="${'¥'+u3.fundForPersonnel+'元/月'}"></span>
-									<span class="colorOrange" th:if="${u3.demandType}==3" th:text="${'¥'+u3.fundForCrowd+'万'}"></span>
+									<span class="colorOrange" th:if="${u3.demandType}==3" th:text="${'期望资金:¥'+u3.fundForCrowd+'万'}"></span>
+
 								</div>
 								
 							
@@ -310,9 +312,9 @@
 							<div>
 							
 								 <span class="problemDes" th:text="${h2.problemDes}"></span>	
-		
 								 <span class="colorOrange" th:if="${h2.demandType}==5" th:text="${'¥'+h2.fundForPersonnel}+'元/月'"></span>
-								 <span class="colorOrange" th:if="${h2.demandType}==3" th:text="${'¥'+h2.fundForCrowd}+'万'"></span>
+								 <span class="colorOrange" th:if="${h2.demandType}==3" th:text="${'期望资金:¥'+h2.fundForCrowd}+'万'"></span>
+						
 								<span class="colorTime">	<img th:src="${portalHost+'/img/newMenu/demand-5.jpg'}" alt=""></span>
 								 
 							</div>
@@ -333,8 +335,10 @@
 									  <span class="talents" th:case='4' th:text="地区产业需求"></span>
 									   <span class="talents" th:case='5' th:text="技术人才需求"></span>
 									<span th:text="${h3.name}"></span>	
-									<span class="colorOrange" th:if="${h3.demandType}==5" th:text="${'¥'+h3.fundForPersonnel+'元/月'}"></span>
-									<span class="colorOrange" th:if="${h3.demandType}==3" th:text="${'¥'+h3.fundForCrowd+'万'}"></span>
+							
+									<span class="colorOrange" th:if="${h3.demandType}==3" th:text="${h3.researchType}==0?'用途:研发':'用途:扩大再生产'"></span>
+											<span class="colorOrange" th:if="${h3.demandType}==5" th:text="${'¥'+h3.fundForPersonnel+'元/月'}"></span>
+									<span class="colorOrange" th:if="${h3.demandType}==3" th:text="${'期望资金:¥'+h3.fundForCrowd+'万'}"></span>
 								</div>
 							</p>
 							<p class="introduceP" >
@@ -364,7 +368,7 @@
 					<ul>
 
 						<li th:each="companyDemandList:${companyDemandList}"><img
-							th:src="${companyDemandList.pictureUrl}==null?${portalHost+'/img/newMenu/demand-9.png'}:${portalHost+companyDemandList.pictureUrl}"
+							th:src="${companyDemandList.pictureUrl}==null?${portalHost+'/img/newMenu/demand-9.png'}:${avatarUploadHost +companyDemandList.pictureUrl}"
 							alt="">
 							<p th:text="${companyDemandList.name}"></p></li>
 					</ul>
@@ -412,96 +416,19 @@
 		<div class="row studyTxt">
 			<div class="col-sm-10">
 				<ul class="row">
-					<li class="col-sm-4">
-						<div class="imgLeft">
-							<img th:src="${portalHost+'/img/newMenu/demand-17.jpg'}" alt="">
-						</div>
-						<div class="imgRight">
-							<h5>湖南****责任有限公司</h5>
-							<p>寻找能够进行产学研合作的单位,212121212121111111111我们愿意分成...</p>
-							<span>新材料</span> <span>半导体</span>
-						</div>
-					</li>
-					<li class="col-sm-4">
+					<li class="col-sm-4" th:each="plsdemand:${proLearnStudyDemandList}">
 						<div class="imgLeft">
-							<img th:src="${portalHost+'/img/newMenu/demand-17.jpg'}" alt="">
+							<img th:if="${plsdemand.pictureUrl}==null" th:src="${portalHost+'/img/newMenu/demand-17.jpg'}" alt="">
+							<img th:if="${plsdemand.pictureUrl}!=null" th:src="${avatarUploadHost+plsdemand.pictureUrl}" alt="">
 						</div>
 						<div class="imgRight">
-							<h5>湖南****责任有限公司</h5>
-							<p>寻找能够进行产学研合作的单位,212121212121111111111我们愿意分成...</p>
-							<span>新材料</span> <span>半导体</span>
-						</div>
-					</li>
-					<li class="col-sm-4">
-						<div class="imgLeft">
-							<img th:src="${portalHost+'/img/newMenu/demand-17.jpg'}" alt="">
-						</div>
-						<div class="imgRight">
-							<h5>湖南****责任有限公司</h5>
-							<p>寻找能够进行产学研合作的单位,212121212121111111111我们愿意分成...</p>
-							<span>新材料</span> <span>半导体</span>
-						</div>
-					</li>
-					<li class="col-sm-4">
-						<div class="imgLeft">
-							<img th:src="${portalHost+'/img/newMenu/demand-17.jpg'}" alt="">
-						</div>
-						<div class="imgRight">
-							<h5>湖南****责任有限公司</h5>
-							<p>寻找能够进行产学研合作的单位,212121212121111111111我们愿意分成...</p>
-							<span>新材料</span> <span>半导体</span>
-						</div>
-					</li>
-					<li class="col-sm-4">
-						<div class="imgLeft">
-							<img th:src="${portalHost+'/img/newMenu/demand-17.jpg'}" alt="">
-						</div>
-						<div class="imgRight">
-							<h5>湖南****责任有限公司</h5>
-							<p>寻找能够进行产学研合作的单位,212121212121111111111我们愿意分成...</p>
-							<span>新材料</span> <span>半导体</span>
-						</div>
-					</li>
-					<li class="col-sm-4">
-						<div class="imgLeft">
-							<img th:src="${portalHost+'/img/newMenu/demand-17.jpg'}" alt="">
-						</div>
-						<div class="imgRight">
-							<h5>湖南****责任有限公司</h5>
-							<p>寻找能够进行产学研合作的单位,212121212121111111111我们愿意分成...</p>
-							<span>新材料</span> <span>半导体</span>
-						</div>
-					</li>
-					<li class="col-sm-4">
-						<div class="imgLeft">
-							<img th:src="${portalHost+'/img/newMenu/demand-17.jpg'}" alt="">
-						</div>
-						<div class="imgRight">
-							<h5>湖南****责任有限公司</h5>
-							<p>寻找能够进行产学研合作的单位,212121212121111111111我们愿意分成...</p>
-							<span>新材料</span> <span>半导体</span>
-						</div>
-					</li>
-					<li class="col-sm-4">
-						<div class="imgLeft">
-							<img th:src="${portalHost+'/img/newMenu/demand-17.jpg'}" alt="">
-						</div>
-						<div class="imgRight">
-							<h5>湖南****责任有限公司</h5>
-							<p>寻找能够进行产学研合作的单位,212121212121111111111我们愿意分成...</p>
-							<span>新材料</span> <span>半导体</span>
-						</div>
-					</li>
-					<li class="col-sm-4">
-						<div class="imgLeft">
-							<img th:src="${portalHost+'/img/newMenu/demand-17.jpg'}" alt="">
-						</div>
-						<div class="imgRight">
-							<h5>湖南****责任有限公司</h5>
-							<p>寻找能够进行产学研合作的单位,212121212121111111111我们愿意分成...</p>
-							<span>新材料</span> <span>半导体</span>
+							<h5 th:text="${plsdemand.employerName}"></h5>
+							<p th:text="${plsdemand.problemDes}"></p>
+							<span th:text="${plsdemand.industryCategory1}"></span>
+							 <span  th:text="${plsdemand.industryCategory2}"></span>
 						</div>
 					</li>
+				
 				</ul>
 			</div>
 			<div class="col-sm-2">
@@ -519,69 +446,19 @@
 			</div>
 			<div class="col-sm-10">
 				<ol class="row">
-					<li class="col-sm-3">
-						<div class="capital-administration">
-							<div class="capitalBj">
-								<h4 title="研发科研管理系统">研发科研管理系统21212</h4>
-								<p>寻找能够进行产学研合作的单位,我们愿意分成...</p>
-								<div class="float-left">
-									<p>期望资金</p>
-									<p>¥100万</p>
-								</div>
-								<div class="float-right">
-									<p>资金用途</p>
-									<p>研发</p>
-								</div>
-							</div>
-							<a href="#">立即查看</a>
-						</div>
-					</li>
-					<li class="col-sm-3">
-						<div class="capital-administration">
-							<div class="capitalBj">
-								<h4 title="研发科研管理系统">研发科研管理系统21212</h4>
-								<p>寻找能够进行产学研合作的单位,我们愿意分成...</p>
-								<div class="float-left">
-									<p>期望资金</p>
-									<p>¥100万</p>
-								</div>
-								<div class="float-right">
-									<p>资金用途</p>
-									<p>研发</p>
-								</div>
-							</div>
-							<a href="#">立即查看</a>
-						</div>
-					</li>
-					<li class="col-sm-3">
-						<div class="capital-administration">
-							<div class="capitalBj">
-								<h4 title="研发科研管理系统">研发科研管理系统21212</h4>
-								<p>寻找能够进行产学研合作的单位,我们愿意分成...</p>
-								<div class="float-left">
-									<p>期望资金</p>
-									<p>¥100万</p>
-								</div>
-								<div class="float-right">
-									<p>资金用途</p>
-									<p>研发</p>
-								</div>
-							</div>
-							<a href="#">立即查看</a>
-						</div>
-					</li>
-					<li class="col-sm-3">
+					
+					<li class="col-sm-3" th:each="fundDemand:${fundDemandList}">
 						<div class="capital-administration">
 							<div class="capitalBj">
-								<h4 title="研发科研管理系统">研发科研管理系统21212</h4>
-								<p>寻找能够进行产学研合作的单位,我们愿意分成...</p>
+								<h4 th:text="${fundDemand.name}"></h4>
+								<p th:text="${fundDemand.problemDes}"></p>
 								<div class="float-left">
 									<p>期望资金</p>
-									<p>¥100万</p>
+									<p th:text="${'¥'+fundDemand.fundForCrowd+'万'}"></p>
 								</div>
 								<div class="float-right">
 									<p>资金用途</p>
-									<p>研发</p>
+									<p th:text="${fundDemand.researchType}==0?'研发':'扩大再生产'"></p>
 								</div>
 							</div>
 							<a href="#">立即查看</a>
@@ -601,57 +478,14 @@
 			</div>
 			<div class="col-sm-10">
 				<ol class="row">
-					<li class="col-sm-4">
-						<div>
-							<h4>
-								数据分析精算师 <span class="titleBorder">兼 职</span> <span class="money">¥5000.00元/月</span>
-							</h4>
-							<p>我们诚邀专家专家到我司工作,怎么搞都可以,只要你来,我们好生伺候,这样可吧...</p>
-							<span class="float-right">招募中</span>
-						</div>
-					</li>
-					<li class="col-sm-4">
-						<div>
-							<h4>
-								数据分析精算师 <span class="titleBorder">兼 职</span> <span class="money">¥5000.00元/月</span>
-							</h4>
-							<p>我们诚邀专家专家到我司工作,怎么搞都可以,只要你来,我们好生伺候,这样可吧...</p>
-							<span class="float-right">招募中</span>
-						</div>
-					</li>
-					<li class="col-sm-4">
-						<div>
-							<h4>
-								数据分析精算师 <span class="titleBorder">兼 职</span> <span class="money">¥5000.00元/月</span>
-							</h4>
-							<p>我们诚邀专家专家到我司工作,怎么搞都可以,只要你来,我们好生伺候,这样可吧...</p>
-							<span class="float-right">招募中</span>
-						</div>
-					</li>
-					<li class="col-sm-4">
-						<div>
-							<h4>
-								数据分析精算师 <span class="titleBorder">兼 职</span> <span class="money">¥5000.00元/月</span>
-							</h4>
-							<p>我们诚邀专家专家到我司工作,怎么搞都可以,只要你来,我们好生伺候,这样可吧...</p>
-							<span class="float-right">招募中</span>
-						</div>
-					</li>
-					<li class="col-sm-4">
-						<div>
-							<h4>
-								数据分析精算师 <span class="titleBorder">兼 职</span> <span class="money">¥5000.00元/月</span>
-							</h4>
-							<p>我们诚邀专家专家到我司工作,怎么搞都可以,只要你来,我们好生伺候,这样可吧...</p>
-							<span class="float-right">招募中</span>
-						</div>
-					</li>
-					<li class="col-sm-4">
+				
+					<li class="col-sm-4" th:each="personnelDemand:${personnelDemandList}">
 						<div>
-							<h4>
-								数据分析精算师 <span class="titleBorder">兼 职</span> <span class="money">¥5000.00元/月</span>
+							<h4 >
+							<span th:text="${personnelDemand.name}"></span>
+								 <span class="titleBorder">人才</span> <span class="money" th:text="${'¥'+personnelDemand.fundForPersonnel+'元/月'}"></span>
 							</h4>
-							<p>我们诚邀专家专家到我司工作,怎么搞都可以,只要你来,我们好生伺候,这样可吧...</p>
+							<p th:text="${personnelDemand.problemDes}"></p>
 							<span class="float-right">招募中</span>
 						</div>
 					</li>