Browse Source

管理中心,需求、成果增加备注项、创建人与时间的显示

anderx 8 years ago
parent
commit
3552eea086

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

@@ -98,7 +98,7 @@
       manager_id, salesman_id, status, 
       create_time, release_status, release_date, 
       deleted_sign, audit_status, tech_broker_id,
-      country_name_zh,international_flag,jmrh_flag,boutique)
+      country_name_zh,international_flag,jmrh_flag,boutique,remark)
     values (#{id,jdbcType=VARCHAR}, #{serialNumber,jdbcType=INTEGER}, #{dataCategory,jdbcType=INTEGER}, 
       #{name,jdbcType=VARCHAR}, #{keyword,jdbcType=VARCHAR}, #{category,jdbcType=INTEGER}, 
       #{summary,jdbcType=VARCHAR}, #{introduction,jdbcType=LONGVARCHAR}, #{technicalPictureUrl,jdbcType=VARCHAR}, 
@@ -116,7 +116,7 @@
       #{managerId,jdbcType=VARCHAR}, #{salesmanId,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, 
       #{createTime,jdbcType=TIMESTAMP}, #{releaseStatus,jdbcType=INTEGER}, #{releaseDate,jdbcType=TIMESTAMP}, 
       #{deletedSign,jdbcType=INTEGER}, #{auditStatus,jdbcType=INTEGER}, #{techBrokerId,jdbcType=VARCHAR},
-      #{countryNameZh,jdbcType=VARCHAR}, #{internationalFlag,jdbcType=INTEGER},#{jmrhFlag,jdbcType=INTEGER},#{boutique,jdbcType=INTEGER})
+      #{countryNameZh,jdbcType=VARCHAR}, #{internationalFlag,jdbcType=INTEGER},#{jmrhFlag,jdbcType=INTEGER},#{boutique,jdbcType=INTEGER},#{remark,jdbcType=VARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.Achievement">
     insert into achievement
@@ -843,7 +843,7 @@
   	select 
   		a.id, a.serial_number as serialNumber, a.data_category as dataCategory, 
   		a.name, a.keyword, a.category, a.owner_name as ownerName, a.owner_type as ownerType, 
-  		oi.unit_name as username, a.owner_id as ownerId, a.org_id as orgId, a.contacts,a.create_time as createTime,a.tech_broker_id as techBrokerId
+  		oi.unit_name as username, a.owner_id as ownerId, a.org_id as orgId, a.contacts,a.create_time as createTime,
   		a.release_date as releaseDate, a.audit_status as auditStatus, ad.name as techBrokerId,a.boutique
   	<if test="hot != null and hot == 1"><!-- 在首页 -->
 		,1 as hot

+ 7 - 6
src/main/java/com/goafanti/common/mapper/DemandMapper.xml

@@ -497,7 +497,7 @@
 	  d.name, d.keyword, d.info_sources as infoSources, 
 	  ui.username, d.demand_type as demandType, d.validity_period as validityPeriod, 
 	  d.employer_name as employerName, ui.province, d.status, 
-	  d.release_status as releaseStatus, d.release_date as releaseDate, a.name as techBrokerId,
+	  d.release_status as releaseStatus, d.release_date as releaseDate, a.name as techBrokerId,d.create_time as createTime,
 	  d.employer_id as employerId, d.audit_status as auditStatus,d.boutique
 	 <if test="hot != null and hot == 1"><!-- 在首页 -->
 		,1 as hot
@@ -673,7 +673,7 @@
 	  d.name, d.keyword, d.info_sources as infoSources, 
 	  oi.unit_name as username, d.demand_type as demandType, d.validity_period as validityPeriod, 
 	  d.employer_name as employerName, oi.licence_province as province, d.status, 
-	  d.release_status as releaseStatus, d.release_date as releaseDate, a.name as techBrokerId,
+	  d.release_status as releaseStatus, d.release_date as releaseDate, a.name as techBrokerId,d.create_time as createTime,
 	  d.employer_id as employerId, d.audit_status as auditStatus,
 	  d.tech_broker_id as techBrokerId,d.boutique
 	 <if test="hot != null and hot == 1"><!-- 在首页 -->
@@ -916,10 +916,11 @@
   <select id="findDemandListByPage" parameterType="String" resultType="com.goafanti.demand.bo.DemandListBo">
   		select 
 	  d.id, d.serial_number as serialNumber, d.data_category as dataCategory, 
-	  d.name, d.keyword, d.demand_type as demandType, 
-	  d.validity_period as validityPeriod, d.status, d.release_status as releaseStatus, 
+	  d.name, d.keyword, d.demand_type as demandType, d.remark,d.create_time as createTime,
+	  d.validity_period as validityPeriod, d.status, d.release_status as releaseStatus, ad.name  as techBrokerId,
 	  d.release_date as releaseDate, d.employer_id as employerId, d.audit_status as auditStatus
 	from  demand d 
+	LEFT JOIN admin ad on ad.id = d.tech_broker_id
 	where d.deleted_sign = 0 
 	and d.employer_id = #{employerId, jdbcType=VARCHAR}
 	<if test="serialNumber != null">
@@ -1007,7 +1008,7 @@
     	status, release_status, create_time, 
     	keyword, data_category, name,
     	demand_type, problem_des, employer_name,
-    	employer_contacts, employer_contacts_mobile, employer_contacts_mailbox, info_sources,tech_broker_id)
+    	employer_contacts, employer_contacts_mobile, employer_contacts_mailbox, info_sources,tech_broker_id,remark)
     values 
     <foreach item="item" index="index" collection="list" separator=",">
       (
@@ -1016,7 +1017,7 @@
       	#{item.keyword,jdbcType=VARCHAR}, #{item.dataCategory,jdbcType=INTEGER}, #{item.name,jdbcType=VARCHAR},
       	#{item.demandType,jdbcType=INTEGER}, #{item.problemDes,jdbcType=VARCHAR}, #{item.employerName,jdbcType=VARCHAR},
       	#{item.employerContacts,jdbcType=VARCHAR}, #{item.employerContactsMobile,jdbcType=VARCHAR}, #{item.employerContactsMailbox,jdbcType=VARCHAR},
-      	#{item.infoSources,jdbcType=INTEGER},#{item.techBrokerId,jdbcType=VARCHAR}
+      	#{item.infoSources,jdbcType=INTEGER},#{item.techBrokerId,jdbcType=VARCHAR},#{item.remark,jdbcType=VARCHAR}
       )
     </foreach>
   </insert>

+ 27 - 0
src/main/java/com/goafanti/demand/bo/DemandListBo.java

@@ -66,6 +66,10 @@ public class DemandListBo {
 	 * 审核状态
 	 */
 	private Integer	auditStatus;
+	
+	private Date createTime;
+	
+	private String remark;
 
 	@JsonFormat(shape = Shape.STRING)
 	public Integer getAuditStatus() {
@@ -231,6 +235,29 @@ public class DemandListBo {
 		this.demandTypeS = demandTypeS;
 	}
 
+	public Date getCreateTime() {
+		return createTime;
+	}
+
+	public void setCreateTime(Date createTime) {
+		this.createTime = createTime;
+	}
+	public String getCreateTimeFormattedDate() {
+		if (this.createTime == null) {
+			return null;
+		} else {
+			return DateFormatUtils.format(this.getCreateTime(), AFTConstants.YYYYMMDD);
+		}
+	}
+
+	public String getRemark() {
+		return remark;
+	}
+
+	public void setRemark(String remark) {
+		this.remark = remark;
+	}
+
 	
 	
 	

+ 4 - 0
src/main/java/com/goafanti/demand/bo/DemandManageListBo.java

@@ -1,5 +1,7 @@
 package com.goafanti.demand.bo;
 
+import java.util.Date;
+
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.fasterxml.jackson.annotation.JsonFormat.Shape;
 
@@ -32,6 +34,8 @@ public class DemandManageListBo extends DemandListBo {
 	 * 技术经纪人
 	 */
 	private String	techBrokerId;
+	
+	
 
 	public String getTechBrokerId() {
 		return techBrokerId;

+ 4 - 4
src/main/java/com/goafanti/demand/bo/InputDemand.java

@@ -133,14 +133,14 @@ public class InputDemand {
 	@Min(value = 0, message = "{" + ErrorConstants.PARAM_ERROR + "}")
 	private Integer boutique;
 	
-	@Size(min = 0, max = 36, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
-	private Integer remark;
+	@Size(min = 0, max = 500, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
+	private String remark;
 	
-	public Integer getRemark() {
+	public String getRemark() {
 		return remark;
 	}
 
-	public void setRemark(Integer remark) {
+	public void setRemark(String remark) {
 		this.remark = remark;
 	}
 

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

@@ -282,8 +282,8 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 				validityPeriodStartDate, validityPeriodEndDate, null, status, releaseStatus, releaseDateStartDate,
 				releaseDateEndDate, null, null);
 
-		params.put("employerId", TokenManager.getUserId());
-
+		params.put("employerId", "cb6336c1-5e41-431c-a531-617124f316a9");//TokenManager.getUserId()
+		
 		if (pNo == null || pNo < 0) {
 			pNo = 1;
 		}