xiao547607 5 lat temu
rodzic
commit
6657b3cade

+ 5 - 0
src/main/java/com/jpsoft/smart/modules/base/controller/AlarmInfoController.java

@@ -193,6 +193,7 @@ public class AlarmInfoController {
     @RequestMapping(value = "pageList",method = RequestMethod.POST)
     public MessageResult<Map> pageList(
             String id,
+            @RequestParam(value="type",defaultValue="") String type,
             @RequestParam(value="draw",defaultValue="1") int draw,
             @RequestParam(value="start",defaultValue="1") int start,
             @RequestParam(value="length",defaultValue="20") int length,
@@ -212,6 +213,10 @@ public class AlarmInfoController {
             searchParams.put("id","%" + id + "%");
         }
 
+        if (StringUtils.isNotEmpty(type)) {
+            searchParams.put("type",type);
+        }
+
         int pageNum = start / length;
 
         if (start % length != 0) {

+ 5 - 0
src/main/java/com/jpsoft/smart/modules/base/controller/InformationInfoController.java

@@ -193,6 +193,7 @@ public class InformationInfoController {
     @RequestMapping(value = "pageList",method = RequestMethod.POST)
     public MessageResult<Map> pageList(
             String id,
+            @RequestParam(value="type",defaultValue="") String type,
             @RequestParam(value="draw",defaultValue="1") int draw,
             @RequestParam(value="start",defaultValue="1") int start,
             @RequestParam(value="length",defaultValue="20") int length,
@@ -212,6 +213,10 @@ public class InformationInfoController {
             searchParams.put("id","%" + id + "%");
         }
 
+        if (StringUtils.isNotEmpty(type)) {
+            searchParams.put("type",type);
+        }
+
         int pageNum = start / length;
 
         if (start % length != 0) {

+ 16 - 0
src/main/java/com/jpsoft/smart/modules/base/entity/AlarmInfo.java

@@ -19,6 +19,7 @@ public class AlarmInfo {
 	private String channelName;
 	private String alertType;
 	private String type;
+	private String videoUrl;
 	
 		/**
 	 *获取
@@ -154,4 +155,19 @@ public class AlarmInfo {
 	public void setType(String type){
 		this.type = type;
 	}
+	/**
+	 *获取视频地址
+	 */
+	public String getVideoUrl(){
+		return videoUrl;
+	}
+
+	/**
+	 *设置视频地址
+	 */
+	public void setVideoUrl(String videoUrl){
+		this.videoUrl = videoUrl;
+	}
+
+
 }

+ 18 - 5
src/main/java/com/jpsoft/smart/modules/base/entity/InformationInfo.java

@@ -1,11 +1,9 @@
 package com.jpsoft.smart.modules.base.entity;
 
-import java.io.Serializable;
-import java.util.Date;
-import java.text.SimpleDateFormat;
-import java.math.BigDecimal;
-import org.springframework.format.annotation.DateTimeFormat;
 import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
 
 /**
   描述:base_information_info的实体类
@@ -18,6 +16,7 @@ public class InformationInfo {
 	private Date updateTime;
 	private Boolean delFlag;
 	private String ownerId;
+	private OwnerInfo owner;
 	private String community;
 	private String content;
 	private String status;
@@ -200,4 +199,18 @@ public class InformationInfo {
 	public void setType(String type){
 		this.type = type;
 	}
+
+	/**
+	 *获取用户
+	 */
+	public OwnerInfo getOwner(){
+		return owner;
+	}
+
+	/**
+	 *设置用户
+	 */
+	public void setOwner(OwnerInfo owner){
+		this.owner = owner;
+	}
 }

+ 2 - 2
src/main/java/com/jpsoft/smart/modules/base/entity/OwnerInfo.java

@@ -176,8 +176,8 @@ public class OwnerInfo {
 	public void setArea(String area){
 		this.area = area;
 	}
-		@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
-	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+		@DateTimeFormat(pattern="yyyy-MM-dd")
+	@JsonFormat(pattern = "yyyy-MM-dd",timezone ="GMT+8")
 		/**
 	 *获取入住时间
 	 */

+ 52 - 5
src/main/java/com/jpsoft/smart/modules/base/entity/ParkingApply.java

@@ -1,11 +1,9 @@
 package com.jpsoft.smart.modules.base.entity;
 
-import java.io.Serializable;
-import java.util.Date;
-import java.text.SimpleDateFormat;
-import java.math.BigDecimal;
-import org.springframework.format.annotation.DateTimeFormat;
 import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
 
 /**
   描述:base_parking_apply的实体类
@@ -18,9 +16,12 @@ public class ParkingApply {
 	private Date updateTime;
 	private Boolean delFlag;
 	private String parkingId;
+	private ParkingInfo parking;
 	private String ownerId;
+	private OwnerInfo owner;
 	private String contractType;
 	private Integer contractDuration;
+	private Date startTime;
 	
 		/**
 	 *获取
@@ -156,4 +157,50 @@ public class ParkingApply {
 	public void setContractDuration(Integer contractDuration){
 		this.contractDuration = contractDuration;
 	}
+
+	/**
+	 *获取用户
+	 */
+	public OwnerInfo getOwner(){
+		return owner;
+	}
+
+	/**
+	 *设置用户
+	 */
+	public void setOwner(OwnerInfo owner){
+		this.owner = owner;
+	}
+
+	/**
+	 *获取车位
+	 */
+	public ParkingInfo getParking(){
+		return parking;
+	}
+
+	/**
+	 *设置车位
+	 */
+	public void setParking(ParkingInfo parking){
+		this.parking = parking;
+	}
+
+	/**
+	 *获取车位
+	 */
+	@DateTimeFormat(pattern="yyyy-MM-dd")
+	@JsonFormat(pattern = "yyyy-MM-dd",timezone ="GMT+8")
+	public Date getStartTime(){
+		return startTime;
+	}
+
+	/**
+	 *设置车位
+	 */
+	public void setStartTime(Date startTime){
+		this.startTime = startTime;
+	}
+
+
 }

+ 24 - 9
src/main/java/com/jpsoft/smart/modules/base/entity/ParkingInfo.java

@@ -1,11 +1,10 @@
 package com.jpsoft.smart.modules.base.entity;
 
-import java.io.Serializable;
-import java.util.Date;
-import java.text.SimpleDateFormat;
-import java.math.BigDecimal;
-import org.springframework.format.annotation.DateTimeFormat;
 import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.math.BigDecimal;
+import java.util.Date;
 
 /**
   描述:base_parking_info的实体类
@@ -22,6 +21,7 @@ public class ParkingInfo {
 	private Integer rentPrice;
 	private String contractType;
 	private String ownerId;
+	private OwnerInfo owner;
 	private Date effectiveTime;
 	private Date expirationTime;
 	
@@ -174,8 +174,8 @@ public class ParkingInfo {
 	public void setOwnerId(String ownerId){
 		this.ownerId = ownerId;
 	}
-		@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
-	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+		@DateTimeFormat(pattern="yyyy-MM-dd")
+	@JsonFormat(pattern = "yyyy-MM-dd",timezone ="GMT+8")
 		/**
 	 *获取生效日期
 	 */
@@ -189,8 +189,8 @@ public class ParkingInfo {
 	public void setEffectiveTime(Date effectiveTime){
 		this.effectiveTime = effectiveTime;
 	}
-		@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
-	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+		@DateTimeFormat(pattern="yyyy-MM-dd")
+	@JsonFormat(pattern = "yyyy-MM-dd",timezone ="GMT+8")
 		/**
 	 *获取有效期
 	 */
@@ -204,4 +204,19 @@ public class ParkingInfo {
 	public void setExpirationTime(Date expirationTime){
 		this.expirationTime = expirationTime;
 	}
+
+	/**
+	 *获取用户
+	 */
+	public OwnerInfo getOwner(){
+		return owner;
+	}
+
+	/**
+	 *设置用户
+	 */
+	public void setOwner(OwnerInfo owner){
+		this.owner = owner;
+	}
+
 }

+ 10 - 1
src/main/resources/mapper/base/AlarmInfo.xml

@@ -14,6 +14,8 @@
 			<result property="channelName" column="channel_name" />
 			<result property="alertType" column="alert_type" />
 			<result property="type" column="type_" />
+			<result property="videoUrl" column="video_url" />
+
 			</resultMap>
 	<insert id="insert" parameterType="AlarmInfo">
 	<!--
@@ -23,7 +25,7 @@
 	-->
 	<![CDATA[
 		insert into base_alarm_info
-	    (id_,create_by,create_time,update_by,update_time,del_flag,device_no,channel_name,alert_type,type_)
+	    (id_,create_by,create_time,update_by,update_time,del_flag,device_no,channel_name,alert_type,type_,video_url)
 		values
 		(
 #{id,jdbcType=VARCHAR}
@@ -36,6 +38,7 @@
 ,#{channelName,jdbcType=VARCHAR}
 ,#{alertType,jdbcType=VARCHAR}
 ,#{type,jdbcType=VARCHAR}
+,#{videoUrl,jdbcType=VARCHAR}
 		)
 	]]>
 	</insert>
@@ -72,6 +75,9 @@
 				<if test="type!=null">
 		type_=#{type,jdbcType=VARCHAR},
 		</if>
+			<if test="videoUrl!=null">
+				video_url=#{videoUrl,jdbcType=VARCHAR},
+			</if>
 		</set>
 	where id_=#{id}
 	</update>
@@ -93,6 +99,9 @@ id_,create_by,create_time,update_by,update_time,del_flag,device_no,channel_name,
 			<if test="searchParams.id != null">
 				and ID_ like #{searchParams.id}
 			</if>
+			<if test="searchParams.type != null">
+				and type_ = #{searchParams.type}
+			</if>
 		</where>
 		<foreach item="sort" collection="sortList"  open="order by" separator=",">
 	        ${sort.name} ${sort.order}

+ 5 - 0
src/main/resources/mapper/base/InformationInfo.xml

@@ -17,6 +17,7 @@
 			<result property="returnContent" column="return_content" />
 			<result property="returnTime" column="return_time" />
 			<result property="type" column="type_" />
+			<association property="owner" column="owner_id" select="com.jpsoft.smart.modules.base.dao.OwnerInfoDAO.get"/>
 			</resultMap>
 	<insert id="insert" parameterType="InformationInfo">
 	<!--
@@ -108,6 +109,10 @@ id_,create_by,create_time,update_by,update_time,del_flag,owner_id,community_,con
 			<if test="searchParams.id != null">
 				and ID_ like #{searchParams.id}
 			</if>
+			<if test="searchParams.type != null">
+				and type_ like #{searchParams.type}
+			</if>
+
 		</where>
 		<foreach item="sort" collection="sortList"  open="order by" separator=",">
 	        ${sort.name} ${sort.order}

+ 9 - 1
src/main/resources/mapper/base/ParkingApply.xml

@@ -14,6 +14,9 @@
 			<result property="ownerId" column="owner_id" />
 			<result property="contractType" column="contract_type" />
 			<result property="contractDuration" column="contract_duration" />
+			<result property="startTime" column="start_time" />
+			<association property="owner" column="owner_id" select="com.jpsoft.smart.modules.base.dao.OwnerInfoDAO.get"/>
+			<association property="parking" column="parking_id" select="com.jpsoft.smart.modules.base.dao.ParkingInfoDAO.get"/>
 			</resultMap>
 	<insert id="insert" parameterType="ParkingApply">
 	<!--
@@ -23,7 +26,7 @@
 	-->
 	<![CDATA[
 		insert into base_parking_apply
-	    (id_,create_by,create_time,update_by,update_time,del_flag,parking_id,owner_id,contract_type,contract_duration)
+	    (id_,create_by,create_time,update_by,update_time,del_flag,parking_id,owner_id,contract_type,contract_duration,start_time)
 		values
 		(
 #{id,jdbcType=VARCHAR}
@@ -36,6 +39,7 @@
 ,#{ownerId,jdbcType=VARCHAR}
 ,#{contractType,jdbcType=VARCHAR}
 ,#{contractDuration,jdbcType= NUMERIC }
+,#{startTime,jdbcType= TIMESTAMP }
 		)
 	]]>
 	</insert>
@@ -72,6 +76,10 @@
 				<if test="contractDuration!=null">
 		contract_duration=#{contractDuration,jdbcType= NUMERIC },
 		</if>
+			<if test="startTime!=null">
+				start_time=#{startTime,jdbcType= TIMESTAMP },
+			</if>
+
 		</set>
 	where id_=#{id}
 	</update>

+ 1 - 0
src/main/resources/mapper/base/ParkingInfo.xml

@@ -17,6 +17,7 @@
 			<result property="ownerId" column="owner_id" />
 			<result property="effectiveTime" column="effective_time" />
 			<result property="expirationTime" column="expiration_time" />
+			<association property="owner" column="owner_id" select="com.jpsoft.smart.modules.base.dao.OwnerInfoDAO.get"/>
 			</resultMap>
 	<insert id="insert" parameterType="ParkingInfo">
 	<!--