增加大屏首页统计分组

This commit is contained in:
zy 2025-11-14 15:25:41 +08:00
parent 1206e85e83
commit 16af7e125f
5 changed files with 41 additions and 36 deletions

View File

@ -659,8 +659,6 @@ public class BigScreenController {
stationSummry.setCODSummry(avgNH); stationSummry.setCODSummry(avgNH);
stationSummry.setNHSummry(avgCOD); stationSummry.setNHSummry(avgCOD);
stationSummry.setDateStr(wholeTime); stationSummry.setDateStr(wholeTime);
stationSummry.setGroupId(survStationInfo.getGroupId());
stationSummry.setGroupName(survStationInfo.getGroupName());
returnArrs.add(JSONObject.parseObject(JSONObject.toJSONString(stationSummry, SerializerFeature.WriteNullStringAsEmpty))); returnArrs.add(JSONObject.parseObject(JSONObject.toJSONString(stationSummry, SerializerFeature.WriteNullStringAsEmpty)));
} }
if(liveList.size()>0){ if(liveList.size()>0){
@ -722,9 +720,6 @@ public class BigScreenController {
stationSummry.setNOSummry(avgNO); stationSummry.setNOSummry(avgNO);
stationSummry.setDateStr(wholeTime); stationSummry.setDateStr(wholeTime);
stationSummry.setGroupId(survStationInfo.getGroupId());
stationSummry.setGroupName(survStationInfo.getGroupName());
returnArrs.add(JSONObject.parseObject(JSONObject.toJSONString(stationSummry, SerializerFeature.WriteNullStringAsEmpty))); returnArrs.add(JSONObject.parseObject(JSONObject.toJSONString(stationSummry, SerializerFeature.WriteNullStringAsEmpty)));
} }
} }

View File

@ -30,16 +30,13 @@
<result column="STATION_ICON" property="stationIcon"/> <result column="STATION_ICON" property="stationIcon"/>
<result column="STATION_ORG" property="stationIntro"/> <result column="STATION_ORG" property="stationIntro"/>
<result column="STATION_INTRO" property="stationOrg"/> <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}" /> <collection property="deviceList" select="getDeviceList" column="{STATION_CODE = STATION_CODE,deviceType = deviceType,ysToken = ysToken}" />
</resultMap> </resultMap>
<sql id="baseSql" > <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,GROUP_ID,GROUP_NAME 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
</sql> </sql>
<select id="getDeviceList" resultType="org.jeecg.common.entity.SurvDeviceDeploy"> <select id="getDeviceList" resultType="org.jeecg.common.entity.SurvDeviceDeploy">
@ -54,7 +51,7 @@
select ssi.STATION_TYPE as stationType,count(ssi.STATION_NAME) as stationCount from surv_station_info ssi group by ssi.STATION_TYPE select ssi.STATION_TYPE as stationType,count(ssi.STATION_NAME) as stationCount from surv_station_info ssi group by ssi.STATION_TYPE
</select> </select>
<select id="getAllStationAndDevice" resultMap="extMap"> <select id="getAllStationAndDevice" resultMap="baseResultMap">
select <include refid="baseSql" />,#{deviceType} as deviceType,#{token} as ysToken from surv_station_info where 1=1 select <include refid="baseSql" />,#{deviceType} as deviceType,#{token} as ysToken from surv_station_info where 1=1
<if test="stationCode != null and stationCode != ''"> <if test="stationCode != null and stationCode != ''">
AND STATION_CODE = #{stationCode} AND STATION_CODE = #{stationCode}

View File

@ -29,21 +29,43 @@
<result column="STATION_ICON" property="stationIcon"/> <result column="STATION_ICON" property="stationIcon"/>
<result column="STATION_ORG" property="stationIntro"/> <result column="STATION_ORG" property="stationIntro"/>
<result column="STATION_INTRO" property="stationOrg"/> <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="deviceCount" javaType="java.lang.Integer" select="getDeviceCount" column="STATION_CODE" />
<association property="survItemCount" javaType="java.lang.Integer" select="getZhiBiaoCount" 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}" /> <collection property="deviceList" select="getSimpleDeviceList" column="{STATION_CODE = STATION_CODE}" />
</resultMap> </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 id="getDeviceCount" resultType="Integer">
select count(*) from surv_device_deploy where STATION_CODE = #{STATION_CODE} select count(*) from surv_device_deploy where STATION_CODE = #{STATION_CODE}
</select> </select>
@ -68,10 +90,10 @@
</select> </select>
<sql id="baseSql" > <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,GROUP_ID,GROUP_NAME 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
</sql> </sql>
<select id="pages" resultMap="countMap"> <select id="pages" resultMap="baseResultMap">
select <include refid="baseSql"/> select <include refid="baseSql"/>
from surv_station_info where 1=1 from surv_station_info where 1=1
<if test="param2.stationCode != null and param2.stationCode != ''"> <if test="param2.stationCode != null and param2.stationCode != ''">
@ -80,7 +102,7 @@
order by SORT_NO,CREATE_TIME desc order by SORT_NO,CREATE_TIME desc
</select> </select>
<select id="getStationInfo" resultMap="countMap"> <select id="getStationInfo" resultMap="baseResultMap">
select <include refid="baseSql"/> select <include refid="baseSql"/>
from surv_station_info where 1=1 from surv_station_info where 1=1
<if test="stationCode != null and stationCode != ''"> <if test="stationCode != null and stationCode != ''">
@ -89,7 +111,7 @@
order by SORT_NO,CREATE_TIME desc order by SORT_NO,CREATE_TIME desc
</select> </select>
<select id="listALlStation" resultMap="countMap"> <select id="listALlStation" resultMap="baseResultMap">
select <include refid="baseSql"/> select <include refid="baseSql"/>
from surv_station_info where 1=1 from surv_station_info where 1=1
order by SORT_NO,CREATE_TIME desc order by SORT_NO,CREATE_TIME desc

View File

@ -149,12 +149,6 @@ public class SurvStationInfo implements Serializable {
@ApiModelProperty(value = "站点介绍") @ApiModelProperty(value = "站点介绍")
private String stationIntro; private String stationIntro;
@ApiModelProperty(value = "分组ID")
private String groupId;
@ApiModelProperty(value = "分组名称")
private String groupName;
@TableField(exist = false) @TableField(exist = false)
@ApiModelProperty(value = "设备数量") @ApiModelProperty(value = "设备数量")

View File

@ -20,8 +20,5 @@ public class StationSummry {
private List<Double> CODSummry; private List<Double> CODSummry;
@JSONField(name = "dateStr") @JSONField(name = "dateStr")
private List<String> dateStr; private List<String> dateStr;
@JSONField(name = "groupId")
private String groupId;
@JSONField(name = "groupName")
private String groupName;
} }