增加设备点位返回

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

View File

@ -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)));
}
}

View File

@ -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}

View File

@ -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

View File

@ -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 = "设备数量")

View File

@ -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;
}