Browse Source

在线评估页面修改

enderx 8 years ago
parent
commit
5a7a0de7c7

+ 6 - 9
src/main/java/com/goafanti/achievement/service/impl/AchievementServiceImpl.java

@@ -96,7 +96,7 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 			Integer boutique, Integer hot) {
 		Map<String, Object> params = disposeParams(username, ownerName, ownerId, auditStatus, serialNumber, name, keyword, category, status,
 				releaseDateStartDate, releaseDateEndDate, releaseStatus, UserType.ORGANIZATION.getCode(),
-				boutique, hot,TokenManager.getAdminId());
+				boutique, hot);
 		if (pNo == null || pNo < 0) {
 			pNo = 1;
 		}
@@ -121,7 +121,7 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 			Integer boutique, Integer hot) {
 		Map<String, Object> params = disposeParams(unitName, ownerName, ownerId, auditStatus, serialNumber, name, keyword, category, status,
 				releaseDateStartDate, releaseDateEndDate, releaseStatus, UserType.ORGANIZATION.getCode(),
-				boutique, hot,TokenManager.getAdminId());
+				boutique, hot);
 		if (pNo == null || pNo < 0) {
 			pNo = 1;
 		}
@@ -129,9 +129,6 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 		if (pSize == null || pSize < 0 || pSize > 10) {
 			pSize = 10;
 		}
-		if (!TokenManager.hasRole(AFTConstants.SUPERADMIN) && !TokenManager.hasRole(AFTConstants.AUDITORADMIN)) {
-			params.put("adminId", TokenManager.getAdminId());
-		}
 		
 		return (Pagination<AchievementListBo>) findPage("findOrgOwnerAchievementListByPage",
 				"findOrgOwnerAchievementCount",params,pNo, pSize);
@@ -215,14 +212,14 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 		}
 		return (Pagination<AchievementListBo>) findPage("findAchievementListByPage", "findAchievementCount",
 				disposeParams(null, null, TokenManager.getUserId(), auditStatus, serialNumber, name, keyword, category,
-						status, releaseDateStartDate, releaseDateEndDate, releaseStatus, null, null, null,TokenManager.getAdminId()),
+						status, releaseDateStartDate, releaseDateEndDate, releaseStatus, null, null, null),
 				pNo, pSize);
 	}
 
 	private Map<String, Object> disposeParams(String username, String ownerName, String ownerId, Integer auditStatus,
 			Integer serialNumber, String name, String keyword, Integer category, Integer status,
 			String releaseDateStartDate, String releaseDateEndDate, Integer releaseStatus, Integer type,
-			Integer boutique, Integer hot,String techBrokerId) {
+			Integer boutique, Integer hot) {
 		Map<String, Object> params = new HashMap<>();
 
 		Date rStart = null;
@@ -299,10 +296,10 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 		if (null != hot) {
 			params.put("hot", hot);
 		}
-		if (TokenManager.hasRole(AFTConstants.TECHBROKER)) {
+		if (!TokenManager.hasRole(AFTConstants.SUPERADMIN) && !TokenManager.hasRole(AFTConstants.AUDITORADMIN)) {
 			params.put("techBrokerId", TokenManager.getAdminId());
 		}
-
+		
 		return params;
 	}
 

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

@@ -107,4 +107,8 @@ public class ErrorConstants {
 	public static final String MARKET_BOOTH_MAX						= "MARKET_BOOTH_MAX";	
 	
 	public static final String CUSTOMER_ALREADY_EXIST				= "CUSTOMER_ALREADY_EXIST";
+	
+	public static final String BUSINESS_ALREADY_EXIST				= "BUSINESS_ALREADY_EXIST";
+	
+	public static final String AT_LEAST_A_BUSINESS					= "AT_LEAST_A_BUSINESS";
 }

+ 1 - 9
src/main/java/com/goafanti/common/controller/PortalController.java

@@ -316,7 +316,7 @@ public class PortalController extends BaseController {
 			if (StringUtils.isNotBlank(achievementdetail.getFieldBS())) {
 				b = Boolean.TRUE;
 			}
-
+			
 			field += (a ? achievementdetail.getFieldAS() : "") + (a && b ? DELIMITER : "")
 					+ (b ? achievementdetail.getFieldBS() : "");
 			achievementdetail.setField(field);
@@ -324,7 +324,6 @@ public class PortalController extends BaseController {
 			if (StringUtils.isNotBlank(technicalPictureUrl)) {
 				achievementdetail.setPictureList(Arrays.asList(technicalPictureUrl.trim().split(",|,")));
 			}
-
 			Integer transfermode = achievementdetail.getTransferMode();
 			if (null != transfermode) {
 				if (AchievementTransferMode.FULLTRANSFER.getCode().equals(transfermode)) {
@@ -361,7 +360,6 @@ public class PortalController extends BaseController {
 					achievementdetail.setTechnicalPictureUrl(picurl[0]);
 				}
 			}
-
 			String location = "";
 			String province = achievementdetail.getProvince();
 			String city = achievementdetail.getCity();
@@ -381,7 +379,6 @@ public class PortalController extends BaseController {
 			achievementdetail.setLocation(location);
 
 		}
-
 		// 查询精品成果
 		List<AchievementListBo> boutiqueachievement = achievementService.getAchievement(1);
 		List<AchievementListBo> reboutiqueachievement = new ArrayList<AchievementListBo>();
@@ -406,7 +403,6 @@ public class PortalController extends BaseController {
 			}
 		}
 		;
-
 		// 判断登录没登录. 登录了.查找用户喜欢的. 没登录就随机查四个.
 		boolean isLogin = TokenManager.isLogin();
 		List<AchievementListBo> achievementlist = achievementService.getAchievement(0);// 查询所有专利
@@ -435,7 +431,6 @@ public class PortalController extends BaseController {
 				reachievementlist.set(i, customerlikelist.get(i));
 			}
 		}
-
 		/*----------------------------------------------------------*/
 
 		for (int i = 0; i < reachievementlist.size(); i++) {
@@ -483,7 +478,6 @@ public class PortalController extends BaseController {
 					reachievementlist.get(i).setOwnerTypeS("组织所有");
 				}
 			}
-
 			Integer transfermode = reachievementlist.get(i).getTransferMode();
 			if (null != transfermode) {
 				if (AchievementTransferMode.FULLTRANSFER.getCode().equals(transfermode)) {
@@ -497,7 +491,6 @@ public class PortalController extends BaseController {
 							.setTransferModeS(AchievementTransferMode.EXCLUSIVETECHNOLOGYSHARES.getDesc());
 				}
 			}
-
 			Integer maturity = reachievementlist.get(i).getMaturity();
 			if (null != maturity) {
 				if (AchievementMaturity.RESEARCH.getCode().equals(maturity)) {
@@ -513,7 +506,6 @@ public class PortalController extends BaseController {
 				}
 			}
 			;
-
 			String pic = reachievementlist.get(i).getTechnicalpictureurl();// 在存在多张图片的情况下,暂时先取第一张
 			if (null != pic) {
 				boolean hascomma = pic.contains(",");

+ 5 - 21
src/main/java/com/goafanti/common/mapper/AchievementMapper.xml

@@ -864,19 +864,11 @@
 		left join marketing_management mm on a.id = mm.product_id 
 	</if>
   	where a.deleted_sign = 0 and a.owner_type = 1
-  	<if test="adminId != null">
-		and (u.mid = #{adminId,jdbcType=VARCHAR}
-	</if>
-	<if test="adminId != null">
-		or  a.salesman_id = #{adminId,jdbcType=VARCHAR}
-	</if>
-	<if test="adminId != null">
-		or  a.tech_broker_id = #{adminId,jdbcType=VARCHAR}
-		)
+  	<if test="techBrokerId != null">
+		a.tech_broker_id = #{techBrokerId,jdbcType=VARCHAR}
 	</if>
   	<if test="ownerName != null">
-  		and  a.owner_name like CONCAT('%',#{ownerName,jdbcType=VARCHAR},'%')
-  		and  (a.owner_id is null or a.owner_id = '')
+  		and  a.owner_name like CONCAT('%',#{ownerName,jdbcType=VARCHAR},'%') 	
   	</if>
   	<if test="unitName != null">
   		and  oi.unit_name like CONCAT('%',#{unitName,jdbcType=VARCHAR},'%')
@@ -945,19 +937,11 @@
 		left join marketing_management mm on a.id = mm.product_id 
 	</if>
   	where a.deleted_sign = 0 and a.owner_type = 1
-  	<if test="adminId != null">
-		and (u.mid = #{adminId,jdbcType=VARCHAR}
-	</if>
-	<if test="adminId != null">
-		or  a.salesman_id = #{adminId,jdbcType=VARCHAR}
-	</if>
-	<if test="adminId != null">
-		or  a.tech_broker_id = #{adminId,jdbcType=VARCHAR}
-		)
+  	<if test="techBrokerId != null">
+		a.tech_broker_id = #{techBrokerId,jdbcType=VARCHAR}
 	</if>
   	<if test="ownerName != null">
   		and  a.owner_name like CONCAT('%',#{ownerName,jdbcType=VARCHAR},'%')
-  		and  (a.owner_id is null or a.owner_id = '')
   	</if>
   	<if test="unitName != null">
   		and  oi.unit_name like CONCAT('%',#{unitName,jdbcType=VARCHAR},'%')

+ 1 - 1
src/main/java/com/goafanti/common/mapper/UserMapperExt.xml

@@ -314,7 +314,7 @@
 			a.create_time as followTime,
 			a.contact_type as contactType,
 			a.result, 
-			b.identify_name as identityName,
+			b.identify_name as identifyName,
 			c.name as contacts,
 			c.mobile as contactMobile,
 			d.name as adminName

+ 9 - 8
src/main/java/com/goafanti/common/utils/ExcelUtils.java

@@ -18,13 +18,14 @@ import org.apache.poi.xssf.usermodel.XSSFWorkbook;
 import com.goafanti.customer.bo.CustomerExcelBo;
 
 public class ExcelUtils {
-	private Set repeatRows = new TreeSet<Integer>(); //数据重复的
-	private Set vacantRows = new TreeSet<Integer>(); //数据不完整的
+	private Set<Integer> repeatRows = new TreeSet<Integer>(); //数据重复的
+	private Set<Integer> vacantRows = new TreeSet<Integer>(); //数据不完整的
 	DecimalFormat df = new DecimalFormat("0");  
+	@SuppressWarnings({ "unused", "resource" })
 	public  List<CustomerExcelBo> parseExcel(String excelPath) throws IOException{
 		InputStream excelFile = new FileInputStream(new File(excelPath));
 		XSSFWorkbook wb = new XSSFWorkbook(excelFile);	
-		List result = new ArrayList<CustomerExcelBo>();
+		List<CustomerExcelBo> result = new ArrayList<CustomerExcelBo>();
 		XSSFSheet sheet = wb.getSheetAt(0);
 		Iterator<Row> rowIterator = sheet.iterator();
 		Row currentRow = rowIterator.next(); //表头
@@ -41,7 +42,7 @@ public class ExcelUtils {
 		return result;
 	}
 	
-	@SuppressWarnings("unchecked")
+	@SuppressWarnings("unused")
 	private String checkCustomerType(String customerType,int rowNumber){
 		if(StringUtils.isEmpty(customerType)) {
 			vacantRows.add(rowNumber);
@@ -53,7 +54,7 @@ public class ExcelUtils {
 		vacantRows.add(rowNumber);
 		return "";
 	}
-	@SuppressWarnings("unchecked")
+	@SuppressWarnings("unused")
 	private String checkFollowSituation(String followSituation,int rowNumber){
 		if(StringUtils.isEmpty(followSituation)){
 			vacantRows.add(rowNumber);
@@ -71,7 +72,7 @@ public class ExcelUtils {
 		vacantRows.add(rowNumber);
 		return "";
 	}
-	@SuppressWarnings("unchecked")
+	@SuppressWarnings("unused")
 	private String checkCustomerStatus(String customerStatus,int rowNumber){
 		if(StringUtils.isEmpty(customerStatus)) {
 			vacantRows.add(rowNumber);
@@ -92,7 +93,7 @@ public class ExcelUtils {
 
 		return flag;
 	}
-	@SuppressWarnings("unchecked")
+	@SuppressWarnings("unused")
 	private String checkCompanyIntention(String companyIntention,int rowNumber){
 		if(StringUtils.isEmpty(companyIntention)){
 			vacantRows.add(rowNumber);
@@ -114,7 +115,7 @@ public class ExcelUtils {
 		return "";
 	}
 	
-	@SuppressWarnings("unchecked")
+	@SuppressWarnings("unused")
 	private String checkOther(String cellValue,int rowNumber){
 		if(StringUtils.isEmpty(cellValue)){
 			vacantRows.add(rowNumber);

+ 5 - 5
src/main/java/com/goafanti/customer/bo/FollowBusinessBo.java

@@ -15,7 +15,7 @@ public class FollowBusinessBo {
 	/** 客户ID **/
 	private String uid;
 	/** 客户名 **/
-	private String identityName;
+	private String identifyName;
 	/** 当前联系人姓名 **/
 	private String contacts;
 	/** 当前联系电话 **/
@@ -45,11 +45,11 @@ public class FollowBusinessBo {
 	public void setUid(String uid) {
 		this.uid = uid;
 	}
-	public String getIdentityName() {
-		return identityName;
+	public String getIdentifyName() {
+		return identifyName;
 	}
-	public void setIdentityName(String identityName) {
-		this.identityName = identityName;
+	public void setIdentifyName(String identifyName) {
+		this.identifyName = identifyName;
 	}
 	public String getContacts() {
 		return contacts;

+ 3 - 3
src/main/java/com/goafanti/customer/controller/CustomerApiController.java

@@ -101,9 +101,9 @@ public class CustomerApiController extends BaseController{
 	 * @throws Exception 
 	 * @throws NumberFormatException **/
 	@RequestMapping(value = "/addCustomer", method = RequestMethod.POST)
-	public Result addCustomer(String name,String contacts,String contactMobile,String type) throws Exception{
+	public Result addCustomer(String name,String contacts,String contactMobile,String type,String societyTag) throws Exception{
 		Result res = new Result();
-		customerService.addCustomer(name, contacts, contactMobile, Integer.parseInt(type));
+		customerService.addCustomer(name, contacts, contactMobile, Integer.parseInt(type),societyTag);
 		return res;
 	}
 	
@@ -188,7 +188,7 @@ public class CustomerApiController extends BaseController{
 		FollowBusinessBo fbb = new FollowBusinessBo();
 		SimpleDateFormat format = new SimpleDateFormat(AFTConstants.YYYYMMDDHHMMSS);
 		fbb.setFollowTime(format.format(new Date()));
-		fbb.setIdentityName(user.getIdentifyName());
+		fbb.setIdentifyName(user.getIdentifyName());
 		fbb.setUid(uid);
 		fbb.setUserBusinessList(businessService.findBusinessByUAid(uid, TokenManager.getAdminId()));
 		res.setData(fbb);

+ 2 - 1
src/main/java/com/goafanti/customer/service/CustomerService.java

@@ -93,9 +93,10 @@ public interface CustomerService {
 	 * @param contacts 联系人
 	 * @param contactMobile 联系电话
 	 * @param type 客户类型
+	 * @param societyTag 社会属性
 	 * @return
 	 */
-	int addCustomer(String name,String contacts,String contactMobile,Integer type)  throws BusinessException;
+	int addCustomer(String name,String contacts,String contactMobile,Integer type,String societyTag)  throws BusinessException;
 	
 	
 	/**

+ 5 - 1
src/main/resources/props/error.properties

@@ -95,4 +95,8 @@ MOBILE_SAME_ERROR=\u65B0\u624B\u673A\u53F7\u5FC5\u987B\u548C\u539F\u624B\u673A\u
 
 MARKET_BOOTH_MAX = \u8425\u9500\u6D3B\u52A8\u5C55\u4F4D\u5DF2\u6EE1{0}\u4E2A
 
-CUSTOMER_ALREADY_EXIST = \u5BA2\u6237\u5DF2\u5B58\u5728
+CUSTOMER_ALREADY_EXIST = \u5BA2\u6237\u5DF2\u5B58\u5728
+
+BUSINESS_ALREADY_EXIST = \u9879\u76EE\u5DF2\u5B58\u5728
+
+AT_LEAST_A_BUSINESS = \u81F3\u5C11\u9700\u8981\u586B\u5199\u4E00\u9879\u4E1A\u52A1

+ 2 - 1
src/main/webapp/WEB-INF/views/common.html

@@ -387,7 +387,8 @@
 				name : /*[[${adminData.name}]]*/'',
 				email : /*[[${adminData.email}]]*/'',
 				createTime : /*[[${adminData.createTime}]]*/'',
-				uid : /*[[${adminData.id}]]*/''
+				uid : /*[[${adminData.id}]]*/'',
+				isSuperAdmin : /*[[${shiro.hasRole('999999')}]]*/false
 			}
 			window.showUserManage = /*[[${shiro.hasRole('999999') || shiro.isPermitted('admin/userManage')}]]*/false;
 			window.showServices = /*[[${shiro.hasRole('999999') || shiro.isPermitted('admin/services')}]]*/false;

+ 15 - 5
src/main/webapp/WEB-INF/views/portal/technologyTrading/assessMent.html

@@ -130,7 +130,7 @@
   			</div>
   		</div>
   		<div class="process_btn">
-  			<a th:href="${basePath+'/user/account/services.html#evaluate'}">立即评估</a>
+  			<a href="javascript:;" onclick="_MEIQIA('showPanel')">立即评估</a>
   			<a href="javascript:;" onclick="_MEIQIA('showPanel')">在线咨询</a>
   		</div>
   	</div>
@@ -218,36 +218,46 @@
   			<div class="cont_img">
   				
   			</div>
+  			
+  			<a th:if="${#lists.size(zcfg) ge 1}" th:href="@{/portal/news/newsDetail(id=${zcfg[0].id})}" >
   			<div class="cont_p">
   				<h5 th:text=${zcfg[0].createTimeFormattedDate}></h5>
   				<div class="line"></div>
   				<h4 th:text=${zcfg[0].title}></h4>
   				<p th:text=${zcfg[0].summary}></p>
+  				</a>
 				<div class="more">
 					<span>+</span>
-					<a href="/portal/thinkTank/index.html">更多政策</a>
+					<span><a href="/portal/thinkTank/index.html">更多政策</a></span>
 				</div>
   			</div>
   		</div>
   		<div class="policies_bot">
-  			<div  class="bot" th:if="${#lists.size(zcfg) ge 2}">
+  		
+  			<a th:if="${#lists.size(zcfg) ge 2}" th:href="@{/portal/news/newsDetail(id=${zcfg[1].id})}" >
+  			<div  class="bot" >
   				<h5 th:text=${zcfg[1].createTimeFormattedDate}></h5>
   				<div class="line"></div>
   				<h4 th:text=${zcfg[1].title}></h4>
   				<p th:text=${zcfg[1].summary}></p>
   			</div>
-  			<div  class="bot" th:if="${#lists.size(zcfg) ge 3}">
+  				</a>
+  			<a th:if="${#lists.size(zcfg) ge 3}" th:href="@{/portal/news/newsDetail(id=${zcfg[2].id})}" >
+  			<div  class="bot">
   				<h5 th:text=${zcfg[2].createTimeFormattedDate}></h5>
   				<div class="line"></div>
   				<h4 th:text=${zcfg[2].title}></h4>
   				<p th:text=${zcfg[2].summary}></p>
   			</div>
-  			<div  class="bot" th:if="${#lists.size(zcfg) ge 4}">
+  			</a>
+  			<a th:if="${#lists.size(zcfg) ge 4}" th:href="@{/portal/news/newsDetail(id=${zcfg[3].id})}" >
+  			<div  class="bot">
   				<h5 th:text=${zcfg[3].createTimeFormattedDate}></h5>
   				<div class="line"></div>
   				<h4 th:text=${zcfg[3].title}></h4>
   				<p th:text=${zcfg[3].summary}></p>
   				</div>
+  				</a>
   		</div>
   	</div>
   	<div class="advantages">