增加设备接口
This commit is contained in:
parent
1884303b99
commit
d7f38d8ae3
|
|
@ -30,19 +30,20 @@
|
|||
<result property="survValue" column="SURV_VALUE" jdbcType="VARCHAR"/>
|
||||
<result property="survUnit" column="SURV_UNIT" jdbcType="VARCHAR"/>
|
||||
<result property="readStatus" column="READ_STATUS" jdbcType="VARCHAR"/>
|
||||
<result property="stationName" column="STATION_NAME" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="extMap" type="org.jeecg.common.entity.SurvAlertRecord" extends="baseResultMap">
|
||||
<association property="stationName" select="getStationName" column="DEPLOY_CODE"/>
|
||||
</resultMap>
|
||||
<sql id="baseSql">
|
||||
ID,ALERT_CONTENT,CORP_ID,ALERT_DTATA_TYPE,ALERT_DATA_ID,PUSH_STATUS,DEVICE_CODE,STATION_CDOE,DEPLOY_CODE,DEPLOY_ID,ALERT_TIME,ITEM_NAME,DEVICE_NAME,CORP_NAME,TENANT_ID,RE_VISION,CREATED_BY,CREATE_TIME,UPDATED_BY,IS_DEL,UPDATED_TIME,ORG_MESSAGE,ITEM_CODE,NORMAL_VALUE,SURV_VALUE,READ_STATUS,SURV_UNIT
|
||||
ID,ALERT_CONTENT,CORP_ID,ALERT_DTATA_TYPE,ALERT_DATA_ID,PUSH_STATUS,DEVICE_CODE,STATION_CDOE,DEPLOY_CODE,DEPLOY_ID,ALERT_TIME,ITEM_NAME,DEVICE_NAME,CORP_NAME,TENANT_ID,RE_VISION,CREATED_BY,CREATE_TIME,UPDATED_BY,IS_DEL,UPDATED_TIME,ORG_MESSAGE,ITEM_CODE,NORMAL_VALUE,SURV_VALUE,READ_STATUS,SURV_UNIT,STATION_NAME
|
||||
</sql>
|
||||
|
||||
<select id="getStationName" resultType="String">
|
||||
select s.STATION_NAME from surv_device_deploy t left join surv_station_info s on t.STATION_CODE = s.STATION_CODE where t.DEPLOY_CODE= #{DEPLOY_CODE}
|
||||
</select>
|
||||
<select id="pages" resultMap="extMap">
|
||||
<select id="pages" resultMap="baseResultMap">
|
||||
select <include refid="baseSql"/>
|
||||
from surv_alert_record where 1=1
|
||||
<if test="deviceList!=null">
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import io.swagger.annotations.ApiModelProperty;
|
|||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.ibatis.type.JdbcType;
|
||||
import org.jeecg.common.mybatis.typehandler.ArrayStringTypeHandler;
|
||||
import org.jeecg.common.mybatis.typehandler.JsonArrayTypeHandler;
|
||||
|
|
@ -168,6 +169,14 @@ public class SurvAlertRecord implements Serializable {
|
|||
|
||||
/**站点名称*/
|
||||
@ApiModelProperty(value = "站点名称")
|
||||
@TableField(exist = false)
|
||||
private String stationName;
|
||||
|
||||
|
||||
|
||||
public String getFullDeviceName() {
|
||||
if(StringUtils.isNotBlank(this.stationName)){
|
||||
return stationName+"-"+deviceName;
|
||||
}
|
||||
return deviceName;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue