增加大屏首页统计分组
This commit is contained in:
parent
16af7e125f
commit
c79fb47f9d
|
|
@ -659,6 +659,8 @@ public class BigScreenController {
|
|||
stationSummry.setCODSummry(avgNH);
|
||||
stationSummry.setNHSummry(avgCOD);
|
||||
stationSummry.setDateStr(wholeTime);
|
||||
stationSummry.setGroupId(survStationInfo.getGroupId());
|
||||
stationSummry.setGroupName(survStationInfo.getGroupName());
|
||||
returnArrs.add(JSONObject.parseObject(JSONObject.toJSONString(stationSummry, SerializerFeature.WriteNullStringAsEmpty)));
|
||||
}
|
||||
if(liveList.size()>0){
|
||||
|
|
@ -720,6 +722,9 @@ public class BigScreenController {
|
|||
|
||||
stationSummry.setNOSummry(avgNO);
|
||||
stationSummry.setDateStr(wholeTime);
|
||||
|
||||
stationSummry.setGroupId(survStationInfo.getGroupId());
|
||||
stationSummry.setGroupName(survStationInfo.getGroupName());
|
||||
returnArrs.add(JSONObject.parseObject(JSONObject.toJSONString(stationSummry, SerializerFeature.WriteNullStringAsEmpty)));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,13 +30,16 @@
|
|||
<result column="STATION_ICON" property="stationIcon"/>
|
||||
<result column="STATION_ORG" property="stationIntro"/>
|
||||
<result column="STATION_INTRO" property="stationOrg"/>
|
||||
<result column="GROUP_ID" property="groupId"/>
|
||||
<result column="GROUP_NAME" property="groupName"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="extMap" type="org.jeecg.common.entity.SurvStationInfo" extends="baseResultMap">
|
||||
<collection property="deviceList" select="getDeviceList" column="{STATION_CODE = STATION_CODE,deviceType = deviceType,ysToken = ysToken}" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
|
||||
<sql id="baseSql" >
|
||||
ID,STATION_NAME,STATION_LATITUDE,STATION_TYPE,STATION_LONGITUDE,CORP_ID,SORT_NO,CONTACT_NAME,STATION_CODE,CONTACT_PHONE,BUILD_TIME,STATION_LOCATION,SURV_RANGE,SURV_OBJ,TENANT_ID,RE_VISION,CREATED_BY,CREATE_TIME,UPDATED_BY,UPDATED_TIME,IS_DEL,SURV_FREQUENCY,STATION_PIC,STATION_ICON,STATION_ORG,STATION_INTRO
|
||||
ID,STATION_NAME,STATION_LATITUDE,STATION_TYPE,STATION_LONGITUDE,CORP_ID,SORT_NO,CONTACT_NAME,STATION_CODE,CONTACT_PHONE,BUILD_TIME,STATION_LOCATION,SURV_RANGE,SURV_OBJ,TENANT_ID,RE_VISION,CREATED_BY,CREATE_TIME,UPDATED_BY,UPDATED_TIME,IS_DEL,SURV_FREQUENCY,STATION_PIC,STATION_ICON,STATION_ORG,STATION_INTRO,GROUP_ID,GROUP_NAME
|
||||
</sql>
|
||||
|
||||
<select id="getDeviceList" resultType="org.jeecg.common.entity.SurvDeviceDeploy">
|
||||
|
|
@ -51,7 +54,7 @@
|
|||
select ssi.STATION_TYPE as stationType,count(ssi.STATION_NAME) as stationCount from surv_station_info ssi group by ssi.STATION_TYPE
|
||||
</select>
|
||||
|
||||
<select id="getAllStationAndDevice" resultMap="baseResultMap">
|
||||
<select id="getAllStationAndDevice" resultMap="extMap">
|
||||
select <include refid="baseSql" />,#{deviceType} as deviceType,#{token} as ysToken from surv_station_info where 1=1
|
||||
<if test="stationCode != null and stationCode != ''">
|
||||
AND STATION_CODE = #{stationCode}
|
||||
|
|
|
|||
|
|
@ -29,43 +29,21 @@
|
|||
<result column="STATION_ICON" property="stationIcon"/>
|
||||
<result column="STATION_ORG" property="stationIntro"/>
|
||||
<result column="STATION_INTRO" property="stationOrg"/>
|
||||
<result column="GROUP_ID" property="groupId"/>
|
||||
<result column="GROUP_NAME" property="groupName"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<resultMap id="deviceResultMap" type="org.jeecg.common.entity.SurvStationInfo" extends="baseResultMap">
|
||||
<collection property="deviceList" select="getDeviceList" column="{STATION_CODE = STATION_CODE,deviceType = deviceType,ysToken = ysToken}" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="countMap" type="org.jeecg.common.entity.SurvStationInfo" extends="baseResultMap">
|
||||
<association property="deviceCount" javaType="java.lang.Integer" select="getDeviceCount" column="STATION_CODE" />
|
||||
<association property="survItemCount" javaType="java.lang.Integer" select="getZhiBiaoCount" column="STATION_CODE" />
|
||||
<collection property="deviceList" select="getSimpleDeviceList" column="{STATION_CODE = STATION_CODE}" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<resultMap id="deviceResultMap" type="org.jeecg.common.entity.SurvStationInfo">
|
||||
<id column="ID" property="id"/>
|
||||
<result column="IS_DEL" property="isDel"/>
|
||||
<result column="CORP_ID" property="corpId"/>
|
||||
<result column="SORT_NO" property="sortNo"/>
|
||||
<result column="SURV_OBJ" property="survObj" typeHandler="org.jeecg.common.mybatis.typehandler.ArrayStringTypeHandler"/>
|
||||
<result column="TENANT_ID" property="tenantId"/>
|
||||
<result column="RE_VISION" property="reVision"/>
|
||||
<result column="CREATED_BY" property="createdBy"/>
|
||||
<result column="UPDATED_BY" property="updatedBy"/>
|
||||
<result column="BUILD_TIME" property="buildTime"/>
|
||||
<result column="SURV_RANGE" property="survRange"/>
|
||||
<result column="CREATE_TIME" property="createTime"/>
|
||||
<result column="UPDATED_TIME" property="updatedTime"/>
|
||||
<result column="STATION_NAME" property="stationName"/>
|
||||
<result column="STATION_TYPE" property="stationType"/>
|
||||
<result column="CONTACT_NAME" property="contactName"/>
|
||||
<result column="STATION_CODE" property="stationCode"/>
|
||||
<result column="CONTACT_PHONE" property="contactPhone"/>
|
||||
<result column="STATION_LATITUDE" property="stationLatitude"/>
|
||||
<result column="STATION_LOCATION" property="stationLocation"/>
|
||||
<result column="STATION_LONGITUDE" property="stationLongitude"/>
|
||||
<result column="SURV_FREQUENCY" property="survFrequency"/>
|
||||
<result column="STATION_PIC" property="stationPic" typeHandler="org.jeecg.common.mybatis.typehandler.ArrayStringTypeHandler"/>
|
||||
<result column="STATION_ICON" property="stationIcon"/>
|
||||
<result column="STATION_ORG" property="stationIntro"/>
|
||||
<result column="STATION_INTRO" property="stationOrg"/>
|
||||
<collection property="deviceList" select="getDeviceList" column="{STATION_CODE = STATION_CODE,deviceType = deviceType,ysToken = ysToken}" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<select id="getDeviceCount" resultType="Integer">
|
||||
select count(*) from surv_device_deploy where STATION_CODE = #{STATION_CODE}
|
||||
</select>
|
||||
|
|
@ -90,10 +68,10 @@
|
|||
</select>
|
||||
|
||||
<sql id="baseSql" >
|
||||
ID,STATION_NAME,STATION_LATITUDE,STATION_TYPE,STATION_LONGITUDE,CORP_ID,SORT_NO,CONTACT_NAME,STATION_CODE,CONTACT_PHONE,BUILD_TIME,STATION_LOCATION,SURV_RANGE,SURV_OBJ,TENANT_ID,RE_VISION,CREATED_BY,CREATE_TIME,UPDATED_BY,UPDATED_TIME,IS_DEL,SURV_FREQUENCY,STATION_PIC,STATION_ICON,STATION_ORG,STATION_INTRO
|
||||
ID,STATION_NAME,STATION_LATITUDE,STATION_TYPE,STATION_LONGITUDE,CORP_ID,SORT_NO,CONTACT_NAME,STATION_CODE,CONTACT_PHONE,BUILD_TIME,STATION_LOCATION,SURV_RANGE,SURV_OBJ,TENANT_ID,RE_VISION,CREATED_BY,CREATE_TIME,UPDATED_BY,UPDATED_TIME,IS_DEL,SURV_FREQUENCY,STATION_PIC,STATION_ICON,STATION_ORG,STATION_INTRO,GROUP_ID,GROUP_NAME
|
||||
</sql>
|
||||
|
||||
<select id="pages" resultMap="baseResultMap">
|
||||
<select id="pages" resultMap="countMap">
|
||||
select <include refid="baseSql"/>
|
||||
from surv_station_info where 1=1
|
||||
<if test="param2.stationCode != null and param2.stationCode != ''">
|
||||
|
|
@ -102,7 +80,7 @@
|
|||
order by SORT_NO,CREATE_TIME desc
|
||||
</select>
|
||||
|
||||
<select id="getStationInfo" resultMap="baseResultMap">
|
||||
<select id="getStationInfo" resultMap="countMap">
|
||||
select <include refid="baseSql"/>
|
||||
from surv_station_info where 1=1
|
||||
<if test="stationCode != null and stationCode != ''">
|
||||
|
|
@ -111,7 +89,7 @@
|
|||
order by SORT_NO,CREATE_TIME desc
|
||||
</select>
|
||||
|
||||
<select id="listALlStation" resultMap="baseResultMap">
|
||||
<select id="listALlStation" resultMap="countMap">
|
||||
select <include refid="baseSql"/>
|
||||
from surv_station_info where 1=1
|
||||
order by SORT_NO,CREATE_TIME desc
|
||||
|
|
|
|||
|
|
@ -149,6 +149,12 @@ public class SurvStationInfo implements Serializable {
|
|||
@ApiModelProperty(value = "站点介绍")
|
||||
private String stationIntro;
|
||||
|
||||
@ApiModelProperty(value = "分组ID")
|
||||
private String groupId;
|
||||
|
||||
@ApiModelProperty(value = "分组名称")
|
||||
private String groupName;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "设备数量")
|
||||
|
|
|
|||
|
|
@ -20,5 +20,8 @@ public class StationSummry {
|
|||
private List<Double> CODSummry;
|
||||
@JSONField(name = "dateStr")
|
||||
private List<String> dateStr;
|
||||
|
||||
@JSONField(name = "groupId")
|
||||
private String groupId;
|
||||
@JSONField(name = "groupName")
|
||||
private String groupName;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue