调整字段

This commit is contained in:
zy 2025-11-27 17:45:48 +08:00
parent 9308b01e08
commit e7db425f22
57 changed files with 178 additions and 169 deletions

View File

@ -472,7 +472,7 @@ public class BigScreenController {
noent.setStationCode(survStationInfo.getStationCode());
noent.setSurvItem(PollutionEnum.dataWaterNo.getCode());
String deployId = deployMap.get(transdataOrientwaterVo.getDeviceCode()).getId();
String deployId = deployMap.get(transdataOrientwaterVo.getDeployCode()).getId();
tpent.setValue(transdataOrientwaterVo.getDataWaterTp());
tpent.setDeployId(deployId);
@ -540,7 +540,7 @@ public class BigScreenController {
codent.setStationCode(survStationInfo.getStationCode());
codent.setSurvItem(PollutionEnum.dataWaterCod.getCode());
String deployId = deployMap.get(transdataLivestockwaterVo.getDeviceCode()).getId();
String deployId = deployMap.get(transdataLivestockwaterVo.getDeployCode()).getId();
tpent.setValue(transdataLivestockwaterVo.getDataWaterTp());
tpent.setDeployId(deployId);

View File

@ -76,12 +76,11 @@ public class BigScreenControllerP2 {
.like(SurvDeviceDeploy::getDeployType,pollutionEnum.getType())
.last("limit 1"));
}
Assert.notNull(deploy, "无效的设备");
voBigScreenSurvQ.setDeployId(deploy.getId());
VOHisResult voHisResult = iotCommonP3Service.iotSurvSummary(voBigScreenSurvQ);
List<VOHisFormResult> voHisFormResults = new ArrayList<>();
if(!voHisResult.getDataList().isEmpty()){
if(voHisResult.getDataList()!=null && !voHisResult.getDataList().isEmpty()){
for (int i=0;i<voHisResult.getDataList().size();i++) {
VOHisFormResult voHisFormResult = new VOHisFormResult();
voHisFormResult.setDate(voHisResult.getTimeList().get(i));

View File

@ -95,7 +95,7 @@ public class SurvGenDataController extends JeecgController<SurvHisdataAir, ISurv
hisdataOrientwater.setDataDateTime(date);
hisdataOrientwater.setDataGatherType("realTime");
hisdataOrientwater.setDataWaterNo(waterNo[values]);
hisdataOrientwater.setDeviceCode(deploy.getDeployCode());
hisdataOrientwater.setDeployCode(deploy.getDeployCode());
hisdataOrientwater.setDataWaterTpSy(waterTpSy[values]);
hisdataOrientwater.setDataWaterTpLd(waterTpLd[values]);
hisdataOrientwater.setDataWaterTnSy(waterTnSy[values]);
@ -134,7 +134,7 @@ public class SurvGenDataController extends JeecgController<SurvHisdataAir, ISurv
hisdataLivestockwater.setDataWaterNh(waterNh[values]);
hisdataLivestockwater.setDataWaterCod(waterCod[values]);
hisdataLivestockwater.setDeviceCode(deploy.getDeployCode());
hisdataLivestockwater.setDeployCode(deploy.getDeployCode());
hisdataLivestockwater.setFluidLevel(waterFluidLevel[values]);
hisdataLivestockwater.setFirstValveStatus("0");
hisdataLivestockwater.setSecondValveStatus("1");

View File

@ -17,7 +17,7 @@
<result property="stationId" column="STATION_ID" jdbcType="VARCHAR"/>
<result property="deviceId" column="DEVICE_ID" jdbcType="VARCHAR"/>
<result property="stationCode" column="STATION_CODE" jdbcType="VARCHAR"/>
<result property="deviceCode" column="DEVICE_CODE" jdbcType="VARCHAR"/>
<result property="deployCode" column="DEPLOY_CODE" jdbcType="VARCHAR"/>
<result property="corpId" column="CORP_ID" jdbcType="VARCHAR"/>
<result property="stationName" column="STATION_NAME" jdbcType="VARCHAR"/>
<result property="deviceName" column="DEVICE_NAME" jdbcType="VARCHAR"/>
@ -30,11 +30,11 @@
<result property="isDel" column="IS_DEL" jdbcType="INTEGER"/>
<result property="updatedTime" column="UPDATED_TIME"/>
<result property="deployId" column="DEPLOY_ID"/>
<association property="stationName" column="{deplyCode = DEVICE_CODE}" javaType="java.lang.String" select="org.jeecg.modules.appmana.mapper.SurvDeviceDeployMapper.getStationNameByDeployCode"/>
<association property="stationName" column="{deplyCode = DEPLOY_CODE}" javaType="java.lang.String" select="org.jeecg.modules.appmana.mapper.SurvDeviceDeployMapper.getStationNameByDeployCode"/>
</resultMap>
<sql id="baseSql">
ID,DATA_AIR_TEMP,DATA_AIR_WET,DATA_AIR_PRESS,DATA_RAIN_FALL,DATA_WIND_SPEED,DATA_WIND_DIRECTION,DATA_SUN_FALLOUT,DATA_SUN_TOTAL,DATA_RAIN_TOTAL,DATA_DATE_TIME,DATA_GATHER_TYPE,STATION_ID,DEVICE_ID,STATION_CODE,DEVICE_CODE,CORP_ID,STATION_NAME,DEVICE_NAME,TRANS_DATE,TENANT_ID,RE_VISION,CREATED_BY,CREATE_TIME,UPDATED_BY,IS_DEL,UPDATED_TIME,DEPLOY_ID
ID,DATA_AIR_TEMP,DATA_AIR_WET,DATA_AIR_PRESS,DATA_RAIN_FALL,DATA_WIND_SPEED,DATA_WIND_DIRECTION,DATA_SUN_FALLOUT,DATA_SUN_TOTAL,DATA_RAIN_TOTAL,DATA_DATE_TIME,DATA_GATHER_TYPE,STATION_ID,DEVICE_ID,STATION_CODE,DEPLOY_CODE,CORP_ID,STATION_NAME,DEVICE_NAME,TRANS_DATE,TENANT_ID,RE_VISION,CREATED_BY,CREATE_TIME,UPDATED_BY,IS_DEL,UPDATED_TIME,DEPLOY_ID
</sql>
<select id="pages" resultMap="baseResultMap">
@ -42,11 +42,11 @@
<if test="query.dataDateTime != null">
and DATE_FORMAT(DATA_DATE_TIME, '%Y-%m-%d') = DATE_FORMAT(#{query.dataDateTime},'%Y-%m-%d')
</if>
<if test="query.deviceCode != null">
and DEVICE_CODE = #{query.deviceCode}
<if test="query.deployCode != null">
and DEPLOY_CODE = #{query.deployCode}
</if>
<if test="deviceList!=null and deviceList.size()>0">
and DEVICE_CODE IN
and DEPLOY_CODE IN
<foreach collection="deviceList" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
@ -68,7 +68,7 @@
and DATE_FORMAT(DATA_DATE_TIME, '%Y') = #{yearStr}
</if>
<if test="airList!=null and airList.size()>0">
and DEVICE_CODE IN
and DEPLOY_CODE IN
<foreach collection="airList" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
@ -80,7 +80,7 @@
<select id="listByParams" resultMap="baseResultMap">
select <include refid="baseSql"/> from surv_hisdata_air where DEVICE_CODE = #{deployCode} AND DATA_DATE_TIME &gt;= #{startDateTime} AND DATA_DATE_TIME &lt;= #{endDateTime} order by DATA_DATE_TIME DESC
select <include refid="baseSql"/> from surv_hisdata_air where DEPLOY_CODE = #{deployCode} AND DATA_DATE_TIME &gt;= #{startDateTime} AND DATA_DATE_TIME &lt;= #{endDateTime} order by DATA_DATE_TIME DESC
</select>
<select id="integrateSummary" resultType="org.jeecg.common.iot.common.VOSurvIntegrateAirDetail">
@ -114,7 +114,7 @@
<if test="tenantId != null and tenantId != ''">
AND TENANT_ID = #{tenantId}
</if>
AND DEVICE_CODE IN
AND DEPLOY_CODE IN
<foreach item="id" collection="airDevice" open="(" separator="," close=")">
#{id}
</foreach>

View File

@ -15,7 +15,7 @@
<result property="stationId" column="STATION_ID" jdbcType="VARCHAR"/>
<result property="deviceId" column="DEVICE_ID" jdbcType="VARCHAR"/>
<result property="stationCode" column="STATION_CODE" jdbcType="VARCHAR"/>
<result property="deviceCode" column="DEVICE_CODE" jdbcType="VARCHAR"/>
<result property="deployCode" column="DEPLOY_CODE" jdbcType="VARCHAR"/>
<result property="corpId" column="CORP_ID" jdbcType="VARCHAR"/>
<!-- <result property="stationName" column="STATION_NAME" jdbcType="VARCHAR"/>-->
<result property="deviceName" column="DEVICE_NAME" jdbcType="VARCHAR"/>
@ -27,11 +27,11 @@
<result property="updatedBy" column="UPDATED_BY" jdbcType="VARCHAR"/>
<result property="isDel" column="IS_DEL" jdbcType="INTEGER"/>
<result property="updatedTime" column="UPDATED_TIME" />
<association property="stationName" column="{deplyCode = DEVICE_CODE}" javaType="java.lang.String" select="org.jeecg.modules.appmana.mapper.SurvDeviceDeployMapper.getStationNameByDeployCode"/>
<association property="stationName" column="{deplyCode = DEPLOY_CODE}" javaType="java.lang.String" select="org.jeecg.modules.appmana.mapper.SurvDeviceDeployMapper.getStationNameByDeployCode"/>
</resultMap>
<sql id="baseSql">
ID,DATA_ID,DATA_WATER_TP,DATA_WATER_TN,DATA_WATER_NO,DATA_WATER_NH,DATA_WATER_COD,DATA_DATE_TIME,DATA_GATHER_TYPE,STATION_ID,DEVICE_ID,STATION_CODE,DEVICE_CODE,CORP_ID,STATION_NAME,DEVICE_NAME,TRANS_DATE,TENANT_ID,RE_VISION,CREATED_BY,CREATE_TIME,UPDATED_BY,IS_DEL,UPDATED_TIME
ID,DATA_ID,DATA_WATER_TP,DATA_WATER_TN,DATA_WATER_NO,DATA_WATER_NH,DATA_WATER_COD,DATA_DATE_TIME,DATA_GATHER_TYPE,STATION_ID,DEVICE_ID,STATION_CODE,DEPLOY_CODE,CORP_ID,STATION_NAME,DEVICE_NAME,TRANS_DATE,TENANT_ID,RE_VISION,CREATED_BY,CREATE_TIME,UPDATED_BY,IS_DEL,UPDATED_TIME
</sql>
<select id="getMonthSummry" resultType="org.jeecg.common.vo.LiveDataTrans">
@ -46,7 +46,7 @@
and DATE_FORMAT(DATA_DATE_TIME, '%Y') = #{yearStr}
</if>
<if test="liveList!=null">
and DEVICE_CODE IN
and DEPLOY_CODE IN
<foreach collection="liveList" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
@ -62,11 +62,11 @@
<if test="query.dataDateTime != null">
and DATE_FORMAT(DATA_DATE_TIME, '%Y-%m-%d') = DATE_FORMAT(#{query.dataDateTime},'%Y-%m-%d')
</if>
<if test="query.deviceCode != null">
and DEVICE_CODE = #{query.deviceCode}
<if test="query.deployCode != null">
and DEPLOY_CODE = #{query.deployCode}
</if>
<if test="deviceList!=null and deviceList.size()>0">
and DEVICE_CODE IN
and DEPLOY_CODE IN
<foreach collection="deviceList" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
@ -75,11 +75,11 @@
</select>
<select id="listByParams" resultMap="baseResultMap">
select <include refid="baseSql"/> from surv_hisdata_livestockwater where DEVICE_CODE = #{deployCode} AND DATA_DATE_TIME &gt;= #{startDateTime} AND DATA_DATE_TIME &lt;= #{endDateTime} order by DATA_DATE_TIME DESC
select <include refid="baseSql"/> from surv_hisdata_livestockwater where DEPLOY_CODE = #{deployCode} AND DATA_DATE_TIME &gt;= #{startDateTime} AND DATA_DATE_TIME &lt;= #{endDateTime} order by DATA_DATE_TIME DESC
</select>
<select id="getRecentDate" resultMap="baseResultMap">
select <include refid="baseSql"/> from surv_hisdata_livestockwater where DEVICE_CODE = #{deployCode} order by DATA_DATE_TIME desc limit 1
select <include refid="baseSql"/> from surv_hisdata_livestockwater where DEPLOY_CODE = #{deployCode} order by DATA_DATE_TIME desc limit 1
</select>
<select id="integrateSummary" resultType="org.jeecg.common.iot.common.VOSurvIntegrateLiveDetail">
@ -93,7 +93,7 @@
<if test="tenantId != null and tenantId != ''">
AND TENANT_ID = #{tenantId}
</if>
AND DEVICE_CODE IN
AND DEPLOY_CODE IN
<foreach item="id" collection="liveDevice" open="(" separator="," close=")">
#{id}
</foreach>

View File

@ -25,7 +25,7 @@
<result property="stationId" column="STATION_ID" jdbcType="VARCHAR"/>
<result property="deviceId" column="DEVICE_ID" jdbcType="VARCHAR"/>
<result property="stationCode" column="STATION_CODE" jdbcType="VARCHAR"/>
<result property="deviceCode" column="DEVICE_CODE" jdbcType="VARCHAR"/>
<result property="deployCode" column="DEPLOY_CODE" jdbcType="VARCHAR"/>
<result property="corpId" column="CORP_ID" jdbcType="VARCHAR"/>
<result property="stationName" column="STATION_NAME" jdbcType="VARCHAR"/>
<result property="deviceName" column="DEVICE_NAME" jdbcType="VARCHAR"/>
@ -37,7 +37,7 @@
<result property="updatedBy" column="UPDATED_BY" jdbcType="VARCHAR"/>
<result property="isDel" column="IS_DEL" jdbcType="INTEGER"/>
<result property="updatedTime" column="UPDATED_TIME" />
<association property="stationName" column="{deplyCode = DEVICE_CODE}" javaType="java.lang.String" select="org.jeecg.modules.appmana.mapper.SurvDeviceDeployMapper.getStationNameByDeployCode"/>
<association property="stationName" column="{deplyCode = DEPLOY_CODE}" javaType="java.lang.String" select="org.jeecg.modules.appmana.mapper.SurvDeviceDeployMapper.getStationNameByDeployCode"/>
</resultMap>
<select id="getMonthSummry" resultType="org.jeecg.common.vo.OrientDataTrans">
@ -51,7 +51,7 @@
and DATE_FORMAT(DATA_DATE_TIME, '%Y') = #{yearStr}
</if>
<if test="orientList!=null">
and DEVICE_CODE IN
and DEPLOY_CODE IN
<foreach collection="orientList" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
@ -63,7 +63,7 @@
<sql id="baseSql" >
ID,DATA_ID,DATA_WATER_TP,DATA_WATER_TN,DATA_WATER_NH,DATA_WATER_COD,DATA_WATER_NO,DATA_WATER_TP_SY,DATA_WATER_TP_LD,DATA_WATER_TN_SY,DATA_WATER_TN_LD,FLUID_LEVEL,FIRST_VALVE_STATUS,SECOND_VALVE_STATUS,CRASH_STOP_STATUS,WATER_PUMP_STATUS,MAIN_SIDE_STATUS,DATA_DATE_TIME,DATA_GATHER_TYPE,STATION_ID,DEVICE_ID,STATION_CODE,DEVICE_CODE,CORP_ID,STATION_NAME,DEVICE_NAME,TRANS_DATE,TENANT_ID,RE_VISION,CREATED_BY,CREATE_TIME,UPDATED_BY,IS_DEL,UPDATED_TIME
ID,DATA_ID,DATA_WATER_TP,DATA_WATER_TN,DATA_WATER_NH,DATA_WATER_COD,DATA_WATER_NO,DATA_WATER_TP_SY,DATA_WATER_TP_LD,DATA_WATER_TN_SY,DATA_WATER_TN_LD,FLUID_LEVEL,FIRST_VALVE_STATUS,SECOND_VALVE_STATUS,CRASH_STOP_STATUS,WATER_PUMP_STATUS,MAIN_SIDE_STATUS,DATA_DATE_TIME,DATA_GATHER_TYPE,STATION_ID,DEVICE_ID,STATION_CODE,DEPLOY_CODE,CORP_ID,STATION_NAME,DEVICE_NAME,TRANS_DATE,TENANT_ID,RE_VISION,CREATED_BY,CREATE_TIME,UPDATED_BY,IS_DEL,UPDATED_TIME
</sql>
<select id="pages" resultMap="baseResultMap">
@ -71,11 +71,11 @@
<if test="query.dataDateTime != null">
and DATE_FORMAT(DATA_DATE_TIME, '%Y-%m-%d') = DATE_FORMAT(#{query.dataDateTime},'%Y-%m-%d')
</if>
<if test="query.deviceCode != null">
and DEVICE_CODE = #{query.deviceCode}
<if test="query.deployCode != null">
and DEPLOY_CODE = #{query.deployCode}
</if>
<if test="deviceList!=null and deviceList.size()>0">
and DEVICE_CODE IN
and DEPLOY_CODE IN
<foreach collection="deviceList" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
@ -100,11 +100,11 @@
</select>
<select id="listByParams" resultMap="baseResultMap">
select <include refid="baseSql"/> from surv_hisdata_orientwater where DEVICE_CODE = #{deployCode} AND DATA_DATE_TIME &gt;= #{startDateTime} AND DATA_DATE_TIME &lt;= #{endDateTime} order by DATA_DATE_TIME DESC
select <include refid="baseSql"/> from surv_hisdata_orientwater where DEPLOY_CODE = #{deployCode} AND DATA_DATE_TIME &gt;= #{startDateTime} AND DATA_DATE_TIME &lt;= #{endDateTime} order by DATA_DATE_TIME DESC
</select>
<select id="getRecentDate" resultMap="baseResultMap">
select <include refid="baseSql"/> from surv_hisdata_orientwater where DEVICE_CODE = #{deployCode} order by DATA_DATE_TIME desc limit 1
select <include refid="baseSql"/> from surv_hisdata_orientwater where DEPLOY_CODE = #{deployCode} order by DATA_DATE_TIME desc limit 1
</select>
<select id="integrateSummary" resultType="org.jeecg.common.iot.common.VOSurvIntegrateOrientDetail">
@ -117,7 +117,7 @@
<if test="tenantId != null and tenantId != ''">
AND TENANT_ID = #{tenantId}
</if>
AND DEVICE_CODE IN
AND DEPLOY_CODE IN
<foreach item="id" collection="orientDevice" open="(" separator="," close=")">
#{id}
</foreach>

View File

@ -50,7 +50,7 @@
<result property="stationId" column="STATION_ID" jdbcType="VARCHAR"/>
<result property="deviceId" column="DEVICE_ID" jdbcType="VARCHAR"/>
<result property="stationCode" column="STATION_CODE" jdbcType="VARCHAR"/>
<result property="deviceCode" column="DEVICE_CODE" jdbcType="VARCHAR"/>
<result property="deployCode" column="DEPLOY_CODE" jdbcType="VARCHAR"/>
<result property="corpId" column="CORP_ID" jdbcType="VARCHAR"/>
<result property="stationName" column="STATION_NAME" jdbcType="VARCHAR"/>
<result property="deviceName" column="DEVICE_NAME" jdbcType="VARCHAR"/>
@ -63,12 +63,12 @@
<result property="isDel" column="IS_DEL" jdbcType="INTEGER"/>
<result property="updatedTime" column="UPDATED_TIME"/>
<result property="deployId" column="DEPLOY_ID"/>
<association property="stationName" column="{deplyCode = DEVICE_CODE}" javaType="java.lang.String" select="org.jeecg.modules.appmana.mapper.SurvDeviceDeployMapper.getStationNameByDeployCode"/>
<association property="stationName" column="{deplyCode = DEPLOY_CODE}" javaType="java.lang.String" select="org.jeecg.modules.appmana.mapper.SurvDeviceDeployMapper.getStationNameByDeployCode"/>
</resultMap>
<sql id="baseSql">
ID,DATA_SOIL_TEMP,DATA_SOIL_WET,DATA_SOIL_SALT,DATA_SOIL_TEMP2,DATA_SOIL_WET2,DATA_SOIL_TEMP3,DATA_SOIL_WET3,DATA_SOIL_DDL,DATA_SOIL_DDL2,DATA_SOIL_DDL3,DATA_DATE_TIME,DATA_GATHER_TYPE,STATION_ID,
DEVICE_ID,STATION_CODE,DEVICE_CODE,CORP_ID,STATION_NAME,DEVICE_NAME,TRANS_DATE,TENANT_ID,RE_VISION,CREATED_BY,CREATE_TIME,UPDATED_BY,IS_DEL,UPDATED_TIME,DEPLOY_ID,DATA_SOIL_PH,
DEVICE_ID,STATION_CODE,DEPLOY_CODE,CORP_ID,STATION_NAME,DEVICE_NAME,TRANS_DATE,TENANT_ID,RE_VISION,CREATED_BY,CREATE_TIME,UPDATED_BY,IS_DEL,UPDATED_TIME,DEPLOY_ID,DATA_SOIL_PH,
DATA_SOIL_NION,DATA_SOIL_PION,DATA_SOIL_KION,DATA_SOIL_NION2,DATA_SOIL_PION2,DATA_SOIL_KION2,DATA_SOIL_NION3,DATA_SOIL_PION3,DATA_SOIL_KION3,DATA_SOIL_NION4,DATA_SOIL_PION4,DATA_SOIL_KION4,
DATA_SOIL_NHION,DATA_SOIL_NOION,DATA_SOIL_CUION,DATA_SOIL_PBION,DATA_SOIL_CDION,
DATA_WATER_NTU,DATA_WATER_DO,DATA_WATER_TEMP,DATA_WATER_PH,DATA_WATER_DDL
@ -89,11 +89,11 @@
<if test="query.dataDateTime != null">
and DATE_FORMAT(DATA_DATE_TIME, '%Y-%m-%d') = DATE_FORMAT(#{query.dataDateTime},'%Y-%m-%d')
</if>
<if test="query.deviceCode != null">
and DEVICE_CODE = #{query.deviceCode}
<if test="query.deployCode != null">
and DEPLOY_CODE = #{query.deployCode}
</if>
<if test="deviceList!=null and deviceList.size()>0">
and DEVICE_CODE IN
and DEPLOY_CODE IN
<foreach collection="deviceList" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
@ -102,7 +102,7 @@
</select>
<select id="listByParams" resultMap="baseResultMap">
select <include refid="baseSql"/> from surv_hisdata_soil where DEVICE_CODE = #{deployCode} AND DATA_DATE_TIME &gt;= #{startDateTime} AND DATA_DATE_TIME &lt;= #{endDateTime} order by DATA_DATE_TIME DESC
select <include refid="baseSql"/> from surv_hisdata_soil where DEPLOY_CODE = #{deployCode} AND DATA_DATE_TIME &gt;= #{startDateTime} AND DATA_DATE_TIME &lt;= #{endDateTime} order by DATA_DATE_TIME DESC
</select>
@ -154,7 +154,7 @@
<if test="tenantId != null and tenantId != ''">
AND TENANT_ID = #{tenantId}
</if>
AND DEVICE_CODE IN
AND DEPLOY_CODE IN
<foreach item="id" collection="soilDevice" open="(" separator="," close=")">
#{id}
</foreach>

View File

@ -43,7 +43,7 @@
</sql>
<select id="getDeviceList" resultType="org.jeecg.common.entity.SurvDeviceDeploy">
select ID,DEPLOY_TYPE,DEPLOY_CODE,DEPLOY_PIC,DEVICE_URL,DEVICE_CODE,DEPLOY_DES,SORT_NO,DEVICE_IOT_URL,DEVICE_REVERSE_IOT_URL,MAP_ICON,DEVICE_LONGLAT,DEPLOY_SECONDARY_TYPE,#{ysToken} as ysToken from surv_device_deploy where IS_DEL = 0 AND STATION_CODE = #{STATION_CODE}
select ID,DEPLOY_TYPE,DEPLOY_CODE,DEPLOY_PIC,DEVICE_URL,DEPLOY_CODE,DEPLOY_DES,SORT_NO,DEVICE_IOT_URL,DEVICE_REVERSE_IOT_URL,MAP_ICON,DEVICE_LONGLAT,DEPLOY_SECONDARY_TYPE,#{ysToken} as ysToken from surv_device_deploy where IS_DEL = 0 AND STATION_CODE = #{STATION_CODE}
<if test="deviceType != null and deviceType != ''">
AND DEPLOY_TYPE = #{deviceType}
</if>

View File

@ -18,7 +18,7 @@
<result property="stationId" column="STATION_ID" jdbcType="VARCHAR"/>
<result property="deviceId" column="DEVICE_ID" jdbcType="VARCHAR"/>
<result property="stationCode" column="STATION_CODE" jdbcType="VARCHAR"/>
<result property="deviceCode" column="DEVICE_CODE" jdbcType="VARCHAR"/>
<result property="deployCode" column="DEPLOY_CODE" jdbcType="VARCHAR"/>
<result property="corpId" column="CORP_ID" jdbcType="VARCHAR"/>
<result property="stationName" column="STATION_NAME" jdbcType="VARCHAR"/>
<result property="deviceName" column="DEVICE_NAME" jdbcType="VARCHAR"/>
@ -30,7 +30,7 @@
<result property="isDel" column="IS_DEL" jdbcType="INTEGER"/>
<result property="updatedTime" column="UPDATED_TIME"/>
<result property="deployId" column="DEPLOY_ID"/>
<association property="stationName" column="{deplyCode = DEVICE_CODE}" javaType="java.lang.String" select="org.jeecg.modules.appmana.mapper.SurvDeviceDeployMapper.getStationNameByDeployCode"/>
<association property="stationName" column="{deplyCode = DEPLOY_CODE}" javaType="java.lang.String" select="org.jeecg.modules.appmana.mapper.SurvDeviceDeployMapper.getStationNameByDeployCode"/>
</resultMap>
<resultMap id="simpleResultMap" type="org.jeecg.common.vo.SurvTransdataAirVo">
@ -48,11 +48,11 @@
</resultMap>
<sql id="baseSql">
ID,DATA_AIR_TEMP,DATA_AIR_WET,DATA_AIR_PRESS,DATA_RAIN_FALL,DATA_WIND_SPEED,DATA_WIND_DIRECTION,DATA_SUN_FALLOUT,DATA_SUN_TOTAL,DATA_RAIN_TOTAL,DATA_DATE_TIME,DATA_GATHER_TYPE,STATION_ID,DEVICE_ID,STATION_CODE,DEVICE_CODE,CORP_ID,STATION_NAME,DEVICE_NAME,TENANT_ID,RE_VISION,CREATED_BY,CREATE_TIME,UPDATED_BY,IS_DEL,UPDATED_TIME,DEPLOY_ID
ID,DATA_AIR_TEMP,DATA_AIR_WET,DATA_AIR_PRESS,DATA_RAIN_FALL,DATA_WIND_SPEED,DATA_WIND_DIRECTION,DATA_SUN_FALLOUT,DATA_SUN_TOTAL,DATA_RAIN_TOTAL,DATA_DATE_TIME,DATA_GATHER_TYPE,STATION_ID,DEVICE_ID,STATION_CODE,DEPLOY_CODE,CORP_ID,STATION_NAME,DEVICE_NAME,TENANT_ID,RE_VISION,CREATED_BY,CREATE_TIME,UPDATED_BY,IS_DEL,UPDATED_TIME,DEPLOY_ID
</sql>
<select id="getNewestData" resultMap="simpleResultMap">
select * from surv_transdata_air where DEVICE_CODE = #{deployCode} order by DATA_DATE_TIME desc limit 1
select * from surv_transdata_air where DEPLOY_CODE = #{deployCode} order by DATA_DATE_TIME desc limit 1
</select>
<select id="pages" resultMap="baseResultMap">
@ -60,11 +60,11 @@
<if test="query.dataDateTime != null">
and DATE_FORMAT(DATA_DATE_TIME, '%Y-%m-%d') = DATE_FORMAT(#{query.dataDateTime},'%Y-%m-%d')
</if>
<if test="query.deviceCode != null">
and DEVICE_CODE = #{query.deviceCode}
<if test="query.deployCode != null">
and DEPLOY_CODE = #{query.deployCode}
</if>
<if test="deviceList!=null and deviceList.size()>0">
and DEVICE_CODE IN
and DEPLOY_CODE IN
<foreach collection="deviceList" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>

View File

@ -15,7 +15,7 @@
<result property="stationId" column="STATION_ID" jdbcType="VARCHAR"/>
<result property="deviceId" column="DEVICE_ID" jdbcType="VARCHAR"/>
<result property="stationCode" column="STATION_CODE" jdbcType="VARCHAR"/>
<result property="deviceCode" column="DEVICE_CODE" jdbcType="VARCHAR"/>
<result property="deployCode" column="DEPLOY_CODE" jdbcType="VARCHAR"/>
<result property="corpId" column="CORP_ID" jdbcType="VARCHAR"/>
<!-- <result property="stationName" column="STATION_NAME" jdbcType="VARCHAR"/>-->
<result property="deviceName" column="DEVICE_NAME" jdbcType="VARCHAR"/>
@ -26,7 +26,7 @@
<result property="updatedBy" column="UPDATED_BY" jdbcType="VARCHAR"/>
<result property="isDel" column="IS_DEL" jdbcType="INTEGER"/>
<result property="updatedTime" column="UPDATED_TIME"/>
<association property="stationName" column="{deplyCode = DEVICE_CODE}" javaType="java.lang.String" select="org.jeecg.modules.appmana.mapper.SurvDeviceDeployMapper.getStationNameByDeployCode"/>
<association property="stationName" column="{deplyCode = DEPLOY_CODE}" javaType="java.lang.String" select="org.jeecg.modules.appmana.mapper.SurvDeviceDeployMapper.getStationNameByDeployCode"/>
</resultMap>
@ -37,19 +37,19 @@
<result property="dataWaterNh" column="DATA_WATER_NH" jdbcType="VARCHAR"/>
<!-- <result property="dataWaterNo" column="DATA_WATER_NO" jdbcType="VARCHAR"/>-->
<!-- <result property="dataDateTime" column="DATA_DATE_TIME" />-->
<!-- <result property="deviceCode" column="DEVICE_CODE" />-->
<!-- <result property="deployCode" column="DEPLOY_CODE" />-->
</resultMap>
<sql id="baseSql">
ID,DATA_ID,DATA_WATER_TP,DATA_WATER_TN,DATA_WATER_NO,DATA_WATER_NH,DATA_WATER_COD,DATA_DATE_TIME,DATA_GATHER_TYPE,STATION_ID,DEVICE_ID,STATION_CODE,DEVICE_CODE,CORP_ID,STATION_NAME,DEVICE_NAME,TENANT_ID,RE_VISION,CREATED_BY,CREATE_TIME,UPDATED_BY,IS_DEL,UPDATED_TIME
ID,DATA_ID,DATA_WATER_TP,DATA_WATER_TN,DATA_WATER_NO,DATA_WATER_NH,DATA_WATER_COD,DATA_DATE_TIME,DATA_GATHER_TYPE,STATION_ID,DEVICE_ID,STATION_CODE,DEPLOY_CODE,CORP_ID,STATION_NAME,DEVICE_NAME,TENANT_ID,RE_VISION,CREATED_BY,CREATE_TIME,UPDATED_BY,IS_DEL,UPDATED_TIME
</sql>
<select id="getNewestData" resultMap="simpleResultMap">
select * from surv_transdata_livestockwater where DATA_WATER_TP is not null AND length(DATA_WATER_TP) &lt; 10 AND length(DATA_WATER_TN) &lt; 10 AND length(DATA_WATER_NH) &lt; 10 AND DEVICE_CODE = #{deployCode} order by DATA_DATE_TIME desc limit 1
select * from surv_transdata_livestockwater where DATA_WATER_TP is not null AND length(DATA_WATER_TP) &lt; 10 AND length(DATA_WATER_TN) &lt; 10 AND length(DATA_WATER_NH) &lt; 10 AND DEPLOY_CODE = #{deployCode} order by DATA_DATE_TIME desc limit 1
</select>
<select id="getNewestDataWithStation" resultMap="simpleResultMap">
select * from surv_transdata_livestockwater where DEVICE_CODE IN
select * from surv_transdata_livestockwater where DEPLOY_CODE IN
<foreach collection="liveList" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
@ -62,11 +62,11 @@
<if test="query.dataDateTime != null">
and DATE_FORMAT(DATA_DATE_TIME, '%Y-%m-%d') = DATE_FORMAT(#{query.dataDateTime},'%Y-%m-%d')
</if>
<if test="query.deviceCode != null">
and DEVICE_CODE = #{query.deviceCode}
<if test="query.deployCode != null">
and DEPLOY_CODE = #{query.deployCode}
</if>
<if test="deviceList!=null and deviceList.size()>0">
and DEVICE_CODE IN
and DEPLOY_CODE IN
<foreach collection="deviceList" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>

View File

@ -26,7 +26,7 @@
<result property="stationId" column="STATION_ID" jdbcType="VARCHAR"/>
<result property="deviceId" column="DEVICE_ID" jdbcType="VARCHAR"/>
<result property="stationCode" column="STATION_CODE" jdbcType="VARCHAR"/>
<result property="deviceCode" column="DEVICE_CODE" jdbcType="VARCHAR"/>
<result property="deployCode" column="DEPLOY_CODE" jdbcType="VARCHAR"/>
<result property="corpId" column="CORP_ID" jdbcType="VARCHAR"/>
<result property="deviceName" column="DEVICE_NAME" jdbcType="VARCHAR"/>
<result property="tenantId" column="TENANT_ID" jdbcType="VARCHAR"/>
@ -36,7 +36,7 @@
<result property="updatedBy" column="UPDATED_BY" jdbcType="VARCHAR"/>
<result property="isDel" column="IS_DEL" jdbcType="INTEGER"/>
<result property="updatedTime" column="UPDATED_TIME"/>
<association property="stationName" column="{deplyCode = DEVICE_CODE}" javaType="java.lang.String" select="org.jeecg.modules.appmana.mapper.SurvDeviceDeployMapper.getStationNameByDeployCode"/>
<association property="stationName" column="{deplyCode = DEPLOY_CODE}" javaType="java.lang.String" select="org.jeecg.modules.appmana.mapper.SurvDeviceDeployMapper.getStationNameByDeployCode"/>
</resultMap>
<resultMap id="simpleResultMap" type="org.jeecg.common.vo.SurvTransdataOrientwaterVo">
@ -47,18 +47,18 @@
<!-- <result property="dataWaterNh" column="DATA_WATER_NH" jdbcType="VARCHAR"/>-->
<result property="dataWaterNo" column="DATA_WATER_NO" jdbcType="VARCHAR"/>
<!-- <result property="dataDateTime" column="DATA_DATE_TIME" />-->
<!-- <result property="deviceCode" column="DEVICE_CODE" />-->
<!-- <result property="deployCode" column="DEPLOY_CODE" />-->
</resultMap>
<sql id="baseSql" >
ID,DATA_ID,DATA_WATER_TP,DATA_WATER_TN,DATA_WATER_NH,DATA_WATER_COD,DATA_WATER_NO,DATA_WATER_TP_SY,DATA_WATER_TP_LD,DATA_WATER_TN_SY,DATA_WATER_TN_LD,FLUID_LEVEL,FIRST_VALVE_STATUS,SECOND_VALVE_STATUS,CRASH_STOP_STATUS,WATER_PUMP_STATUS,MAIN_SIDE_STATUS,DATA_DATE_TIME,DATA_GATHER_TYPE,STATION_ID,DEVICE_ID,STATION_CODE,DEVICE_CODE,CORP_ID,STATION_NAME,DEVICE_NAME,TENANT_ID,RE_VISION,CREATED_BY,CREATE_TIME,UPDATED_BY,IS_DEL,UPDATED_TIME
ID,DATA_ID,DATA_WATER_TP,DATA_WATER_TN,DATA_WATER_NH,DATA_WATER_COD,DATA_WATER_NO,DATA_WATER_TP_SY,DATA_WATER_TP_LD,DATA_WATER_TN_SY,DATA_WATER_TN_LD,FLUID_LEVEL,FIRST_VALVE_STATUS,SECOND_VALVE_STATUS,CRASH_STOP_STATUS,WATER_PUMP_STATUS,MAIN_SIDE_STATUS,DATA_DATE_TIME,DATA_GATHER_TYPE,STATION_ID,DEVICE_ID,STATION_CODE,DEPLOY_CODE,CORP_ID,STATION_NAME,DEVICE_NAME,TENANT_ID,RE_VISION,CREATED_BY,CREATE_TIME,UPDATED_BY,IS_DEL,UPDATED_TIME
</sql>
<select id="getNewestData" resultMap="simpleResultMap">
select * from surv_transdata_orientwater where DATA_WATER_TP is not null AND length(DATA_WATER_TP) &lt; 10 AND length(DATA_WATER_TN) &lt; 10 AND DEVICE_CODE = #{deployCode} order by DATA_DATE_TIME desc limit 1
select * from surv_transdata_orientwater where DATA_WATER_TP is not null AND length(DATA_WATER_TP) &lt; 10 AND length(DATA_WATER_TN) &lt; 10 AND DEPLOY_CODE = #{deployCode} order by DATA_DATE_TIME desc limit 1
</select>
<select id="getNewestDataWithStation" resultMap="simpleResultMap">
select * from surv_transdata_orientwater where DEVICE_CODE IN
select * from surv_transdata_orientwater where DEPLOY_CODE IN
<foreach collection="orientList" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
@ -70,11 +70,11 @@
<if test="query.dataDateTime != null">
and DATE_FORMAT(DATA_DATE_TIME, '%Y-%m-%d') = DATE_FORMAT(#{query.dataDateTime},'%Y-%m-%d')
</if>
<if test="query.deviceCode != null">
and DEVICE_CODE = #{query.deviceCode}
<if test="query.deployCode != null">
and DEPLOY_CODE = #{query.deployCode}
</if>
<if test="deviceList!=null and deviceList.size()>0">
and DEVICE_CODE IN
and DEPLOY_CODE IN
<foreach collection="deviceList" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>

View File

@ -49,7 +49,7 @@
<result property="stationId" column="STATION_ID" jdbcType="VARCHAR"/>
<result property="deviceId" column="DEVICE_ID" jdbcType="VARCHAR"/>
<result property="stationCode" column="STATION_CODE" jdbcType="VARCHAR"/>
<result property="deviceCode" column="DEVICE_CODE" jdbcType="VARCHAR"/>
<result property="deployCode" column="DEPLOY_CODE" jdbcType="VARCHAR"/>
<result property="corpId" column="CORP_ID" jdbcType="VARCHAR"/>
<result property="stationName" column="STATION_NAME" jdbcType="VARCHAR"/>
<result property="deviceName" column="DEVICE_NAME" jdbcType="VARCHAR"/>
@ -61,7 +61,7 @@
<result property="isDel" column="IS_DEL" jdbcType="INTEGER"/>
<result property="updatedTime" column="UPDATED_TIME"/>
<result property="deployId" column="DEPLOY_ID"/>
<association property="stationName" column="{deplyCode = DEVICE_CODE}" javaType="java.lang.String" select="org.jeecg.modules.appmana.mapper.SurvDeviceDeployMapper.getStationNameByDeployCode"/>
<association property="stationName" column="{deplyCode = DEPLOY_CODE}" javaType="java.lang.String" select="org.jeecg.modules.appmana.mapper.SurvDeviceDeployMapper.getStationNameByDeployCode"/>
</resultMap>
<resultMap id="simpleResultMap" type="org.jeecg.common.vo.SurvTransdataSoilVo">
@ -112,14 +112,14 @@
<sql id="baseSql">
ID,DATA_SOIL_TEMP,DATA_SOIL_WET,DATA_SOIL_SALT,DATA_DATE_TIME,DATA_SOIL_TEMP2,DATA_SOIL_WET2,DATA_SOIL_TEMP3,DATA_SOIL_WET3,DATA_SOIL_DDL,DATA_SOIL_DDL2,DATA_SOIL_DDL3,DATA_GATHER_TYPE,STATION_ID,
DEVICE_ID,STATION_CODE,DEVICE_CODE,CORP_ID,STATION_NAME,DEVICE_NAME,TENANT_ID,RE_VISION,CREATED_BY,CREATE_TIME,UPDATED_BY,IS_DEL,UPDATED_TIME,DEPLOY_ID,DATA_SOIL_PH,
DEVICE_ID,STATION_CODE,DEPLOY_CODE,CORP_ID,STATION_NAME,DEVICE_NAME,TENANT_ID,RE_VISION,CREATED_BY,CREATE_TIME,UPDATED_BY,IS_DEL,UPDATED_TIME,DEPLOY_ID,DATA_SOIL_PH,
DATA_SOIL_NION,DATA_SOIL_PION,DATA_SOIL_KION,DATA_SOIL_NION2,DATA_SOIL_PION2,DATA_SOIL_KION2,DATA_SOIL_NION3,DATA_SOIL_PION3,DATA_SOIL_KION3,DATA_SOIL_NION4,DATA_SOIL_PION4,DATA_SOIL_KION4,
DATA_SOIL_NHION,DATA_SOIL_NOION,DATA_SOIL_CUION,DATA_SOIL_PBION,DATA_SOIL_CDION,
DATA_WATER_NTU,DATA_WATER_DO,DATA_WATER_TEMP,DATA_WATER_PH,DATA_WATER_DDL
</sql>
<select id="getNewestData" resultMap="simpleResultMap">
select <include refid="baseSql"/> from surv_transdata_soil where DEVICE_CODE = #{deployCode} order by DATA_DATE_TIME desc limit 1
select <include refid="baseSql"/> from surv_transdata_soil where DEPLOY_CODE = #{deployCode} order by DATA_DATE_TIME desc limit 1
</select>
<select id="getMonthSummry" resultType="org.jeecg.common.vo.DataTrans">
@ -135,11 +135,11 @@
<if test="query.dataDateTime != null">
and DATE_FORMAT(DATA_DATE_TIME, '%Y-%m-%d') = DATE_FORMAT(#{query.dataDateTime},'%Y-%m-%d')
</if>
<if test="query.deviceCode != null">
and DEVICE_CODE = #{query.deviceCode}
<if test="query.deployCode != null">
and DEPLOY_CODE = #{query.deployCode}
</if>
<if test="deviceList!=null and deviceList.size()>0">
and DEVICE_CODE IN
and DEPLOY_CODE IN
<foreach collection="deviceList" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>

View File

@ -72,7 +72,12 @@ public class IotCommonP3ServiceImpl {
tableName = PollutionConstants.TABLE_PEST;
}else if(PollutionConstants.WATER_QULITY.equals(pollutionEnum.getType())){
tableName = PollutionConstants.TABLE_SOIL;
}else if(PollutionConstants.WATER_ORIENT.equals(deploy.getDeployType())){
tableName = PollutionConstants.TABLE_ORIENT;
}else if(PollutionConstants.WATER_LIVE.equals(deploy.getDeployType())){
tableName = PollutionConstants.TABLE_LIVE;
}
log.error("_----"+tableName);
if (StringUtils.isBlank(tableName)) {
return results;
}
@ -254,9 +259,10 @@ public class IotCommonP3ServiceImpl {
if(trans!=null && !trans.isEmpty()){
for (CommonDataTrans tran : trans) {
SurvDeviceDeploy deploy = deployMap.get(tran.getDeployId());
String stationCode = stationMap.get(deploy.getStationCode());
tran.setStationName(StringUtils.isNotBlank(stationCode)?stationMap.get(stationCode):"站点");
String stationCode = deploy.getStationCode();
tran.setStationName(StringUtils.isNotBlank(stationCode)?stationMap.get(stationCode):"");
tran.setDeployRemark(deploy!=null?deploy.getDeployDes():"设备");
tran.setStationCode(stationCode);
results.add(tran);
}
}

View File

@ -37,7 +37,7 @@ public class SurvTransdataAirServiceImpl extends ServiceImpl<SurvTransdataAirMap
public SurvTransdataAir getOneByDeviceCode(String deployCode) {
QueryWrapper<SurvTransdataAir> queryWrapper = new QueryWrapper<SurvTransdataAir>();
queryWrapper.eq("DEVICE_CODE", deployCode).last("limit 1");
queryWrapper.eq("DEPLOY_CODE", deployCode).last("limit 1");
return getOne(queryWrapper);
}
}

View File

@ -34,7 +34,7 @@ public class SurvTransdataLivestockwaterServiceImpl extends ServiceImpl<SurvTran
survTransdataLivestockwaterVo.setDataWaterTp("1.0050");
survTransdataLivestockwaterVo.setDataWaterCod("499.1000");
survTransdataLivestockwaterVo.setDataDateTime(LocalDateTime.now());
survTransdataLivestockwaterVo.setDeviceCode(deployCode);
survTransdataLivestockwaterVo.setDeployCode(deployCode);
}
return survTransdataLivestockwaterVo;
}
@ -49,7 +49,7 @@ public class SurvTransdataLivestockwaterServiceImpl extends ServiceImpl<SurvTran
survTransdataLivestockwaterVo.setDataWaterTp("1.0050");
survTransdataLivestockwaterVo.setDataWaterCod("499.1000");
survTransdataLivestockwaterVo.setDataDateTime(LocalDateTime.now());
survTransdataLivestockwaterVo.setDeviceCode(liveList.get(0));
survTransdataLivestockwaterVo.setDeployCode(liveList.get(0));
}
return survTransdataLivestockwaterVo;
}
@ -62,7 +62,7 @@ public class SurvTransdataLivestockwaterServiceImpl extends ServiceImpl<SurvTran
@Override
public SurvTransdataLivestockwater getOneByDeviceCode(String deployCode) {
QueryWrapper<SurvTransdataLivestockwater> queryWrapper = new QueryWrapper<SurvTransdataLivestockwater>();
queryWrapper.eq("DEVICE_CODE",deployCode).orderByDesc("DATA_DATE_TIME").last("limit 1");
queryWrapper.eq("DEPLOY_CODE",deployCode).orderByDesc("DATA_DATE_TIME").last("limit 1");
return getOne(queryWrapper);
}
}

View File

@ -34,7 +34,7 @@ public class SurvTransdataOrientwaterServiceImpl extends ServiceImpl<SurvTransda
survTransdataOrientwaterVo.setDataWaterTp("1.0061");
survTransdataOrientwaterVo.setDataWaterTn("2.0000");
survTransdataOrientwaterVo.setDataDateTime(LocalDateTime.now());
survTransdataOrientwaterVo.setDeviceCode(deployCode);
survTransdataOrientwaterVo.setDeployCode(deployCode);
}
return survTransdataOrientwaterVo;
}
@ -49,7 +49,7 @@ public class SurvTransdataOrientwaterServiceImpl extends ServiceImpl<SurvTransda
survTransdataOrientwaterVo.setDataWaterTp("1.0061");
survTransdataOrientwaterVo.setDataWaterTn("2.0000");
survTransdataOrientwaterVo.setDataDateTime(LocalDateTime.now());
survTransdataOrientwaterVo.setDeviceCode(orientList.get(0));
survTransdataOrientwaterVo.setDeployCode(orientList.get(0));
}
return survTransdataOrientwaterVo;
}
@ -62,7 +62,7 @@ public class SurvTransdataOrientwaterServiceImpl extends ServiceImpl<SurvTransda
@Override
public SurvTransdataOrientwater getOneByDeviceCode(String deployCode) {
QueryWrapper<SurvTransdataOrientwater> queryWrapper = new QueryWrapper<SurvTransdataOrientwater>();
queryWrapper.eq("DEVICE_CODE",deployCode).orderByDesc("DATA_DATE_TIME").last("limit 1");
queryWrapper.eq("DEPLOY_CODE",deployCode).orderByDesc("DATA_DATE_TIME").last("limit 1");
return getOne(queryWrapper);
}
}

View File

@ -37,7 +37,7 @@ public class SurvTransdataSoilServiceImpl extends ServiceImpl<SurvTransdataSoilM
public SurvTransdataSoil getOneByDeviceCode(String deployCode) {
QueryWrapper<SurvTransdataSoil> queryWrapper = new QueryWrapper<SurvTransdataSoil>();
queryWrapper.eq("DEVICE_CODE", deployCode).last("limit 1");
queryWrapper.eq("DEPLOY_CODE", deployCode).last("limit 1");
return getOne(queryWrapper);
}
}

View File

@ -12,7 +12,7 @@
<result property="dataSunFallout" column="DATA_SUN_FALLOUT" jdbcType="VARCHAR"/>
<result property="dataSunTotal" column="DATA_SUN_TOTAL" jdbcType="VARCHAR"/>
<result property="dataRainTotal" column="DATA_RAIN_TOTAL" jdbcType="VARCHAR"/>
<result property="deviceCode" column="DEVICE_CODE" jdbcType="VARCHAR"/>
<result property="deployCode" column="DEPLOY_CODE" jdbcType="VARCHAR"/>
<result property="dataDateTime" column="DATA_DATE_TIME"/>
<result property="deployId" column="DEPLOY_ID"/>
</resultMap>
@ -30,7 +30,7 @@
and DATE_FORMAT(DATA_DATE_TIME, '%Y') = #{yearStr}
</if>
<if test="airList!=null">
and DEVICE_CODE IN
and DEPLOY_CODE IN
<foreach collection="airList" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
@ -41,7 +41,7 @@
</select>
<select id="getAllNewestData" resultMap="baseResultVoMap">
select * from surv_hisdata_air where DEVICE_CODE IN
select * from surv_hisdata_air where DEPLOY_CODE IN
<foreach collection="airList" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
@ -49,7 +49,7 @@
</select>
<select id="getResentData" resultMap="baseResultVoMap">
select * from surv_hisdata_air where DEVICE_CODE IN
select * from surv_hisdata_air where DEPLOY_CODE IN
<foreach collection="airList" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
@ -57,14 +57,14 @@
</select>
<select id="getHisDataCount" resultType="java.lang.Integer">
select count(1) from surv_hisdata_air where DEVICE_CODE IN
select count(1) from surv_hisdata_air where DEPLOY_CODE IN
<foreach collection="airList" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</select>
<select id="getPageResentData" resultMap="baseResultVoMap">
select * from surv_hisdata_air where DEVICE_CODE IN
select * from surv_hisdata_air where DEPLOY_CODE IN
<foreach collection="airList" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>

View File

@ -9,7 +9,7 @@
<result property="dataWaterNh" column="DATA_WATER_NH" jdbcType="VARCHAR"/>
<result property="dataWaterCod" column="DATA_WATER_COD" jdbcType="VARCHAR"/>
<result property="dataDateTime" column="DATA_DATE_TIME"/>
<result property="deviceCode" column="DEVICE_CODE" jdbcType="VARCHAR"/>
<result property="deployCode" column="DEPLOY_CODE" jdbcType="VARCHAR"/>
</resultMap>
<select id="getMonthSummry" resultType="org.jeecg.common.vo.LiveDataTrans">
@ -24,7 +24,7 @@
and DATE_FORMAT(DATA_DATE_TIME, '%Y') = #{yearStr}
</if>
<if test="liveList!=null">
and DEVICE_CODE IN
and DEPLOY_CODE IN
<foreach collection="liveList" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
@ -36,7 +36,7 @@
</select>
<select id="getResentData" resultMap="baseResultVoMap">
select * from surv_hisdata_livestockwater where DATA_WATER_TP is not null AND length(DATA_WATER_TP) &lt; 10 AND length(DATA_WATER_TN) &lt; 10 AND length(DATA_WATER_NH) &lt; 10 AND DEVICE_CODE IN
select * from surv_hisdata_livestockwater where DATA_WATER_TP is not null AND length(DATA_WATER_TP) &lt; 10 AND length(DATA_WATER_TN) &lt; 10 AND length(DATA_WATER_NH) &lt; 10 AND DEPLOY_CODE IN
<foreach collection="liveList" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
@ -44,7 +44,7 @@
</select>
<select id="getAllNewestData" resultMap="baseResultVoMap">
select * from surv_hisdata_livestockwater where DATA_WATER_TP is not null AND length(DATA_WATER_TP) &lt; 10 AND length(DATA_WATER_TN) &lt; 10 AND length(DATA_WATER_NH) &lt; 10 AND DEVICE_CODE IN
select * from surv_hisdata_livestockwater where DATA_WATER_TP is not null AND length(DATA_WATER_TP) &lt; 10 AND length(DATA_WATER_TN) &lt; 10 AND length(DATA_WATER_NH) &lt; 10 AND DEPLOY_CODE IN
<foreach collection="liveList" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
@ -52,14 +52,14 @@
</select>
<select id="getHisDataCount" resultType="java.lang.Integer">
select count(1) from surv_hisdata_livestockwater where DATA_WATER_TP is not null AND length(DATA_WATER_TP) &lt; 10 AND length(DATA_WATER_TN) &lt; 10 AND length(DATA_WATER_NH) &lt; 10 AND DEVICE_CODE IN
select count(1) from surv_hisdata_livestockwater where DATA_WATER_TP is not null AND length(DATA_WATER_TP) &lt; 10 AND length(DATA_WATER_TN) &lt; 10 AND length(DATA_WATER_NH) &lt; 10 AND DEPLOY_CODE IN
<foreach collection="liveList" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</select>
<select id="getPageResentData" resultMap="baseResultVoMap">
select * from surv_hisdata_livestockwater where DATA_WATER_TP is not null AND length(DATA_WATER_TP) &lt; 10 AND length(DATA_WATER_TN) &lt; 10 AND length(DATA_WATER_NH) &lt; 10 AND DEVICE_CODE IN
select * from surv_hisdata_livestockwater where DATA_WATER_TP is not null AND length(DATA_WATER_TP) &lt; 10 AND length(DATA_WATER_TN) &lt; 10 AND length(DATA_WATER_NH) &lt; 10 AND DEPLOY_CODE IN
<foreach collection="liveList" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>

View File

@ -8,7 +8,7 @@
<result property="dataWaterTn" column="DATA_WATER_TN" jdbcType="VARCHAR"/>
<result property="dataWaterNo" column="DATA_WATER_NO" jdbcType="VARCHAR"/>
<result property="dataDateTime" column="DATA_DATE_TIME"/>
<result property="deviceCode" column="DEVICE_CODE" jdbcType="VARCHAR"/>
<result property="deployCode" column="DEPLOY_CODE" jdbcType="VARCHAR"/>
</resultMap>
<select id="getMonthSummry" resultType="org.jeecg.common.vo.OrientDataTrans">
@ -22,7 +22,7 @@
and DATE_FORMAT(DATA_DATE_TIME, '%Y') = #{yearStr}
</if>
<if test="orientList!=null">
and DEVICE_CODE IN
and DEPLOY_CODE IN
<foreach collection="orientList" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
@ -33,7 +33,7 @@
</select>
<select id="getResentData" resultMap="baseResultVoMap">
select * from surv_hisdata_orientwater where DATA_WATER_TP is not null AND length(DATA_WATER_TP) &lt; 10 AND length(DATA_WATER_TN) &lt; 10 AND DEVICE_CODE IN
select * from surv_hisdata_orientwater where DATA_WATER_TP is not null AND length(DATA_WATER_TP) &lt; 10 AND length(DATA_WATER_TN) &lt; 10 AND DEPLOY_CODE IN
<foreach collection="orientList" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
@ -41,7 +41,7 @@
</select>
<select id="getAllNewestData" resultMap="baseResultVoMap">
select * from surv_hisdata_orientwater where DATA_WATER_TP is not null AND length(DATA_WATER_TP) &lt; 10 AND length(DATA_WATER_TN) &lt; 10 AND DEVICE_CODE IN
select * from surv_hisdata_orientwater where DATA_WATER_TP is not null AND length(DATA_WATER_TP) &lt; 10 AND length(DATA_WATER_TN) &lt; 10 AND DEPLOY_CODE IN
<foreach collection="orientList" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
@ -49,14 +49,14 @@
</select>
<select id="getHisDataCount" resultType="java.lang.Integer">
select count(1) from surv_hisdata_orientwater where DATA_WATER_TP is not null AND length(DATA_WATER_TP) &lt; 10 AND length(DATA_WATER_TN) &lt; 10 AND DEVICE_CODE IN
select count(1) from surv_hisdata_orientwater where DATA_WATER_TP is not null AND length(DATA_WATER_TP) &lt; 10 AND length(DATA_WATER_TN) &lt; 10 AND DEPLOY_CODE IN
<foreach collection="orientList" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</select>
<select id="getPageResentData" resultMap="baseResultVoMap">
select * from surv_hisdata_orientwater where DATA_WATER_TP is not null AND length(DATA_WATER_TP) &lt; 10 AND length(DATA_WATER_TN) &lt; 10 AND DEVICE_CODE IN
select * from surv_hisdata_orientwater where DATA_WATER_TP is not null AND length(DATA_WATER_TP) &lt; 10 AND length(DATA_WATER_TN) &lt; 10 AND DEPLOY_CODE IN
<foreach collection="orientList" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>

View File

@ -47,13 +47,13 @@
<result property="dataWaterDo" column="DATA_WATER_DO" jdbcType="VARCHAR"/>
<result property="dataDateTime" column="DATA_DATE_TIME"/>
<result property="deviceCode" column="DEVICE_CODE" jdbcType="VARCHAR"/>
<result property="deployCode" column="DEPLOY_CODE" jdbcType="VARCHAR"/>
<result property="deployId" column="DEPLOY_ID"/>
</resultMap>
<sql id="baseSql">
ID,DATA_SOIL_TEMP,DATA_SOIL_WET,DATA_SOIL_SALT,DATA_SOIL_TEMP2,DATA_SOIL_WET2,DATA_SOIL_TEMP3,DATA_SOIL_WET3,DATA_SOIL_DDL,DATA_SOIL_DDL2,DATA_SOIL_DDL3,DATA_DATE_TIME,DATA_GATHER_TYPE,STATION_ID,
DEVICE_ID,STATION_CODE,DEVICE_CODE,CORP_ID,STATION_NAME,DEVICE_NAME,TRANS_DATE,TENANT_ID,RE_VISION,CREATED_BY,CREATE_TIME,UPDATED_BY,IS_DEL,UPDATED_TIME,DEPLOY_ID,DATA_SOIL_PH,
DEVICE_ID,STATION_CODE,DEPLOY_CODE,CORP_ID,STATION_NAME,DEVICE_NAME,TRANS_DATE,TENANT_ID,RE_VISION,CREATED_BY,CREATE_TIME,UPDATED_BY,IS_DEL,UPDATED_TIME,DEPLOY_ID,DATA_SOIL_PH,
DATA_SOIL_NION,DATA_SOIL_PION,DATA_SOIL_KION,DATA_SOIL_NION2,DATA_SOIL_PION2,DATA_SOIL_KION2,DATA_SOIL_NION3,DATA_SOIL_PION3,DATA_SOIL_KION3,DATA_SOIL_NION4,DATA_SOIL_PION4,DATA_SOIL_KION4,
DATA_SOIL_NHION,DATA_SOIL_NOION,DATA_SOIL_CUION,DATA_SOIL_PBION,DATA_SOIL_CDION,
DATA_WATER_NTU,DATA_WATER_DO,DATA_WATER_TEMP,DATA_WATER_PH,DATA_WATER_DDL
@ -85,7 +85,7 @@
and DATE_FORMAT(DATA_DATE_TIME, '%Y') = #{yearStr}
</if>
<if test="soilList!=null">
and DEVICE_CODE IN
and DEPLOY_CODE IN
<foreach collection="soilList" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
@ -96,7 +96,7 @@
</select>
<select id="getAllNewestData" resultMap="baseResultVoMap">
select <include refid="baseSql"/> from surv_hisdata_soil where DEVICE_CODE IN
select <include refid="baseSql"/> from surv_hisdata_soil where DEPLOY_CODE IN
<foreach collection="soilList" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
@ -104,7 +104,7 @@
</select>
<select id="getResentData" resultMap="baseResultVoMap">
select <include refid="baseSql"/> from surv_hisdata_soil where DEVICE_CODE IN
select <include refid="baseSql"/> from surv_hisdata_soil where DEPLOY_CODE IN
<foreach collection="soilList" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
@ -112,14 +112,14 @@
</select>
<select id="getHisDataCount" resultType="java.lang.Integer">
select count(1) from surv_hisdata_soil where DEVICE_CODE IN
select count(1) from surv_hisdata_soil where DEPLOY_CODE IN
<foreach collection="soilList" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</select>
<select id="getPageResentData" resultMap="baseResultVoMap">
select <include refid="baseSql"/> from surv_hisdata_soil where DEVICE_CODE IN
select <include refid="baseSql"/> from surv_hisdata_soil where DEPLOY_CODE IN
<foreach collection="soilList" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>

View File

@ -13,12 +13,12 @@
<result property="dataRainTotal" column="DATA_RAIN_TOTAL" jdbcType="VARCHAR"/>
<result property="dataSunFallout" column="DATA_SUN_FALLOUT" jdbcType="VARCHAR"/>
<result property="dataDateTime" column="DATA_DATE_TIME" />
<result property="deviceCode" column="DEVICE_CODE" />
<result property="deployCode" column="DEPLOY_CODE" />
<result property="deployId" column="DEPLOY_ID"/>
</resultMap>
<select id="getNewestData" resultMap="simpleResultMap">
select * from surv_transdata_air where DEVICE_CODE = #{deployCode} order by DATA_DATE_TIME desc limit 1
select * from surv_transdata_air where DEPLOY_CODE = #{deployCode} order by DATA_DATE_TIME desc limit 1
</select>
<select id="getALlNewestData" resultMap="simpleResultMap">
@ -26,7 +26,7 @@
</select>
<select id="getNewestDataWithStation" resultMap="simpleResultMap">
select * from surv_transdata_air where DEVICE_CODE IN
select * from surv_transdata_air where DEPLOY_CODE IN
<foreach collection="airList" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
@ -34,11 +34,11 @@
</select>
<select id="getRecentDataByCode" resultMap="simpleResultMap">
select * from surv_transdata_air where DEVICE_CODE = #{deployCode} order by DATA_DATE_TIME desc limit 5
select * from surv_transdata_air where DEPLOY_CODE = #{deployCode} order by DATA_DATE_TIME desc limit 5
</select>
<select id="getAllNewestData" resultMap="simpleResultMap">
select * from surv_transdata_air where DEVICE_CODE IN
select * from surv_transdata_air where DEPLOY_CODE IN
<foreach collection="airList" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>

View File

@ -9,15 +9,15 @@
<result property="dataWaterNh" column="DATA_WATER_NH" jdbcType="VARCHAR"/>
<!-- <result property="dataWaterNo" column="DATA_WATER_NO" jdbcType="VARCHAR"/>-->
<result property="dataDateTime" column="DATA_DATE_TIME" />
<result property="deviceCode" column="DEVICE_CODE" />
<result property="deployCode" column="DEPLOY_CODE" />
</resultMap>
<select id="getNewestData" resultMap="simpleResultMap">
select * from surv_transdata_livestockwater where DATA_WATER_TP is not null AND length(DATA_WATER_TP) &lt; 10 AND length(DATA_WATER_TN) &lt; 10 AND length(DATA_WATER_NH) &lt; 10 AND DEVICE_CODE = #{deployCode} order by DATA_DATE_TIME desc limit 1
select * from surv_transdata_livestockwater where DATA_WATER_TP is not null AND length(DATA_WATER_TP) &lt; 10 AND length(DATA_WATER_TN) &lt; 10 AND length(DATA_WATER_NH) &lt; 10 AND DEPLOY_CODE = #{deployCode} order by DATA_DATE_TIME desc limit 1
</select>
<select id="getNewestDataWithStation" resultMap="simpleResultMap">
select * from surv_transdata_livestockwater where DATA_WATER_TP is not null AND length(DATA_WATER_TP) &lt; 10 AND length(DATA_WATER_TN) &lt; 10 AND length(DATA_WATER_NH) &lt; 10 AND DEVICE_CODE IN
select * from surv_transdata_livestockwater where DATA_WATER_TP is not null AND length(DATA_WATER_TP) &lt; 10 AND length(DATA_WATER_TN) &lt; 10 AND length(DATA_WATER_NH) &lt; 10 AND DEPLOY_CODE IN
<foreach collection="liveList" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
@ -25,11 +25,11 @@
</select>
<select id="getRecentDataByCode" resultMap="simpleResultMap">
select * from surv_transdata_livestockwater where DATA_WATER_TP is not null AND length(DATA_WATER_TP) &lt; 10 AND length(DATA_WATER_TN) &lt; 10 AND length(DATA_WATER_NH) &lt; 10 AND DEVICE_CODE = #{deployCode} order by DATA_DATE_TIME desc limit 5
select * from surv_transdata_livestockwater where DATA_WATER_TP is not null AND length(DATA_WATER_TP) &lt; 10 AND length(DATA_WATER_TN) &lt; 10 AND length(DATA_WATER_NH) &lt; 10 AND DEPLOY_CODE = #{deployCode} order by DATA_DATE_TIME desc limit 5
</select>
<select id="getAllNewestData" resultMap="simpleResultMap">
select * from surv_transdata_livestockwater where DATA_WATER_TP is not null AND length(DATA_WATER_TP) &lt; 10 AND length(DATA_WATER_TN) &lt; 10 AND length(DATA_WATER_NH) &lt; 10 AND DEVICE_CODE IN
select * from surv_transdata_livestockwater where DATA_WATER_TP is not null AND length(DATA_WATER_TP) &lt; 10 AND length(DATA_WATER_TN) &lt; 10 AND length(DATA_WATER_NH) &lt; 10 AND DEPLOY_CODE IN
<foreach collection="liveList" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>

View File

@ -9,15 +9,15 @@
<!-- <result property="dataWaterNh" column="DATA_WATER_NH" jdbcType="VARCHAR"/>-->
<result property="dataWaterNo" column="DATA_WATER_NO" jdbcType="VARCHAR"/>
<result property="dataDateTime" column="DATA_DATE_TIME" />
<result property="deviceCode" column="DEVICE_CODE" />
<result property="deployCode" column="DEPLOY_CODE" />
</resultMap>
<select id="getNewestData" resultMap="simpleResultMap">
select * from surv_transdata_orientwater where DATA_WATER_TP is not null AND length(DATA_WATER_TP) &lt; 10 AND length(DATA_WATER_TN) &lt; 10 AND DEVICE_CODE = #{deployCode} order by DATA_DATE_TIME desc limit 1
select * from surv_transdata_orientwater where DATA_WATER_TP is not null AND length(DATA_WATER_TP) &lt; 10 AND length(DATA_WATER_TN) &lt; 10 AND DEPLOY_CODE = #{deployCode} order by DATA_DATE_TIME desc limit 1
</select>
<select id="getNewestDataWithStation" resultMap="simpleResultMap">
select * from surv_transdata_orientwater where DATA_WATER_TP is not null AND length(DATA_WATER_TP) &lt; 10 AND length(DATA_WATER_TN) &lt; 10 AND DEVICE_CODE IN
select * from surv_transdata_orientwater where DATA_WATER_TP is not null AND length(DATA_WATER_TP) &lt; 10 AND length(DATA_WATER_TN) &lt; 10 AND DEPLOY_CODE IN
<foreach collection="orientList" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
@ -25,11 +25,11 @@
</select>
<select id="getRecentDataByCode" resultMap="simpleResultMap">
select * from surv_transdata_orientwater where DATA_WATER_TP is not null AND length(DATA_WATER_TP) &lt; 10 AND length(DATA_WATER_TN) &lt; 10 AND DEVICE_CODE = #{deployCode} order by DATA_DATE_TIME desc limit 5
select * from surv_transdata_orientwater where DATA_WATER_TP is not null AND length(DATA_WATER_TP) &lt; 10 AND length(DATA_WATER_TN) &lt; 10 AND DEPLOY_CODE = #{deployCode} order by DATA_DATE_TIME desc limit 5
</select>
<select id="getAllNewestData" resultMap="simpleResultMap">
select * from surv_transdata_orientwater where DATA_WATER_TP is not null AND length(DATA_WATER_TP) &lt; 10 AND length(DATA_WATER_TN) &lt; 10 AND DEVICE_CODE IN
select * from surv_transdata_orientwater where DATA_WATER_TP is not null AND length(DATA_WATER_TP) &lt; 10 AND length(DATA_WATER_TN) &lt; 10 AND DEPLOY_CODE IN
<foreach collection="orientList" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>

View File

@ -46,24 +46,24 @@
<result property="dataWaterDo" column="DATA_WATER_DO" jdbcType="VARCHAR"/>
<result property="dataDateTime" column="DATA_DATE_TIME"/>
<result property="deviceCode" column="DEVICE_CODE"/>
<result property="deployCode" column="DEPLOY_CODE"/>
<result property="deployId" column="DEPLOY_ID"/>
</resultMap>
<sql id="baseSql">
ID,DATA_SOIL_TEMP,DATA_SOIL_WET,DATA_SOIL_SALT,DATA_DATE_TIME,DATA_SOIL_TEMP2,DATA_SOIL_WET2,DATA_SOIL_TEMP3,DATA_SOIL_WET3,DATA_SOIL_DDL,DATA_SOIL_DDL2,DATA_SOIL_DDL3,DATA_GATHER_TYPE,STATION_ID,
DEVICE_ID,STATION_CODE,DEVICE_CODE,CORP_ID,STATION_NAME,DEVICE_NAME,TENANT_ID,RE_VISION,CREATED_BY,CREATE_TIME,UPDATED_BY,IS_DEL,UPDATED_TIME,DEPLOY_ID,DATA_SOIL_PH,
DEVICE_ID,STATION_CODE,DEPLOY_CODE,CORP_ID,STATION_NAME,DEVICE_NAME,TENANT_ID,RE_VISION,CREATED_BY,CREATE_TIME,UPDATED_BY,IS_DEL,UPDATED_TIME,DEPLOY_ID,DATA_SOIL_PH,
DATA_SOIL_NION,DATA_SOIL_PION,DATA_SOIL_KION,DATA_SOIL_NION2,DATA_SOIL_PION2,DATA_SOIL_KION2,DATA_SOIL_NION3,DATA_SOIL_PION3,DATA_SOIL_KION3,DATA_SOIL_NION4,DATA_SOIL_PION4,DATA_SOIL_KION4,
DATA_SOIL_NHION,DATA_SOIL_NOION,DATA_SOIL_CUION,DATA_SOIL_PBION,DATA_SOIL_CDION,
DATA_WATER_NTU,DATA_WATER_DO,DATA_WATER_TEMP,DATA_WATER_PH,DATA_WATER_DDL
</sql>
<select id="getNewestData" resultMap="simpleResultMap">
select <include refid="baseSql"/> from surv_transdata_soil where DEVICE_CODE = #{deployCode} order by DATA_DATE_TIME desc limit 1
select <include refid="baseSql"/> from surv_transdata_soil where DEPLOY_CODE = #{deployCode} order by DATA_DATE_TIME desc limit 1
</select>
<select id="getNewestDataWithStation" resultMap="simpleResultMap">
select * from surv_transdata_soil where DEVICE_CODE IN
select * from surv_transdata_soil where DEPLOY_CODE IN
<foreach collection="soilList" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
@ -71,11 +71,11 @@
</select>
<select id="getRecentDataByCode" resultMap="simpleResultMap">
select <include refid="baseSql"/> from surv_transdata_soil where DEVICE_CODE = #{deployCode} order by DATA_DATE_TIME desc limit 5
select <include refid="baseSql"/> from surv_transdata_soil where DEPLOY_CODE = #{deployCode} order by DATA_DATE_TIME desc limit 5
</select>
<select id="getAllNewestData" resultMap="simpleResultMap">
select <include refid="baseSql"/> from surv_transdata_soil where DEVICE_CODE IN
select <include refid="baseSql"/> from surv_transdata_soil where DEPLOY_CODE IN
<foreach collection="soilList" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>

View File

@ -29,7 +29,7 @@ public class SurvTransdataLivestockwaterServiceImpl extends ServiceImpl<SurvTran
survTransdataLivestockwaterVo.setDataWaterTp("1.0050");
survTransdataLivestockwaterVo.setDataWaterCod("499.1000");
survTransdataLivestockwaterVo.setDataDateTime(LocalDateTime.now());
survTransdataLivestockwaterVo.setDeviceCode(deployCode);
survTransdataLivestockwaterVo.setDeployCode(deployCode);
}
return survTransdataLivestockwaterVo;
}
@ -44,7 +44,7 @@ public class SurvTransdataLivestockwaterServiceImpl extends ServiceImpl<SurvTran
survTransdataLivestockwaterVo.setDataWaterTp("1.0050");
survTransdataLivestockwaterVo.setDataWaterCod("499.1000");
survTransdataLivestockwaterVo.setDataDateTime(LocalDateTime.now());
survTransdataLivestockwaterVo.setDeviceCode(liveList.get(0));
survTransdataLivestockwaterVo.setDeployCode(liveList.get(0));
}
return survTransdataLivestockwaterVo;
}

View File

@ -28,7 +28,7 @@ public class SurvTransdataOrientwaterServiceImpl extends ServiceImpl<SurvTransda
survTransdataOrientwaterVo.setDataWaterTp("1.0061");
survTransdataOrientwaterVo.setDataWaterTn("2.0000");
survTransdataOrientwaterVo.setDataDateTime(LocalDateTime.now());
survTransdataOrientwaterVo.setDeviceCode(deployCode);
survTransdataOrientwaterVo.setDeployCode(deployCode);
}
return survTransdataOrientwaterVo;
}
@ -41,7 +41,7 @@ public class SurvTransdataOrientwaterServiceImpl extends ServiceImpl<SurvTransda
survTransdataOrientwaterVo.setDataWaterNo("3.7629");
survTransdataOrientwaterVo.setDataWaterTp("1.0061");
survTransdataOrientwaterVo.setDataWaterTn("2.0000");
survTransdataOrientwaterVo.setDeviceCode(orientList.get(0));
survTransdataOrientwaterVo.setDeployCode(orientList.get(0));
}
return survTransdataOrientwaterVo;
}

View File

@ -56,11 +56,15 @@ public interface PollutionConstants {
String CONTROL_DOWN = "down";
String TABLE_AIR = "f_hisdata_air";
String TABLE_AIR = "surv_hisdata_air";
String TABLE_SOIL = "f_hisdata_soil";
String TABLE_SOIL = "surv_hisdata_soil";
String TABLE_PEST = "f_prevent_pestlight";
String TABLE_PEST = "surv_hisdata_pestlight";
String TABLE_ORIENT = "surv_hisdata_orientwater";
String TABLE_LIVE = "surv_hisdata_livestockwater";
/**
* 孢子监测

View File

@ -126,7 +126,7 @@ public class SurvHisdataAir implements Serializable {
/**设备编号*/
@Excel(name = "设备编号", width = 15)
@ApiModelProperty(value = "设备编号")
private String deviceCode;
private String deployCode;
/**机构ID*/
@Excel(name = "机构ID", width = 15)
@ApiModelProperty(value = "机构ID")

View File

@ -109,7 +109,7 @@ public class SurvHisdataDad implements Serializable {
/**设备编号*/
@Excel(name = "设备编号", width = 15)
@ApiModelProperty(value = "设备编号")
private String deviceCode;
private String deployCode;
/**机构ID*/
@Excel(name = "机构ID", width = 15)
@ApiModelProperty(value = "机构ID")

View File

@ -109,7 +109,7 @@ public class SurvHisdataFlowmeter implements Serializable {
/**设备编号*/
@Excel(name = "设备编号", width = 15)
@ApiModelProperty(value = "设备编号")
private String deviceCode;
private String deployCode;
/**机构ID*/
@Excel(name = "机构ID", width = 15)
@ApiModelProperty(value = "机构ID")

View File

@ -113,7 +113,7 @@ public class SurvHisdataLivestockwater implements Serializable {
/**设备编号*/
@Excel(name = "设备编号", width = 15)
@ApiModelProperty(value = "设备编号")
private String deviceCode;
private String deployCode;
/**机构ID*/
@Excel(name = "机构ID", width = 15)
@ApiModelProperty(value = "机构ID")

View File

@ -113,7 +113,7 @@ public class SurvHisdataOrientwater implements Serializable {
/**设备编号*/
@Excel(name = "设备编号", width = 15)
@ApiModelProperty(value = "设备编号")
private String deviceCode;
private String deployCode;
/**机构ID*/
@Excel(name = "机构ID", width = 15)
@ApiModelProperty(value = "机构ID")

View File

@ -129,7 +129,7 @@ public class SurvHisdataPestlight implements Serializable {
/**设备编号*/
@Excel(name = "设备编号", width = 15)
@ApiModelProperty(value = "设备编号")
private String deviceCode;
private String deployCode;
/**机构ID*/
@Excel(name = "机构ID", width = 15)
@ApiModelProperty(value = "机构ID")

View File

@ -296,7 +296,7 @@ public class SurvHisdataSoil implements Serializable {
/**设备编号*/
@Excel(name = "设备编号", width = 15)
@ApiModelProperty(value = "设备编号")
private String deviceCode;
private String deployCode;
/**机构ID*/
@Excel(name = "机构ID", width = 15)
@ApiModelProperty(value = "机构ID")

View File

@ -179,5 +179,5 @@ public class SurvStatisticAir implements Serializable {
/**设备编号*/
@Excel(name = "设备编号", width = 15)
@ApiModelProperty(value = "设备编号")
private String deviceCode;
private String deployCode;
}

View File

@ -155,5 +155,5 @@ public class SurvStatisticDad implements Serializable {
/**设备编号*/
@Excel(name = "设备编号", width = 15)
@ApiModelProperty(value = "设备编号")
private String deviceCode;
private String deployCode;
}

View File

@ -155,5 +155,5 @@ public class SurvStatisticFlowmeter implements Serializable {
/**设备编号*/
@Excel(name = "设备编号", width = 15)
@ApiModelProperty(value = "设备编号")
private String deviceCode;
private String deployCode;
}

View File

@ -155,5 +155,5 @@ public class SurvStatisticLivestockwater implements Serializable {
/**设备编号*/
@Excel(name = "设备编号", width = 15)
@ApiModelProperty(value = "设备编号")
private String deviceCode;
private String deployCode;
}

View File

@ -155,5 +155,5 @@ public class SurvStatisticOrientwater implements Serializable {
/**设备编号*/
@Excel(name = "设备编号", width = 15)
@ApiModelProperty(value = "设备编号")
private String deviceCode;
private String deployCode;
}

View File

@ -91,5 +91,5 @@ public class SurvStatisticPestlight implements Serializable {
/**设备编号*/
@Excel(name = "设备编号", width = 15)
@ApiModelProperty(value = "设备编号")
private String deviceCode;
private String deployCode;
}

View File

@ -131,5 +131,5 @@ public class SurvStatisticSoil implements Serializable {
/**设备编号*/
@Excel(name = "设备编号", width = 15)
@ApiModelProperty(value = "设备编号")
private String deviceCode;
private String deployCode;
}

View File

@ -299,5 +299,5 @@ public class SurvStatisticSummary implements Serializable {
/**设备编号*/
@Excel(name = "设备编号", width = 15)
@ApiModelProperty(value = "设备编号")
private String deviceCode;
private String deployCode;
}

View File

@ -127,7 +127,7 @@ public class SurvTransdataAir implements Serializable {
/**设备编号*/
@Excel(name = "设备编号", width = 15)
@ApiModelProperty(value = "设备编号")
private String deviceCode;
private String deployCode;
/**机构ID*/
@Excel(name = "机构ID", width = 15)
@ApiModelProperty(value = "机构ID")

View File

@ -109,7 +109,7 @@ public class SurvTransdataDad implements Serializable {
/**设备编号*/
@Excel(name = "设备编号", width = 15)
@ApiModelProperty(value = "设备编号")
private String deviceCode;
private String deployCode;
/**机构ID*/
@Excel(name = "机构ID", width = 15)
@ApiModelProperty(value = "机构ID")

View File

@ -109,7 +109,7 @@ public class SurvTransdataFlowmeter implements Serializable {
/**设备编号*/
@Excel(name = "设备编号", width = 15)
@ApiModelProperty(value = "设备编号")
private String deviceCode;
private String deployCode;
/**机构ID*/
@Excel(name = "机构ID", width = 15)
@ApiModelProperty(value = "机构ID")

View File

@ -113,7 +113,7 @@ public class SurvTransdataLivestockwater implements Serializable {
/**设备编号*/
@Excel(name = "设备编号", width = 15)
@ApiModelProperty(value = "设备编号")
private String deviceCode;
private String deployCode;
/**机构ID*/
@Excel(name = "机构ID", width = 15)
@ApiModelProperty(value = "机构ID")

View File

@ -113,7 +113,7 @@ public class SurvTransdataOrientwater implements Serializable {
/**设备编号*/
@Excel(name = "设备编号", width = 15)
@ApiModelProperty(value = "设备编号")
private String deviceCode;
private String deployCode;
/**机构ID*/
@Excel(name = "机构ID", width = 15)
@ApiModelProperty(value = "机构ID")

View File

@ -129,7 +129,7 @@ public class SurvTransdataPestlight implements Serializable {
/**设备编号*/
@Excel(name = "设备编号", width = 15)
@ApiModelProperty(value = "设备编号")
private String deviceCode;
private String deployCode;
/**机构ID*/
@Excel(name = "机构ID", width = 15)
@ApiModelProperty(value = "机构ID")

View File

@ -296,7 +296,7 @@ public class SurvTransdataSoil implements Serializable {
/**设备编号*/
@Excel(name = "设备编号", width = 15)
@ApiModelProperty(value = "设备编号")
private String deviceCode;
private String deployCode;
/**机构ID*/
@Excel(name = "机构ID", width = 15)
@ApiModelProperty(value = "机构ID")

View File

@ -71,7 +71,7 @@ public class SurvTransdataAirVo implements Serializable {
/**设备编号*/
@Excel(name = "设备编号", width = 15)
@ApiModelProperty(value = "设备编号")
private String deviceCode;
private String deployCode;
/**数据更新时间*/
@Excel(name = "数据更新时间", width = 15, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")

View File

@ -109,7 +109,7 @@ public class SurvTransdataDadVo implements Serializable {
/**设备编号*/
@Excel(name = "设备编号", width = 15)
@ApiModelProperty(value = "设备编号")
private String deviceCode;
private String deployCode;
/**机构ID*/
@Excel(name = "机构ID", width = 15)
@ApiModelProperty(value = "机构ID")

View File

@ -109,7 +109,7 @@ public class SurvTransdataFlowmeterVo implements Serializable {
/**设备编号*/
@Excel(name = "设备编号", width = 15)
@ApiModelProperty(value = "设备编号")
private String deviceCode;
private String deployCode;
/**机构ID*/
@Excel(name = "机构ID", width = 15)
@ApiModelProperty(value = "机构ID")

View File

@ -55,7 +55,7 @@ public class SurvTransdataLivestockwaterVo implements Serializable {
/**设备编号*/
@Excel(name = "设备编号", width = 15)
@ApiModelProperty(value = "设备编号")
private String deviceCode;
private String deployCode;
/**数据更新时间*/

View File

@ -56,7 +56,7 @@ public class SurvTransdataOrientwaterVo implements Serializable {
/**设备编号*/
@Excel(name = "设备编号", width = 15)
@ApiModelProperty(value = "设备编号")
private String deviceCode;
private String deployCode;
/**数据更新时间*/
@Excel(name = "数据更新时间", width = 15, format = "yyyy-MM-dd HH:mm:ss")

View File

@ -129,7 +129,7 @@ public class SurvTransdataPestlightVo implements Serializable {
/**设备编号*/
@Excel(name = "设备编号", width = 15)
@ApiModelProperty(value = "设备编号")
private String deviceCode;
private String deployCode;
/**机构ID*/
@Excel(name = "机构ID", width = 15)
@ApiModelProperty(value = "机构ID")

View File

@ -85,7 +85,7 @@ public class SurvTransdataSoilVo implements Serializable {
/**设备编号*/
@Excel(name = "设备编号", width = 15)
@ApiModelProperty(value = "设备编号")
private String deviceCode;
private String deployCode;
/**ph*/
@Excel(name = "ph", width = 15)