Browse Source

SC网页BUG修复

anderx 7 years ago
parent
commit
2176fffac6

+ 0 - 32
src/main/java/com/goafanti/sc/controller/ScWebController.java

@@ -33,23 +33,6 @@ public class ScWebController extends BaseController{
 		mv.setViewName("sc/achievement");
 		inputAchievement s=scAchievementService.AchievementDetails(id);
 		mv.addObject("achievementList",s);
-
-		if(s!=null&&s.getIndustry()!=null){
-		if (s.getIndustry().equals("1")) {
-				s.setIndustryName( "先进制造与自动化");
-		}if (s.getIndustry().equals("2")) {
-			s.setIndustryName( "电子信息技术");
-		}if (s.getIndustry().equals("3")) {
-			s.setIndustryName( "新材料技术");
-		}if (s.getIndustry().equals("4")) {
-			s.setIndustryName( "生物与新药");
-		}if (s.getIndustry().equals("6")) {
-			s.setIndustryName( "资源与环境");
-		}if (s.getIndustry().equals("7")) {
-			s.setIndustryName( "新能源");
-			}
-		}
-		
 		/*List<ScMessageListBo> obj = (List<ScMessageListBo>)commonService.listMessage(id,10,1).getList();
 		JSONObject jo = new JSONObject();
 		System.out.println(jo.toJSON(obj).toString());*/
@@ -68,21 +51,6 @@ public class ScWebController extends BaseController{
 		}
 		inputDemands s=scDemandService.demandDetails(id);
 		mv.addObject("demandList", s);
-		if(s!=null&&s.getIndustry()!=null){
-			if (s.getIndustry().equals("1")) {
-					s.setIndustryName( "先进制造与自动化");
-			}if (s.getIndustry().equals("2")) {
-				s.setIndustryName( "电子信息技术");
-			}if (s.getIndustry().equals("3")) {
-				s.setIndustryName( "新材料技术");
-			}if (s.getIndustry().equals("4")) {
-				s.setIndustryName( "生物与新药");
-			}if (s.getIndustry().equals("6")) {
-				s.setIndustryName( "资源与环境");
-			}if (s.getIndustry().equals("7")) {
-				s.setIndustryName( "新能源");
-				}
-			}
 		mv.addObject("listMessage", commonService.listMessage(id,10,1).getList());
 		return mv;
 	}

+ 6 - 7
src/main/java/com/goafanti/sc/service/impl/ScAchievementServiceImpl.java

@@ -96,21 +96,20 @@ public class ScAchievementServiceImpl extends BaseMybatisDao<ScAchievementMapper
 	public inputAchievement AchievementDetails(String id) {
 			inputAchievement s=scAchievementMapper.selectById(id);
 			if(s!=null&&s.getIndustry()!=null){
-				if (s.getIndustry().equals("1")) {
+				if (s.getIndustry()==1) {
 						s.setIndustryName( "先进制造与自动化");
-				}if (s.getIndustry().equals("2")) {
+				}if (s.getIndustry()==2) {
 					s.setIndustryName( "电子信息技术");
-				}if (s.getIndustry().equals("3")) {
+				}if (s.getIndustry()==3) {
 					s.setIndustryName( "新材料技术");
-				}if (s.getIndustry().equals("4")) {
+				}if (s.getIndustry()==4) {
 					s.setIndustryName( "生物与新药");
-				}if (s.getIndustry().equals("6")) {
+				}if (s.getIndustry()==6) {
 					s.setIndustryName( "资源与环境");
-				}if (s.getIndustry().equals("7")) {
+				}if (s.getIndustry()==7) {
 					s.setIndustryName( "新能源");
 					}
 			}
-				
 			return s;
 		
 	}

+ 6 - 6
src/main/java/com/goafanti/sc/service/impl/ScDmandServiceImpl.java

@@ -110,17 +110,17 @@ public class ScDmandServiceImpl extends BaseMybatisDao<ScDemandMapper> implement
 	public inputDemands demandDetails(String id) {
 		inputDemands s=scDemandMapper.selectById(id);
 		if(s!=null&&s.getIndustry()!=null){
-			if (s.getIndustry().equals("1")) {
+			if (s.getIndustry()==1) {
 					s.setIndustryName( "先进制造与自动化");
-			}if (s.getIndustry().equals("2")) {
+			}if (s.getIndustry()==2) {
 				s.setIndustryName( "电子信息技术");
-			}if (s.getIndustry().equals("3")) {
+			}if (s.getIndustry()==3) {
 				s.setIndustryName( "新材料技术");
-			}if (s.getIndustry().equals("4")) {
+			}if (s.getIndustry()==4) {
 				s.setIndustryName( "生物与新药");
-			}if (s.getIndustry().equals("6")) {
+			}if (s.getIndustry()==6) {
 				s.setIndustryName( "资源与环境");
-			}if (s.getIndustry().equals("7")) {
+			}if (s.getIndustry()==7) {
 				s.setIndustryName( "新能源");
 				}
 		}

+ 5 - 5
src/main/webapp/WEB-INF/views/sc/words.html

@@ -18,19 +18,19 @@
 				<div class="row">
 					<div class="col-xs-4">姓  名:</div>
 					<div class="col-xs-8">
-						<input type="text" name="name">
+						<input type="text" name="name" id="name">
 					</div>
 				</div>
 				<div class="row">
 					<div class="col-xs-4">手机号:</div>
 					<div class="col-xs-8">
-						<input type="text" name="phone">
+						<input type="text" name="phone" id="phone">
 					</div>
 				</div>
 				<div class="row">
 					<div class="col-xs-4">详细信息:</div>
 					<div class="col-xs-8">
-						<textarea type="text" name="detailText" cols="23"></textarea>
+						<textarea type="text" name="detailText" cols="23" id="detailText"></textarea>
 					</div>
 				</div>
 				<div class="row">
@@ -54,11 +54,11 @@
 				</div>
 				
 				<div class="row">
-					<a href="#">
+					
 						<button type="submit" class="btn btn-block btn-success tijiao">
 							提交
 						</button >
-					</a>
+					
 				</div>
 			</div>
 	</body>