From ceedd4079ad54a7207cf14ce29f822717fc829d3 Mon Sep 17 00:00:00 2001 From: huangfeng Date: Thu, 21 Mar 2024 14:33:32 +0800 Subject: [PATCH 01/10] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96=E8=A7=92?= =?UTF-8?q?=E8=89=B2=E5=88=A0=E9=99=A4=E6=A0=A1=E9=AA=8C=E5=92=8C=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/RoleServiceImpl.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/RoleServiceImpl.java b/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/RoleServiceImpl.java index 204d04c..e9d3ea7 100644 --- a/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/RoleServiceImpl.java +++ b/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/RoleServiceImpl.java @@ -22,6 +22,10 @@ public class RoleServiceImpl implements RoleService { @Resource TbRoleMapper roleMapper; + @Resource + TbRoleResourceMapper roleResourceMapper; + @Resource + SysUserDao sysUserDao; @Override @@ -77,7 +81,21 @@ public class RoleServiceImpl implements RoleService { if (id == SUPER_ADMIN) { throw new ApiException("不能删除" + SUPER_ADMIN_NAME); } + + SysUserExample example = new SysUserExample(); + SysUserExample.Criteria criteria = example.createCriteria(); + criteria.andRoleEqualTo(id); + long count = sysUserDao.countByExample(example); + if (count > 0) { + throw new ApiException("该角色已被" + count + "个用户使用不能删除"); + } + roleMapper.deleteByPrimaryKey(id); + + TbRoleResourceExample resourceExample = new TbRoleResourceExample(); + TbRoleResourceExample.Criteria resourceExampleCriteria = resourceExample.createCriteria(); + resourceExampleCriteria.andRoleIdEqualTo(id); + roleResourceMapper.deleteByExample(resourceExample); } } From 5caf7715097dfcf37fbcdb067bccf4bfe80f55b6 Mon Sep 17 00:00:00 2001 From: huangfeng Date: Fri, 22 Mar 2024 09:08:13 +0800 Subject: [PATCH 02/10] =?UTF-8?q?feat:=20=E8=A7=92=E8=89=B2=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=A4=87=E6=B3=A8=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shxy/xymanager_common/entity/TbRole.java | 33 +++++++++ .../entity/TbRoleExample.java | 70 +++++++++++++++++++ .../main/resources/mappers/TbRoleMapper.xml | 23 +++++- 3 files changed, 123 insertions(+), 3 deletions(-) diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TbRole.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TbRole.java index cf64896..92ae016 100644 --- a/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TbRole.java +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TbRole.java @@ -21,6 +21,15 @@ public class TbRole { */ private String name; + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column tb_role.desc + * + * @mbg.generated + */ + private String desc; + /** * * This field was generated by MyBatis Generator. @@ -78,6 +87,30 @@ public class TbRole { this.name = name; } + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column tb_role.desc + * + * @return the value of tb_role.desc + * + * @mbg.generated + */ + public String getDesc() { + return desc; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column tb_role.desc + * + * @param desc the value for tb_role.desc + * + * @mbg.generated + */ + public void setDesc(String desc) { + this.desc = desc; + } + /** * This method was generated by MyBatis Generator. * This method returns the value of the database column tb_role.create_time diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TbRoleExample.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TbRoleExample.java index bed9b40..da5eb52 100644 --- a/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TbRoleExample.java +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/TbRoleExample.java @@ -325,6 +325,76 @@ public class TbRoleExample { return (Criteria) this; } + public Criteria andDescIsNull() { + addCriterion("`desc` is null"); + return (Criteria) this; + } + + public Criteria andDescIsNotNull() { + addCriterion("`desc` is not null"); + return (Criteria) this; + } + + public Criteria andDescEqualTo(String value) { + addCriterion("`desc` =", value, "desc"); + return (Criteria) this; + } + + public Criteria andDescNotEqualTo(String value) { + addCriterion("`desc` <>", value, "desc"); + return (Criteria) this; + } + + public Criteria andDescGreaterThan(String value) { + addCriterion("`desc` >", value, "desc"); + return (Criteria) this; + } + + public Criteria andDescGreaterThanOrEqualTo(String value) { + addCriterion("`desc` >=", value, "desc"); + return (Criteria) this; + } + + public Criteria andDescLessThan(String value) { + addCriterion("`desc` <", value, "desc"); + return (Criteria) this; + } + + public Criteria andDescLessThanOrEqualTo(String value) { + addCriterion("`desc` <=", value, "desc"); + return (Criteria) this; + } + + public Criteria andDescLike(String value) { + addCriterion("`desc` like", value, "desc"); + return (Criteria) this; + } + + public Criteria andDescNotLike(String value) { + addCriterion("`desc` not like", value, "desc"); + return (Criteria) this; + } + + public Criteria andDescIn(List values) { + addCriterion("`desc` in", values, "desc"); + return (Criteria) this; + } + + public Criteria andDescNotIn(List values) { + addCriterion("`desc` not in", values, "desc"); + return (Criteria) this; + } + + public Criteria andDescBetween(String value1, String value2) { + addCriterion("`desc` between", value1, value2, "desc"); + return (Criteria) this; + } + + public Criteria andDescNotBetween(String value1, String value2) { + addCriterion("`desc` not between", value1, value2, "desc"); + return (Criteria) this; + } + public Criteria andCreateTimeIsNull() { addCriterion("create_time is null"); return (Criteria) this; diff --git a/xymanager_dao/src/main/resources/mappers/TbRoleMapper.xml b/xymanager_dao/src/main/resources/mappers/TbRoleMapper.xml index 267682b..77670a5 100644 --- a/xymanager_dao/src/main/resources/mappers/TbRoleMapper.xml +++ b/xymanager_dao/src/main/resources/mappers/TbRoleMapper.xml @@ -8,6 +8,7 @@ --> + @@ -81,7 +82,7 @@ WARNING - @mbg.generated This element is automatically generated by MyBatis Generator, do not modify. --> - id, `name`, create_time + id, `name`, `desc`, create_time + + select + + distinct + + + from lead_pulls + + + + + order by ${orderByClause} + + + + + + delete from lead_pulls + where id = #{id,jdbcType=BIGINT} + + + + delete from lead_pulls + + + + + + + + SELECT LAST_INSERT_ID() + + insert into lead_pulls (term_id, update_time, func_code, + maxpull_pull, maxpull_wind, maxpull_tilt, + minpull_pull, minpull_wind, minpull_tilt, + maxwind_pull, maxwind_wind, maxwind_tilt, + minwind_pull, minwind_wind, minwind_tilt, + wid, wind_speed, create_time + ) + values (#{termId,jdbcType=INTEGER}, #{updateTime,jdbcType=BIGINT}, #{funcCode,jdbcType=SMALLINT}, + #{maxpullPull,jdbcType=SMALLINT}, #{maxpullWind,jdbcType=REAL}, #{maxpullTilt,jdbcType=REAL}, + #{minpullPull,jdbcType=SMALLINT}, #{minpullWind,jdbcType=REAL}, #{minpullTilt,jdbcType=REAL}, + #{maxwindPull,jdbcType=SMALLINT}, #{maxwindWind,jdbcType=REAL}, #{maxwindTilt,jdbcType=REAL}, + #{minwindPull,jdbcType=SMALLINT}, #{minwindWind,jdbcType=REAL}, #{minwindTilt,jdbcType=REAL}, + #{wid,jdbcType=BIGINT}, #{windSpeed,jdbcType=REAL}, #{createTime,jdbcType=TIMESTAMP} + ) + + + + + SELECT LAST_INSERT_ID() + + insert into lead_pulls + + + term_id, + + + update_time, + + + func_code, + + + maxpull_pull, + + + maxpull_wind, + + + maxpull_tilt, + + + minpull_pull, + + + minpull_wind, + + + minpull_tilt, + + + maxwind_pull, + + + maxwind_wind, + + + maxwind_tilt, + + + minwind_pull, + + + minwind_wind, + + + minwind_tilt, + + + wid, + + + wind_speed, + + + create_time, + + + + + #{termId,jdbcType=INTEGER}, + + + #{updateTime,jdbcType=BIGINT}, + + + #{funcCode,jdbcType=SMALLINT}, + + + #{maxpullPull,jdbcType=SMALLINT}, + + + #{maxpullWind,jdbcType=REAL}, + + + #{maxpullTilt,jdbcType=REAL}, + + + #{minpullPull,jdbcType=SMALLINT}, + + + #{minpullWind,jdbcType=REAL}, + + + #{minpullTilt,jdbcType=REAL}, + + + #{maxwindPull,jdbcType=SMALLINT}, + + + #{maxwindWind,jdbcType=REAL}, + + + #{maxwindTilt,jdbcType=REAL}, + + + #{minwindPull,jdbcType=SMALLINT}, + + + #{minwindWind,jdbcType=REAL}, + + + #{minwindTilt,jdbcType=REAL}, + + + #{wid,jdbcType=BIGINT}, + + + #{windSpeed,jdbcType=REAL}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + + + + + update lead_pulls + + + id = #{row.id,jdbcType=BIGINT}, + + + term_id = #{row.termId,jdbcType=INTEGER}, + + + update_time = #{row.updateTime,jdbcType=BIGINT}, + + + func_code = #{row.funcCode,jdbcType=SMALLINT}, + + + maxpull_pull = #{row.maxpullPull,jdbcType=SMALLINT}, + + + maxpull_wind = #{row.maxpullWind,jdbcType=REAL}, + + + maxpull_tilt = #{row.maxpullTilt,jdbcType=REAL}, + + + minpull_pull = #{row.minpullPull,jdbcType=SMALLINT}, + + + minpull_wind = #{row.minpullWind,jdbcType=REAL}, + + + minpull_tilt = #{row.minpullTilt,jdbcType=REAL}, + + + maxwind_pull = #{row.maxwindPull,jdbcType=SMALLINT}, + + + maxwind_wind = #{row.maxwindWind,jdbcType=REAL}, + + + maxwind_tilt = #{row.maxwindTilt,jdbcType=REAL}, + + + minwind_pull = #{row.minwindPull,jdbcType=SMALLINT}, + + + minwind_wind = #{row.minwindWind,jdbcType=REAL}, + + + minwind_tilt = #{row.minwindTilt,jdbcType=REAL}, + + + wid = #{row.wid,jdbcType=BIGINT}, + + + wind_speed = #{row.windSpeed,jdbcType=REAL}, + + + create_time = #{row.createTime,jdbcType=TIMESTAMP}, + + + + + + + + + update lead_pulls + set id = #{row.id,jdbcType=BIGINT}, + term_id = #{row.termId,jdbcType=INTEGER}, + update_time = #{row.updateTime,jdbcType=BIGINT}, + func_code = #{row.funcCode,jdbcType=SMALLINT}, + maxpull_pull = #{row.maxpullPull,jdbcType=SMALLINT}, + maxpull_wind = #{row.maxpullWind,jdbcType=REAL}, + maxpull_tilt = #{row.maxpullTilt,jdbcType=REAL}, + minpull_pull = #{row.minpullPull,jdbcType=SMALLINT}, + minpull_wind = #{row.minpullWind,jdbcType=REAL}, + minpull_tilt = #{row.minpullTilt,jdbcType=REAL}, + maxwind_pull = #{row.maxwindPull,jdbcType=SMALLINT}, + maxwind_wind = #{row.maxwindWind,jdbcType=REAL}, + maxwind_tilt = #{row.maxwindTilt,jdbcType=REAL}, + minwind_pull = #{row.minwindPull,jdbcType=SMALLINT}, + minwind_wind = #{row.minwindWind,jdbcType=REAL}, + minwind_tilt = #{row.minwindTilt,jdbcType=REAL}, + wid = #{row.wid,jdbcType=BIGINT}, + wind_speed = #{row.windSpeed,jdbcType=REAL}, + create_time = #{row.createTime,jdbcType=TIMESTAMP} + + + + + + + update lead_pulls + + + term_id = #{termId,jdbcType=INTEGER}, + + + update_time = #{updateTime,jdbcType=BIGINT}, + + + func_code = #{funcCode,jdbcType=SMALLINT}, + + + maxpull_pull = #{maxpullPull,jdbcType=SMALLINT}, + + + maxpull_wind = #{maxpullWind,jdbcType=REAL}, + + + maxpull_tilt = #{maxpullTilt,jdbcType=REAL}, + + + minpull_pull = #{minpullPull,jdbcType=SMALLINT}, + + + minpull_wind = #{minpullWind,jdbcType=REAL}, + + + minpull_tilt = #{minpullTilt,jdbcType=REAL}, + + + maxwind_pull = #{maxwindPull,jdbcType=SMALLINT}, + + + maxwind_wind = #{maxwindWind,jdbcType=REAL}, + + + maxwind_tilt = #{maxwindTilt,jdbcType=REAL}, + + + minwind_pull = #{minwindPull,jdbcType=SMALLINT}, + + + minwind_wind = #{minwindWind,jdbcType=REAL}, + + + minwind_tilt = #{minwindTilt,jdbcType=REAL}, + + + wid = #{wid,jdbcType=BIGINT}, + + + wind_speed = #{windSpeed,jdbcType=REAL}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + where id = #{id,jdbcType=BIGINT} + + + + update lead_pulls + set term_id = #{termId,jdbcType=INTEGER}, + update_time = #{updateTime,jdbcType=BIGINT}, + func_code = #{funcCode,jdbcType=SMALLINT}, + maxpull_pull = #{maxpullPull,jdbcType=SMALLINT}, + maxpull_wind = #{maxpullWind,jdbcType=REAL}, + maxpull_tilt = #{maxpullTilt,jdbcType=REAL}, + minpull_pull = #{minpullPull,jdbcType=SMALLINT}, + minpull_wind = #{minpullWind,jdbcType=REAL}, + minpull_tilt = #{minpullTilt,jdbcType=REAL}, + maxwind_pull = #{maxwindPull,jdbcType=SMALLINT}, + maxwind_wind = #{maxwindWind,jdbcType=REAL}, + maxwind_tilt = #{maxwindTilt,jdbcType=REAL}, + minwind_pull = #{minwindPull,jdbcType=SMALLINT}, + minwind_wind = #{minwindWind,jdbcType=REAL}, + minwind_tilt = #{minwindTilt,jdbcType=REAL}, + wid = #{wid,jdbcType=BIGINT}, + wind_speed = #{windSpeed,jdbcType=REAL}, + create_time = #{createTime,jdbcType=TIMESTAMP} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/xymanager_dao/src/main/resources/mappers/WeathersMapper.xml b/xymanager_dao/src/main/resources/mappers/WeathersMapper.xml new file mode 100644 index 0000000..6759ad8 --- /dev/null +++ b/xymanager_dao/src/main/resources/mappers/WeathersMapper.xml @@ -0,0 +1,479 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + id, term_id, update_time, comp_id, avg_wind_speed_10min, avg_wind_dir_10min, avg_wind_speed_1min, + avg_wind_dir_1min, max_wind_speed, extreme_wind_speed, standard_wind_speed, wind_direction, + air_temperature, humidity, air_pressure, precipitation, precipitation_Intensity, + radiation_Intensity + + + + + + delete from weathers + where id = #{id,jdbcType=BIGINT} + + + + delete from weathers + + + + + + + + SELECT LAST_INSERT_ID() + + insert into weathers (term_id, update_time, comp_id, + avg_wind_speed_10min, avg_wind_dir_10min, avg_wind_speed_1min, + avg_wind_dir_1min, max_wind_speed, extreme_wind_speed, + standard_wind_speed, wind_direction, air_temperature, + humidity, air_pressure, precipitation, + precipitation_Intensity, radiation_Intensity + ) + values (#{termId,jdbcType=INTEGER}, #{updateTime,jdbcType=BIGINT}, #{compId,jdbcType=VARCHAR}, + #{avgWindSpeed10min,jdbcType=REAL}, #{avgWindDir10min,jdbcType=SMALLINT}, #{avgWindSpeed1min,jdbcType=REAL}, + #{avgWindDir1min,jdbcType=REAL}, #{maxWindSpeed,jdbcType=REAL}, #{extremeWindSpeed,jdbcType=REAL}, + #{standardWindSpeed,jdbcType=REAL}, #{windDirection,jdbcType=REAL}, #{airTemperature,jdbcType=REAL}, + #{humidity,jdbcType=SMALLINT}, #{airPressure,jdbcType=REAL}, #{precipitation,jdbcType=REAL}, + #{precipitationIntensity,jdbcType=REAL}, #{radiationIntensity,jdbcType=SMALLINT} + ) + + + + + SELECT LAST_INSERT_ID() + + insert into weathers + + + term_id, + + + update_time, + + + comp_id, + + + avg_wind_speed_10min, + + + avg_wind_dir_10min, + + + avg_wind_speed_1min, + + + avg_wind_dir_1min, + + + max_wind_speed, + + + extreme_wind_speed, + + + standard_wind_speed, + + + wind_direction, + + + air_temperature, + + + humidity, + + + air_pressure, + + + precipitation, + + + precipitation_Intensity, + + + radiation_Intensity, + + + + + #{termId,jdbcType=INTEGER}, + + + #{updateTime,jdbcType=BIGINT}, + + + #{compId,jdbcType=VARCHAR}, + + + #{avgWindSpeed10min,jdbcType=REAL}, + + + #{avgWindDir10min,jdbcType=SMALLINT}, + + + #{avgWindSpeed1min,jdbcType=REAL}, + + + #{avgWindDir1min,jdbcType=REAL}, + + + #{maxWindSpeed,jdbcType=REAL}, + + + #{extremeWindSpeed,jdbcType=REAL}, + + + #{standardWindSpeed,jdbcType=REAL}, + + + #{windDirection,jdbcType=REAL}, + + + #{airTemperature,jdbcType=REAL}, + + + #{humidity,jdbcType=SMALLINT}, + + + #{airPressure,jdbcType=REAL}, + + + #{precipitation,jdbcType=REAL}, + + + #{precipitationIntensity,jdbcType=REAL}, + + + #{radiationIntensity,jdbcType=SMALLINT}, + + + + + + + update weathers + + + id = #{row.id,jdbcType=BIGINT}, + + + term_id = #{row.termId,jdbcType=INTEGER}, + + + update_time = #{row.updateTime,jdbcType=BIGINT}, + + + comp_id = #{row.compId,jdbcType=VARCHAR}, + + + avg_wind_speed_10min = #{row.avgWindSpeed10min,jdbcType=REAL}, + + + avg_wind_dir_10min = #{row.avgWindDir10min,jdbcType=SMALLINT}, + + + avg_wind_speed_1min = #{row.avgWindSpeed1min,jdbcType=REAL}, + + + avg_wind_dir_1min = #{row.avgWindDir1min,jdbcType=REAL}, + + + max_wind_speed = #{row.maxWindSpeed,jdbcType=REAL}, + + + extreme_wind_speed = #{row.extremeWindSpeed,jdbcType=REAL}, + + + standard_wind_speed = #{row.standardWindSpeed,jdbcType=REAL}, + + + wind_direction = #{row.windDirection,jdbcType=REAL}, + + + air_temperature = #{row.airTemperature,jdbcType=REAL}, + + + humidity = #{row.humidity,jdbcType=SMALLINT}, + + + air_pressure = #{row.airPressure,jdbcType=REAL}, + + + precipitation = #{row.precipitation,jdbcType=REAL}, + + + precipitation_Intensity = #{row.precipitationIntensity,jdbcType=REAL}, + + + radiation_Intensity = #{row.radiationIntensity,jdbcType=SMALLINT}, + + + + + + + + + update weathers + set id = #{row.id,jdbcType=BIGINT}, + term_id = #{row.termId,jdbcType=INTEGER}, + update_time = #{row.updateTime,jdbcType=BIGINT}, + comp_id = #{row.compId,jdbcType=VARCHAR}, + avg_wind_speed_10min = #{row.avgWindSpeed10min,jdbcType=REAL}, + avg_wind_dir_10min = #{row.avgWindDir10min,jdbcType=SMALLINT}, + avg_wind_speed_1min = #{row.avgWindSpeed1min,jdbcType=REAL}, + avg_wind_dir_1min = #{row.avgWindDir1min,jdbcType=REAL}, + max_wind_speed = #{row.maxWindSpeed,jdbcType=REAL}, + extreme_wind_speed = #{row.extremeWindSpeed,jdbcType=REAL}, + standard_wind_speed = #{row.standardWindSpeed,jdbcType=REAL}, + wind_direction = #{row.windDirection,jdbcType=REAL}, + air_temperature = #{row.airTemperature,jdbcType=REAL}, + humidity = #{row.humidity,jdbcType=SMALLINT}, + air_pressure = #{row.airPressure,jdbcType=REAL}, + precipitation = #{row.precipitation,jdbcType=REAL}, + precipitation_Intensity = #{row.precipitationIntensity,jdbcType=REAL}, + radiation_Intensity = #{row.radiationIntensity,jdbcType=SMALLINT} + + + + + + + update weathers + + + term_id = #{termId,jdbcType=INTEGER}, + + + update_time = #{updateTime,jdbcType=BIGINT}, + + + comp_id = #{compId,jdbcType=VARCHAR}, + + + avg_wind_speed_10min = #{avgWindSpeed10min,jdbcType=REAL}, + + + avg_wind_dir_10min = #{avgWindDir10min,jdbcType=SMALLINT}, + + + avg_wind_speed_1min = #{avgWindSpeed1min,jdbcType=REAL}, + + + avg_wind_dir_1min = #{avgWindDir1min,jdbcType=REAL}, + + + max_wind_speed = #{maxWindSpeed,jdbcType=REAL}, + + + extreme_wind_speed = #{extremeWindSpeed,jdbcType=REAL}, + + + standard_wind_speed = #{standardWindSpeed,jdbcType=REAL}, + + + wind_direction = #{windDirection,jdbcType=REAL}, + + + air_temperature = #{airTemperature,jdbcType=REAL}, + + + humidity = #{humidity,jdbcType=SMALLINT}, + + + air_pressure = #{airPressure,jdbcType=REAL}, + + + precipitation = #{precipitation,jdbcType=REAL}, + + + precipitation_Intensity = #{precipitationIntensity,jdbcType=REAL}, + + + radiation_Intensity = #{radiationIntensity,jdbcType=SMALLINT}, + + + where id = #{id,jdbcType=BIGINT} + + + + update weathers + set term_id = #{termId,jdbcType=INTEGER}, + update_time = #{updateTime,jdbcType=BIGINT}, + comp_id = #{compId,jdbcType=VARCHAR}, + avg_wind_speed_10min = #{avgWindSpeed10min,jdbcType=REAL}, + avg_wind_dir_10min = #{avgWindDir10min,jdbcType=SMALLINT}, + avg_wind_speed_1min = #{avgWindSpeed1min,jdbcType=REAL}, + avg_wind_dir_1min = #{avgWindDir1min,jdbcType=REAL}, + max_wind_speed = #{maxWindSpeed,jdbcType=REAL}, + extreme_wind_speed = #{extremeWindSpeed,jdbcType=REAL}, + standard_wind_speed = #{standardWindSpeed,jdbcType=REAL}, + wind_direction = #{windDirection,jdbcType=REAL}, + air_temperature = #{airTemperature,jdbcType=REAL}, + humidity = #{humidity,jdbcType=SMALLINT}, + air_pressure = #{airPressure,jdbcType=REAL}, + precipitation = #{precipitation,jdbcType=REAL}, + precipitation_Intensity = #{precipitationIntensity,jdbcType=REAL}, + radiation_Intensity = #{radiationIntensity,jdbcType=SMALLINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/LeadPullsServiceImpl.java b/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/LeadPullsServiceImpl.java new file mode 100644 index 0000000..bfd1df6 --- /dev/null +++ b/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/LeadPullsServiceImpl.java @@ -0,0 +1,50 @@ +package com.shxy.xymanager_service.impl; + + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.shxy.xymanager_common.entity.LeadPulls; +import com.shxy.xymanager_common.entity.LeadPullsExample; +import com.shxy.xymanager_common.entity.Terminals; +import com.shxy.xymanager_dao.dao.LeadPullsMapper; +import com.shxy.xymanager_service.service.LeadPullsService; +import com.shxy.xymanager_service.service.TerminalService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.ArrayList; +import java.util.List; + +@Service +@Slf4j +public class LeadPullsServiceImpl implements LeadPullsService { + + @Resource + LeadPullsMapper mapper; + @Resource + TerminalService terminalService; + + @Override + public PageInfo list(Integer lineId, Integer towerId, Long start, Long end, int pageNum, int pageSize) { + PageHelper.startPage(pageNum, pageSize); + LeadPullsExample example = new LeadPullsExample(); + LeadPullsExample.Criteria criteria = example.createCriteria(); + if (start != null) { + criteria.andUpdateTimeGreaterThanOrEqualTo(start); + } + if (end != null) { + criteria.andUpdateTimeLessThanOrEqualTo(end); + } + if (lineId != null || towerId != null) { + List terminalsList = terminalService.getByLineAndTower(lineId, towerId); + List idList = new ArrayList<>(); + for (Terminals terminals : terminalsList) { + idList.add(terminals.getId()); + } + criteria.andTermIdIn(idList); + } + List list = mapper.selectByExample(example); + return new PageInfo<>(list); + } +} diff --git a/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/WeatherServiceImpl.java b/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/WeatherServiceImpl.java new file mode 100644 index 0000000..39fa85b --- /dev/null +++ b/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/WeatherServiceImpl.java @@ -0,0 +1,50 @@ +package com.shxy.xymanager_service.impl; + + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.shxy.xymanager_common.entity.Terminals; +import com.shxy.xymanager_common.entity.Weathers; +import com.shxy.xymanager_common.entity.WeathersExample; +import com.shxy.xymanager_dao.dao.WeathersMapper; +import com.shxy.xymanager_service.service.TerminalService; +import com.shxy.xymanager_service.service.WeatherService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.ArrayList; +import java.util.List; + +@Service +@Slf4j +public class WeatherServiceImpl implements WeatherService { + + @Resource + WeathersMapper mapper; + @Resource + TerminalService terminalService; + + @Override + public PageInfo list(Integer lineId, Integer towerId, Long start, Long end, int pageNum, int pageSize) { + PageHelper.startPage(pageNum, pageSize); + WeathersExample example = new WeathersExample(); + WeathersExample.Criteria criteria = example.createCriteria(); + if (start != null) { + criteria.andUpdateTimeGreaterThanOrEqualTo(start); + } + if (end != null) { + criteria.andUpdateTimeLessThanOrEqualTo(end); + } + if (lineId != null || towerId != null) { + List terminalsList = terminalService.getByLineAndTower(lineId, towerId); + List idList = new ArrayList<>(); + for (Terminals terminals : terminalsList) { + idList.add(terminals.getId()); + } + criteria.andTermIdIn(idList); + } + List list = mapper.selectByExample(example); + return new PageInfo<>(list); + } +} diff --git a/xymanager_service/src/main/java/com/shxy/xymanager_service/service/LeadPullsService.java b/xymanager_service/src/main/java/com/shxy/xymanager_service/service/LeadPullsService.java new file mode 100644 index 0000000..0d36035 --- /dev/null +++ b/xymanager_service/src/main/java/com/shxy/xymanager_service/service/LeadPullsService.java @@ -0,0 +1,12 @@ +package com.shxy.xymanager_service.service; + + +import com.github.pagehelper.PageInfo; +import com.shxy.xymanager_common.entity.LeadPulls; + +public interface LeadPullsService { + + PageInfo list(Integer lineId, Integer towerId, + Long start, Long end, + int pageNum, int pageSize); +} diff --git a/xymanager_service/src/main/java/com/shxy/xymanager_service/service/WeatherService.java b/xymanager_service/src/main/java/com/shxy/xymanager_service/service/WeatherService.java new file mode 100644 index 0000000..1856ff5 --- /dev/null +++ b/xymanager_service/src/main/java/com/shxy/xymanager_service/service/WeatherService.java @@ -0,0 +1,12 @@ +package com.shxy.xymanager_service.service; + + +import com.github.pagehelper.PageInfo; +import com.shxy.xymanager_common.entity.Weathers; + +public interface WeatherService { + + PageInfo list(Integer lineId, Integer towerId, + Long start, Long end, + int pageNum, int pageSize); +} From 1bae3099b619ad4125018687713d1eefd690d2fc Mon Sep 17 00:00:00 2001 From: huangfeng Date: Tue, 26 Mar 2024 16:01:56 +0800 Subject: [PATCH 06/10] =?UTF-8?q?perf:=20=E5=A2=9E=E5=8A=A0=E8=BE=85?= =?UTF-8?q?=E5=8A=A9=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/LeadPullsController.java | 5 ++-- .../controller/WeatherController.java | 5 ++-- .../xymanager_common/entity/LeadPulls.java | 19 ++++++++++++ .../xymanager_common/entity/Weathers.java | 19 ++++++++++++ .../impl/LeadPullsServiceImpl.java | 29 ++++++++++++++----- .../impl/TerminalServiceImpl.java | 12 ++++---- .../impl/WeatherServiceImpl.java | 29 ++++++++++++++----- .../service/LeadPullsService.java | 2 +- .../service/WeatherService.java | 2 +- 9 files changed, 97 insertions(+), 25 deletions(-) diff --git a/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/LeadPullsController.java b/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/LeadPullsController.java index 142055c..98ba75b 100644 --- a/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/LeadPullsController.java +++ b/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/LeadPullsController.java @@ -25,10 +25,11 @@ public class LeadPullsController extends BaseController { @GetMapping("list") @ApiOperation("查询列表") - public ResponseReult> list(Integer lineId, Integer towerId, + public ResponseReult> list(Integer lineId, Integer towerId, Integer termId, Long start, Long end, int pageNum, int pageSize) { - PageInfo result = service.list(lineId, towerId, start, end, pageNum, pageSize); + PageInfo result = service.list(lineId, towerId, termId, + start, end, pageNum, pageSize); return ResponseReult.success(result); } diff --git a/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/WeatherController.java b/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/WeatherController.java index f25cc8f..2a302fd 100644 --- a/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/WeatherController.java +++ b/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/WeatherController.java @@ -23,10 +23,11 @@ public class WeatherController extends BaseController { @GetMapping("list") @ApiOperation("查询列表") - public ResponseReult> list(Integer lineId, Integer towerId, + public ResponseReult> list(Integer lineId, Integer towerId, Integer termId, Long start, Long end, int pageNum, int pageSize) { - PageInfo result = service.list(lineId, towerId, start, end, pageNum, pageSize); + PageInfo result = service.list(lineId, towerId, termId, + start, end, pageNum, pageSize); return ResponseReult.success(result); } diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/LeadPulls.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/LeadPulls.java index 351413d..e315c9b 100644 --- a/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/LeadPulls.java +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/LeadPulls.java @@ -629,4 +629,23 @@ public class LeadPulls { public void setCreateTime(Date createTime) { this.createTime = createTime; } + + private String cmdid; + private String phase; + + public String getCmdid() { + return cmdid; + } + + public void setCmdid(String cmdid) { + this.cmdid = cmdid; + } + + public String getPhase() { + return phase; + } + + public void setPhase(String phase) { + this.phase = phase; + } } \ No newline at end of file diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/Weathers.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/Weathers.java index ae327dd..f8a731b 100644 --- a/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/Weathers.java +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/Weathers.java @@ -594,4 +594,23 @@ public class Weathers { public void setRadiationIntensity(Short radiationIntensity) { this.radiationIntensity = radiationIntensity; } + + private String cmdid; + private String phase; + + public String getCmdid() { + return cmdid; + } + + public void setCmdid(String cmdid) { + this.cmdid = cmdid; + } + + public String getPhase() { + return phase; + } + + public void setPhase(String phase) { + this.phase = phase; + } } \ No newline at end of file diff --git a/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/LeadPullsServiceImpl.java b/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/LeadPullsServiceImpl.java index bfd1df6..88404a0 100644 --- a/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/LeadPullsServiceImpl.java +++ b/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/LeadPullsServiceImpl.java @@ -26,7 +26,8 @@ public class LeadPullsServiceImpl implements LeadPullsService { TerminalService terminalService; @Override - public PageInfo list(Integer lineId, Integer towerId, Long start, Long end, int pageNum, int pageSize) { + public PageInfo list(Integer lineId, Integer towerId, Integer termId, + Long start, Long end, int pageNum, int pageSize) { PageHelper.startPage(pageNum, pageSize); LeadPullsExample example = new LeadPullsExample(); LeadPullsExample.Criteria criteria = example.createCriteria(); @@ -36,15 +37,29 @@ public class LeadPullsServiceImpl implements LeadPullsService { if (end != null) { criteria.andUpdateTimeLessThanOrEqualTo(end); } - if (lineId != null || towerId != null) { - List terminalsList = terminalService.getByLineAndTower(lineId, towerId); - List idList = new ArrayList<>(); + + List terminalsList = terminalService.getByLineAndTower(lineId, towerId); + List idList = new ArrayList<>(); + for (Terminals terminals : terminalsList) { + idList.add(terminals.getId()); + } + if (termId != null) { + idList.add(termId); + } + criteria.andTermIdIn(idList); + example.setOrderByClause("updateTime desc"); + + List list = mapper.selectByExample(example); + for (LeadPulls leadPull : list) { for (Terminals terminals : terminalsList) { - idList.add(terminals.getId()); + if (leadPull.getTermId().equals(terminals.getId())) { + leadPull.setCmdid(terminals.getCmdid()); + leadPull.setPhase(terminals.getPhase()); + break; + } } - criteria.andTermIdIn(idList); } - List list = mapper.selectByExample(example); + return new PageInfo<>(list); } } diff --git a/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/TerminalServiceImpl.java b/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/TerminalServiceImpl.java index a916b0b..1ea3b06 100644 --- a/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/TerminalServiceImpl.java +++ b/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/TerminalServiceImpl.java @@ -936,19 +936,21 @@ public class TerminalServiceImpl implements TerminalService { @Override public List getByLineAndTower(Integer lineId, Integer towerId) { List towerIdList = new ArrayList<>(); - if (lineId != null){ + if (lineId != null) { List towersList = towerService.getByLine(lineId); - for(Towers tower: towersList){ + for (Towers tower : towersList) { towerIdList.add(tower.getId()); } } - if (towerId != null){ + if (towerId != null) { towerIdList.add(towerId); } TerminalsExample example = new TerminalsExample(); TerminalsExample.Criteria criteria = example.createCriteria(); - criteria.andTowerIdIn(towerIdList); - List result =terminalsDao.selectByExample(example); + if (towerIdList.size() > 0) { + criteria.andTowerIdIn(towerIdList); + } + List result = terminalsDao.selectByExample(example); return result; } diff --git a/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/WeatherServiceImpl.java b/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/WeatherServiceImpl.java index 39fa85b..3b8de40 100644 --- a/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/WeatherServiceImpl.java +++ b/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/WeatherServiceImpl.java @@ -26,7 +26,8 @@ public class WeatherServiceImpl implements WeatherService { TerminalService terminalService; @Override - public PageInfo list(Integer lineId, Integer towerId, Long start, Long end, int pageNum, int pageSize) { + public PageInfo list(Integer lineId, Integer towerId, Integer termId, + Long start, Long end, int pageNum, int pageSize) { PageHelper.startPage(pageNum, pageSize); WeathersExample example = new WeathersExample(); WeathersExample.Criteria criteria = example.createCriteria(); @@ -36,15 +37,29 @@ public class WeatherServiceImpl implements WeatherService { if (end != null) { criteria.andUpdateTimeLessThanOrEqualTo(end); } - if (lineId != null || towerId != null) { - List terminalsList = terminalService.getByLineAndTower(lineId, towerId); - List idList = new ArrayList<>(); + + List terminalsList = terminalService.getByLineAndTower(lineId, towerId); + List idList = new ArrayList<>(); + for (Terminals terminals : terminalsList) { + idList.add(terminals.getId()); + } + if (termId != null) { + idList.add(termId); + } + criteria.andTermIdIn(idList); + example.setOrderByClause("updateTime desc"); + + List list = mapper.selectByExample(example); + for (Weathers weather : list) { for (Terminals terminals : terminalsList) { - idList.add(terminals.getId()); + if (weather.getTermId().equals(terminals.getId())) { + weather.setCmdid(terminals.getCmdid()); + weather.setPhase(terminals.getPhase()); + break; + } } - criteria.andTermIdIn(idList); } - List list = mapper.selectByExample(example); + return new PageInfo<>(list); } } diff --git a/xymanager_service/src/main/java/com/shxy/xymanager_service/service/LeadPullsService.java b/xymanager_service/src/main/java/com/shxy/xymanager_service/service/LeadPullsService.java index 0d36035..e154188 100644 --- a/xymanager_service/src/main/java/com/shxy/xymanager_service/service/LeadPullsService.java +++ b/xymanager_service/src/main/java/com/shxy/xymanager_service/service/LeadPullsService.java @@ -6,7 +6,7 @@ import com.shxy.xymanager_common.entity.LeadPulls; public interface LeadPullsService { - PageInfo list(Integer lineId, Integer towerId, + PageInfo list(Integer lineId, Integer towerId, Integer termId, Long start, Long end, int pageNum, int pageSize); } diff --git a/xymanager_service/src/main/java/com/shxy/xymanager_service/service/WeatherService.java b/xymanager_service/src/main/java/com/shxy/xymanager_service/service/WeatherService.java index 1856ff5..4e85af4 100644 --- a/xymanager_service/src/main/java/com/shxy/xymanager_service/service/WeatherService.java +++ b/xymanager_service/src/main/java/com/shxy/xymanager_service/service/WeatherService.java @@ -6,7 +6,7 @@ import com.shxy.xymanager_common.entity.Weathers; public interface WeatherService { - PageInfo list(Integer lineId, Integer towerId, + PageInfo list(Integer lineId, Integer towerId, Integer termId, Long start, Long end, int pageNum, int pageSize); } From 86f5235de7a2f35afc6742e12ac2d3db366a1a06 Mon Sep 17 00:00:00 2001 From: huangfeng Date: Tue, 26 Mar 2024 17:27:47 +0800 Subject: [PATCH 07/10] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E8=A6=86=E5=86=B0=E6=9C=80=E6=96=B0=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/LeadPullsController.java | 27 +++++++++++++++++++ .../controller/WeatherController.java | 27 +++++++++++++++++++ .../entity/View_Dy_Line_Tower_Terminals.java | 3 +++ .../impl/LeadPullsServiceImpl.java | 16 +++++++++++ .../impl/WeatherServiceImpl.java | 20 +++++++++++--- .../service/LeadPullsService.java | 2 ++ .../service/WeatherService.java | 2 ++ 7 files changed, 94 insertions(+), 3 deletions(-) diff --git a/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/LeadPullsController.java b/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/LeadPullsController.java index 98ba75b..e91b9d8 100644 --- a/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/LeadPullsController.java +++ b/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/LeadPullsController.java @@ -4,10 +4,15 @@ import com.github.pagehelper.PageInfo; import com.shxy.xymanager_common.base.BaseController; import com.shxy.xymanager_common.base.ResponseReult; import com.shxy.xymanager_common.entity.LeadPulls; +import com.shxy.xymanager_common.entity.View_Dy_Line_Tower_Terminals; +import com.shxy.xymanager_common.page.TableDataInfo; +import com.shxy.xymanager_common.vo.TerminalSelectVo; import com.shxy.xymanager_service.service.LeadPullsService; +import com.shxy.xymanager_service.service.TerminalService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; +import org.springframework.util.CollectionUtils; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @@ -22,6 +27,8 @@ public class LeadPullsController extends BaseController { @Resource LeadPullsService service; + @Resource + TerminalService terminalService; @GetMapping("list") @ApiOperation("查询列表") @@ -33,4 +40,24 @@ public class LeadPullsController extends BaseController { return ResponseReult.success(result); } + @GetMapping("latest") + @ApiOperation("查询最新的") + public ResponseReult> latest(Integer dyId, Integer lineId, Integer towerId, + int pageNum, int pageSize) { + TerminalSelectVo vo = new TerminalSelectVo(); + vo.setDyId(dyId); + vo.setLineId(lineId); + vo.setTowerId(towerId); + vo.setPageindex(pageNum); + vo.setPagesize(pageSize); + TableDataInfo result = terminalService.getTerminalList(vo).getData(); + if (!CollectionUtils.isEmpty(result.getList())) { + for (View_Dy_Line_Tower_Terminals terminals : result.getList()) { + LeadPulls last = service.getLast(terminals.getId()); + terminals.setLastLeadPulls(last); + } + } + return ResponseReult.success(result); + } + } diff --git a/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/WeatherController.java b/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/WeatherController.java index 2a302fd..bc50258 100644 --- a/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/WeatherController.java +++ b/xymanager_admin/src/main/java/com/shxy/xymanager_admin/controller/WeatherController.java @@ -3,11 +3,16 @@ package com.shxy.xymanager_admin.controller; import com.github.pagehelper.PageInfo; import com.shxy.xymanager_common.base.BaseController; import com.shxy.xymanager_common.base.ResponseReult; +import com.shxy.xymanager_common.entity.View_Dy_Line_Tower_Terminals; import com.shxy.xymanager_common.entity.Weathers; +import com.shxy.xymanager_common.page.TableDataInfo; +import com.shxy.xymanager_common.vo.TerminalSelectVo; +import com.shxy.xymanager_service.service.TerminalService; import com.shxy.xymanager_service.service.WeatherService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; +import org.springframework.util.CollectionUtils; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; @@ -20,6 +25,8 @@ public class WeatherController extends BaseController { @Resource WeatherService service; + @Resource + TerminalService terminalService; @GetMapping("list") @ApiOperation("查询列表") @@ -31,4 +38,24 @@ public class WeatherController extends BaseController { return ResponseReult.success(result); } + @GetMapping("latest") + @ApiOperation("查询最新的") + public ResponseReult> latest(Integer dyId, Integer lineId, Integer towerId, + int pageNum, int pageSize) { + TerminalSelectVo vo = new TerminalSelectVo(); + vo.setDyId(dyId); + vo.setLineId(lineId); + vo.setTowerId(towerId); + vo.setPageindex(pageNum); + vo.setPagesize(pageSize); + TableDataInfo result = terminalService.getTerminalList(vo).getData(); + if (!CollectionUtils.isEmpty(result.getList())) { + for (View_Dy_Line_Tower_Terminals terminals : result.getList()) { + Weathers last = service.getLast(terminals.getId()); + terminals.setLastWeathers(last); + } + } + return ResponseReult.success(result); + } + } diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/View_Dy_Line_Tower_Terminals.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/View_Dy_Line_Tower_Terminals.java index 1370f32..f6b8ef5 100644 --- a/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/View_Dy_Line_Tower_Terminals.java +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/View_Dy_Line_Tower_Terminals.java @@ -111,4 +111,7 @@ public class View_Dy_Line_Tower_Terminals implements Serializable { @ApiModelProperty(value = "通道编号和名称", example = "213") private List list; private static final long serialVersionUID = 1L; + + private Weathers lastWeathers; + private LeadPulls lastLeadPulls; } \ No newline at end of file diff --git a/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/LeadPullsServiceImpl.java b/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/LeadPullsServiceImpl.java index 88404a0..9ee5a23 100644 --- a/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/LeadPullsServiceImpl.java +++ b/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/LeadPullsServiceImpl.java @@ -11,6 +11,7 @@ import com.shxy.xymanager_service.service.LeadPullsService; import com.shxy.xymanager_service.service.TerminalService; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; import javax.annotation.Resource; import java.util.ArrayList; @@ -62,4 +63,19 @@ public class LeadPullsServiceImpl implements LeadPullsService { return new PageInfo<>(list); } + + @Override + public LeadPulls getLast(Integer termId) { + PageHelper.startPage(1, 1); + LeadPullsExample example = new LeadPullsExample(); + LeadPullsExample.Criteria criteria = example.createCriteria(); + criteria.andTermIdEqualTo(termId); + + List list = mapper.selectByExample(example); + if (CollectionUtils.isEmpty(list)) { + return null; + } else { + return list.get(0); + } + } } diff --git a/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/WeatherServiceImpl.java b/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/WeatherServiceImpl.java index 3b8de40..2b70fb5 100644 --- a/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/WeatherServiceImpl.java +++ b/xymanager_service/src/main/java/com/shxy/xymanager_service/impl/WeatherServiceImpl.java @@ -3,14 +3,13 @@ package com.shxy.xymanager_service.impl; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; -import com.shxy.xymanager_common.entity.Terminals; -import com.shxy.xymanager_common.entity.Weathers; -import com.shxy.xymanager_common.entity.WeathersExample; +import com.shxy.xymanager_common.entity.*; import com.shxy.xymanager_dao.dao.WeathersMapper; import com.shxy.xymanager_service.service.TerminalService; import com.shxy.xymanager_service.service.WeatherService; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; import javax.annotation.Resource; import java.util.ArrayList; @@ -62,4 +61,19 @@ public class WeatherServiceImpl implements WeatherService { return new PageInfo<>(list); } + + @Override + public Weathers getLast(Integer termId) { + PageHelper.startPage(1, 1); + WeathersExample example = new WeathersExample(); + WeathersExample.Criteria criteria = example.createCriteria(); + criteria.andTermIdEqualTo(termId); + + List list = mapper.selectByExample(example); + if (CollectionUtils.isEmpty(list)) { + return null; + } else { + return list.get(0); + } + } } diff --git a/xymanager_service/src/main/java/com/shxy/xymanager_service/service/LeadPullsService.java b/xymanager_service/src/main/java/com/shxy/xymanager_service/service/LeadPullsService.java index e154188..16657f6 100644 --- a/xymanager_service/src/main/java/com/shxy/xymanager_service/service/LeadPullsService.java +++ b/xymanager_service/src/main/java/com/shxy/xymanager_service/service/LeadPullsService.java @@ -9,4 +9,6 @@ public interface LeadPullsService { PageInfo list(Integer lineId, Integer towerId, Integer termId, Long start, Long end, int pageNum, int pageSize); + + LeadPulls getLast(Integer termId); } diff --git a/xymanager_service/src/main/java/com/shxy/xymanager_service/service/WeatherService.java b/xymanager_service/src/main/java/com/shxy/xymanager_service/service/WeatherService.java index 4e85af4..6fed825 100644 --- a/xymanager_service/src/main/java/com/shxy/xymanager_service/service/WeatherService.java +++ b/xymanager_service/src/main/java/com/shxy/xymanager_service/service/WeatherService.java @@ -9,4 +9,6 @@ public interface WeatherService { PageInfo list(Integer lineId, Integer towerId, Integer termId, Long start, Long end, int pageNum, int pageSize); + + Weathers getLast(Integer termId); } From b4cfe51ba46df5f2072cf6782d3631213621fe35 Mon Sep 17 00:00:00 2001 From: huangfeng Date: Wed, 27 Mar 2024 09:58:41 +0800 Subject: [PATCH 08/10] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9short=E6=88=90in?= =?UTF-8?q?t=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xymanager_common/entity/LeadPulls.java | 30 +++--- .../entity/LeadPullsExample.java | 100 +++++++++--------- .../xymanager_common/entity/Weathers.java | 18 ++-- .../entity/WeathersExample.java | 60 +++++------ .../resources/mappers/LeadPullsMapper.xml | 70 ++++++------ .../main/resources/mappers/WeathersMapper.xml | 42 ++++---- .../impl/LeadPullsServiceImpl.java | 22 ++-- .../impl/WeatherServiceImpl.java | 22 ++-- 8 files changed, 182 insertions(+), 182 deletions(-) diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/LeadPulls.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/LeadPulls.java index e315c9b..93da25d 100644 --- a/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/LeadPulls.java +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/LeadPulls.java @@ -37,7 +37,7 @@ public class LeadPulls { * * @mbg.generated */ - private Short funcCode; + private Integer funcCode; /** * @@ -46,7 +46,7 @@ public class LeadPulls { * * @mbg.generated */ - private Short maxpullPull; + private Integer maxpullPull; /** * @@ -73,7 +73,7 @@ public class LeadPulls { * * @mbg.generated */ - private Short minpullPull; + private Integer minpullPull; /** * @@ -100,7 +100,7 @@ public class LeadPulls { * * @mbg.generated */ - private Short maxwindPull; + private Integer maxwindPull; /** * @@ -127,7 +127,7 @@ public class LeadPulls { * * @mbg.generated */ - private Short minwindPull; + private Integer minwindPull; /** * @@ -254,7 +254,7 @@ public class LeadPulls { * * @mbg.generated */ - public Short getFuncCode() { + public Integer getFuncCode() { return funcCode; } @@ -266,7 +266,7 @@ public class LeadPulls { * * @mbg.generated */ - public void setFuncCode(Short funcCode) { + public void setFuncCode(Integer funcCode) { this.funcCode = funcCode; } @@ -278,7 +278,7 @@ public class LeadPulls { * * @mbg.generated */ - public Short getMaxpullPull() { + public Integer getMaxpullPull() { return maxpullPull; } @@ -290,7 +290,7 @@ public class LeadPulls { * * @mbg.generated */ - public void setMaxpullPull(Short maxpullPull) { + public void setMaxpullPull(Integer maxpullPull) { this.maxpullPull = maxpullPull; } @@ -350,7 +350,7 @@ public class LeadPulls { * * @mbg.generated */ - public Short getMinpullPull() { + public Integer getMinpullPull() { return minpullPull; } @@ -362,7 +362,7 @@ public class LeadPulls { * * @mbg.generated */ - public void setMinpullPull(Short minpullPull) { + public void setMinpullPull(Integer minpullPull) { this.minpullPull = minpullPull; } @@ -422,7 +422,7 @@ public class LeadPulls { * * @mbg.generated */ - public Short getMaxwindPull() { + public Integer getMaxwindPull() { return maxwindPull; } @@ -434,7 +434,7 @@ public class LeadPulls { * * @mbg.generated */ - public void setMaxwindPull(Short maxwindPull) { + public void setMaxwindPull(Integer maxwindPull) { this.maxwindPull = maxwindPull; } @@ -494,7 +494,7 @@ public class LeadPulls { * * @mbg.generated */ - public Short getMinwindPull() { + public Integer getMinwindPull() { return minwindPull; } @@ -506,7 +506,7 @@ public class LeadPulls { * * @mbg.generated */ - public void setMinwindPull(Short minwindPull) { + public void setMinwindPull(Integer minwindPull) { this.minwindPull = minwindPull; } diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/LeadPullsExample.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/LeadPullsExample.java index 48c2943..521d591 100644 --- a/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/LeadPullsExample.java +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/LeadPullsExample.java @@ -385,52 +385,52 @@ public class LeadPullsExample { return (Criteria) this; } - public Criteria andFuncCodeEqualTo(Short value) { + public Criteria andFuncCodeEqualTo(Integer value) { addCriterion("func_code =", value, "funcCode"); return (Criteria) this; } - public Criteria andFuncCodeNotEqualTo(Short value) { + public Criteria andFuncCodeNotEqualTo(Integer value) { addCriterion("func_code <>", value, "funcCode"); return (Criteria) this; } - public Criteria andFuncCodeGreaterThan(Short value) { + public Criteria andFuncCodeGreaterThan(Integer value) { addCriterion("func_code >", value, "funcCode"); return (Criteria) this; } - public Criteria andFuncCodeGreaterThanOrEqualTo(Short value) { + public Criteria andFuncCodeGreaterThanOrEqualTo(Integer value) { addCriterion("func_code >=", value, "funcCode"); return (Criteria) this; } - public Criteria andFuncCodeLessThan(Short value) { + public Criteria andFuncCodeLessThan(Integer value) { addCriterion("func_code <", value, "funcCode"); return (Criteria) this; } - public Criteria andFuncCodeLessThanOrEqualTo(Short value) { + public Criteria andFuncCodeLessThanOrEqualTo(Integer value) { addCriterion("func_code <=", value, "funcCode"); return (Criteria) this; } - public Criteria andFuncCodeIn(List values) { + public Criteria andFuncCodeIn(List values) { addCriterion("func_code in", values, "funcCode"); return (Criteria) this; } - public Criteria andFuncCodeNotIn(List values) { + public Criteria andFuncCodeNotIn(List values) { addCriterion("func_code not in", values, "funcCode"); return (Criteria) this; } - public Criteria andFuncCodeBetween(Short value1, Short value2) { + public Criteria andFuncCodeBetween(Integer value1, Integer value2) { addCriterion("func_code between", value1, value2, "funcCode"); return (Criteria) this; } - public Criteria andFuncCodeNotBetween(Short value1, Short value2) { + public Criteria andFuncCodeNotBetween(Integer value1, Integer value2) { addCriterion("func_code not between", value1, value2, "funcCode"); return (Criteria) this; } @@ -445,52 +445,52 @@ public class LeadPullsExample { return (Criteria) this; } - public Criteria andMaxpullPullEqualTo(Short value) { + public Criteria andMaxpullPullEqualTo(Integer value) { addCriterion("maxpull_pull =", value, "maxpullPull"); return (Criteria) this; } - public Criteria andMaxpullPullNotEqualTo(Short value) { + public Criteria andMaxpullPullNotEqualTo(Integer value) { addCriterion("maxpull_pull <>", value, "maxpullPull"); return (Criteria) this; } - public Criteria andMaxpullPullGreaterThan(Short value) { + public Criteria andMaxpullPullGreaterThan(Integer value) { addCriterion("maxpull_pull >", value, "maxpullPull"); return (Criteria) this; } - public Criteria andMaxpullPullGreaterThanOrEqualTo(Short value) { + public Criteria andMaxpullPullGreaterThanOrEqualTo(Integer value) { addCriterion("maxpull_pull >=", value, "maxpullPull"); return (Criteria) this; } - public Criteria andMaxpullPullLessThan(Short value) { + public Criteria andMaxpullPullLessThan(Integer value) { addCriterion("maxpull_pull <", value, "maxpullPull"); return (Criteria) this; } - public Criteria andMaxpullPullLessThanOrEqualTo(Short value) { + public Criteria andMaxpullPullLessThanOrEqualTo(Integer value) { addCriterion("maxpull_pull <=", value, "maxpullPull"); return (Criteria) this; } - public Criteria andMaxpullPullIn(List values) { + public Criteria andMaxpullPullIn(List values) { addCriterion("maxpull_pull in", values, "maxpullPull"); return (Criteria) this; } - public Criteria andMaxpullPullNotIn(List values) { + public Criteria andMaxpullPullNotIn(List values) { addCriterion("maxpull_pull not in", values, "maxpullPull"); return (Criteria) this; } - public Criteria andMaxpullPullBetween(Short value1, Short value2) { + public Criteria andMaxpullPullBetween(Integer value1, Integer value2) { addCriterion("maxpull_pull between", value1, value2, "maxpullPull"); return (Criteria) this; } - public Criteria andMaxpullPullNotBetween(Short value1, Short value2) { + public Criteria andMaxpullPullNotBetween(Integer value1, Integer value2) { addCriterion("maxpull_pull not between", value1, value2, "maxpullPull"); return (Criteria) this; } @@ -625,52 +625,52 @@ public class LeadPullsExample { return (Criteria) this; } - public Criteria andMinpullPullEqualTo(Short value) { + public Criteria andMinpullPullEqualTo(Integer value) { addCriterion("minpull_pull =", value, "minpullPull"); return (Criteria) this; } - public Criteria andMinpullPullNotEqualTo(Short value) { + public Criteria andMinpullPullNotEqualTo(Integer value) { addCriterion("minpull_pull <>", value, "minpullPull"); return (Criteria) this; } - public Criteria andMinpullPullGreaterThan(Short value) { + public Criteria andMinpullPullGreaterThan(Integer value) { addCriterion("minpull_pull >", value, "minpullPull"); return (Criteria) this; } - public Criteria andMinpullPullGreaterThanOrEqualTo(Short value) { + public Criteria andMinpullPullGreaterThanOrEqualTo(Integer value) { addCriterion("minpull_pull >=", value, "minpullPull"); return (Criteria) this; } - public Criteria andMinpullPullLessThan(Short value) { + public Criteria andMinpullPullLessThan(Integer value) { addCriterion("minpull_pull <", value, "minpullPull"); return (Criteria) this; } - public Criteria andMinpullPullLessThanOrEqualTo(Short value) { + public Criteria andMinpullPullLessThanOrEqualTo(Integer value) { addCriterion("minpull_pull <=", value, "minpullPull"); return (Criteria) this; } - public Criteria andMinpullPullIn(List values) { + public Criteria andMinpullPullIn(List values) { addCriterion("minpull_pull in", values, "minpullPull"); return (Criteria) this; } - public Criteria andMinpullPullNotIn(List values) { + public Criteria andMinpullPullNotIn(List values) { addCriterion("minpull_pull not in", values, "minpullPull"); return (Criteria) this; } - public Criteria andMinpullPullBetween(Short value1, Short value2) { + public Criteria andMinpullPullBetween(Integer value1, Integer value2) { addCriterion("minpull_pull between", value1, value2, "minpullPull"); return (Criteria) this; } - public Criteria andMinpullPullNotBetween(Short value1, Short value2) { + public Criteria andMinpullPullNotBetween(Integer value1, Integer value2) { addCriterion("minpull_pull not between", value1, value2, "minpullPull"); return (Criteria) this; } @@ -805,52 +805,52 @@ public class LeadPullsExample { return (Criteria) this; } - public Criteria andMaxwindPullEqualTo(Short value) { + public Criteria andMaxwindPullEqualTo(Integer value) { addCriterion("maxwind_pull =", value, "maxwindPull"); return (Criteria) this; } - public Criteria andMaxwindPullNotEqualTo(Short value) { + public Criteria andMaxwindPullNotEqualTo(Integer value) { addCriterion("maxwind_pull <>", value, "maxwindPull"); return (Criteria) this; } - public Criteria andMaxwindPullGreaterThan(Short value) { + public Criteria andMaxwindPullGreaterThan(Integer value) { addCriterion("maxwind_pull >", value, "maxwindPull"); return (Criteria) this; } - public Criteria andMaxwindPullGreaterThanOrEqualTo(Short value) { + public Criteria andMaxwindPullGreaterThanOrEqualTo(Integer value) { addCriterion("maxwind_pull >=", value, "maxwindPull"); return (Criteria) this; } - public Criteria andMaxwindPullLessThan(Short value) { + public Criteria andMaxwindPullLessThan(Integer value) { addCriterion("maxwind_pull <", value, "maxwindPull"); return (Criteria) this; } - public Criteria andMaxwindPullLessThanOrEqualTo(Short value) { + public Criteria andMaxwindPullLessThanOrEqualTo(Integer value) { addCriterion("maxwind_pull <=", value, "maxwindPull"); return (Criteria) this; } - public Criteria andMaxwindPullIn(List values) { + public Criteria andMaxwindPullIn(List values) { addCriterion("maxwind_pull in", values, "maxwindPull"); return (Criteria) this; } - public Criteria andMaxwindPullNotIn(List values) { + public Criteria andMaxwindPullNotIn(List values) { addCriterion("maxwind_pull not in", values, "maxwindPull"); return (Criteria) this; } - public Criteria andMaxwindPullBetween(Short value1, Short value2) { + public Criteria andMaxwindPullBetween(Integer value1, Integer value2) { addCriterion("maxwind_pull between", value1, value2, "maxwindPull"); return (Criteria) this; } - public Criteria andMaxwindPullNotBetween(Short value1, Short value2) { + public Criteria andMaxwindPullNotBetween(Integer value1, Integer value2) { addCriterion("maxwind_pull not between", value1, value2, "maxwindPull"); return (Criteria) this; } @@ -985,52 +985,52 @@ public class LeadPullsExample { return (Criteria) this; } - public Criteria andMinwindPullEqualTo(Short value) { + public Criteria andMinwindPullEqualTo(Integer value) { addCriterion("minwind_pull =", value, "minwindPull"); return (Criteria) this; } - public Criteria andMinwindPullNotEqualTo(Short value) { + public Criteria andMinwindPullNotEqualTo(Integer value) { addCriterion("minwind_pull <>", value, "minwindPull"); return (Criteria) this; } - public Criteria andMinwindPullGreaterThan(Short value) { + public Criteria andMinwindPullGreaterThan(Integer value) { addCriterion("minwind_pull >", value, "minwindPull"); return (Criteria) this; } - public Criteria andMinwindPullGreaterThanOrEqualTo(Short value) { + public Criteria andMinwindPullGreaterThanOrEqualTo(Integer value) { addCriterion("minwind_pull >=", value, "minwindPull"); return (Criteria) this; } - public Criteria andMinwindPullLessThan(Short value) { + public Criteria andMinwindPullLessThan(Integer value) { addCriterion("minwind_pull <", value, "minwindPull"); return (Criteria) this; } - public Criteria andMinwindPullLessThanOrEqualTo(Short value) { + public Criteria andMinwindPullLessThanOrEqualTo(Integer value) { addCriterion("minwind_pull <=", value, "minwindPull"); return (Criteria) this; } - public Criteria andMinwindPullIn(List values) { + public Criteria andMinwindPullIn(List values) { addCriterion("minwind_pull in", values, "minwindPull"); return (Criteria) this; } - public Criteria andMinwindPullNotIn(List values) { + public Criteria andMinwindPullNotIn(List values) { addCriterion("minwind_pull not in", values, "minwindPull"); return (Criteria) this; } - public Criteria andMinwindPullBetween(Short value1, Short value2) { + public Criteria andMinwindPullBetween(Integer value1, Integer value2) { addCriterion("minwind_pull between", value1, value2, "minwindPull"); return (Criteria) this; } - public Criteria andMinwindPullNotBetween(Short value1, Short value2) { + public Criteria andMinwindPullNotBetween(Integer value1, Integer value2) { addCriterion("minwind_pull not between", value1, value2, "minwindPull"); return (Criteria) this; } diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/Weathers.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/Weathers.java index f8a731b..edbf9a1 100644 --- a/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/Weathers.java +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/Weathers.java @@ -53,7 +53,7 @@ public class Weathers { * * @mbg.generated */ - private Short avgWindDir10min; + private Integer avgWindDir10min; /** * @@ -125,7 +125,7 @@ public class Weathers { * * @mbg.generated */ - private Short humidity; + private Integer humidity; /** * @@ -161,7 +161,7 @@ public class Weathers { * * @mbg.generated */ - private Short radiationIntensity; + private Integer radiationIntensity; /** * This method was generated by MyBatis Generator. @@ -291,7 +291,7 @@ public class Weathers { * * @mbg.generated */ - public Short getAvgWindDir10min() { + public Integer getAvgWindDir10min() { return avgWindDir10min; } @@ -303,7 +303,7 @@ public class Weathers { * * @mbg.generated */ - public void setAvgWindDir10min(Short avgWindDir10min) { + public void setAvgWindDir10min(Integer avgWindDir10min) { this.avgWindDir10min = avgWindDir10min; } @@ -483,7 +483,7 @@ public class Weathers { * * @mbg.generated */ - public Short getHumidity() { + public Integer getHumidity() { return humidity; } @@ -495,7 +495,7 @@ public class Weathers { * * @mbg.generated */ - public void setHumidity(Short humidity) { + public void setHumidity(Integer humidity) { this.humidity = humidity; } @@ -579,7 +579,7 @@ public class Weathers { * * @mbg.generated */ - public Short getRadiationIntensity() { + public Integer getRadiationIntensity() { return radiationIntensity; } @@ -591,7 +591,7 @@ public class Weathers { * * @mbg.generated */ - public void setRadiationIntensity(Short radiationIntensity) { + public void setRadiationIntensity(Integer radiationIntensity) { this.radiationIntensity = radiationIntensity; } diff --git a/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/WeathersExample.java b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/WeathersExample.java index 08d460d..79cce49 100644 --- a/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/WeathersExample.java +++ b/xymanager_common/src/main/java/com/shxy/xymanager_common/entity/WeathersExample.java @@ -514,52 +514,52 @@ public class WeathersExample { return (Criteria) this; } - public Criteria andAvgWindDir10minEqualTo(Short value) { + public Criteria andAvgWindDir10minEqualTo(Integer value) { addCriterion("avg_wind_dir_10min =", value, "avgWindDir10min"); return (Criteria) this; } - public Criteria andAvgWindDir10minNotEqualTo(Short value) { + public Criteria andAvgWindDir10minNotEqualTo(Integer value) { addCriterion("avg_wind_dir_10min <>", value, "avgWindDir10min"); return (Criteria) this; } - public Criteria andAvgWindDir10minGreaterThan(Short value) { + public Criteria andAvgWindDir10minGreaterThan(Integer value) { addCriterion("avg_wind_dir_10min >", value, "avgWindDir10min"); return (Criteria) this; } - public Criteria andAvgWindDir10minGreaterThanOrEqualTo(Short value) { + public Criteria andAvgWindDir10minGreaterThanOrEqualTo(Integer value) { addCriterion("avg_wind_dir_10min >=", value, "avgWindDir10min"); return (Criteria) this; } - public Criteria andAvgWindDir10minLessThan(Short value) { + public Criteria andAvgWindDir10minLessThan(Integer value) { addCriterion("avg_wind_dir_10min <", value, "avgWindDir10min"); return (Criteria) this; } - public Criteria andAvgWindDir10minLessThanOrEqualTo(Short value) { + public Criteria andAvgWindDir10minLessThanOrEqualTo(Integer value) { addCriterion("avg_wind_dir_10min <=", value, "avgWindDir10min"); return (Criteria) this; } - public Criteria andAvgWindDir10minIn(List values) { + public Criteria andAvgWindDir10minIn(List values) { addCriterion("avg_wind_dir_10min in", values, "avgWindDir10min"); return (Criteria) this; } - public Criteria andAvgWindDir10minNotIn(List values) { + public Criteria andAvgWindDir10minNotIn(List values) { addCriterion("avg_wind_dir_10min not in", values, "avgWindDir10min"); return (Criteria) this; } - public Criteria andAvgWindDir10minBetween(Short value1, Short value2) { + public Criteria andAvgWindDir10minBetween(Integer value1, Integer value2) { addCriterion("avg_wind_dir_10min between", value1, value2, "avgWindDir10min"); return (Criteria) this; } - public Criteria andAvgWindDir10minNotBetween(Short value1, Short value2) { + public Criteria andAvgWindDir10minNotBetween(Integer value1, Integer value2) { addCriterion("avg_wind_dir_10min not between", value1, value2, "avgWindDir10min"); return (Criteria) this; } @@ -994,52 +994,52 @@ public class WeathersExample { return (Criteria) this; } - public Criteria andHumidityEqualTo(Short value) { + public Criteria andHumidityEqualTo(Integer value) { addCriterion("humidity =", value, "humidity"); return (Criteria) this; } - public Criteria andHumidityNotEqualTo(Short value) { + public Criteria andHumidityNotEqualTo(Integer value) { addCriterion("humidity <>", value, "humidity"); return (Criteria) this; } - public Criteria andHumidityGreaterThan(Short value) { + public Criteria andHumidityGreaterThan(Integer value) { addCriterion("humidity >", value, "humidity"); return (Criteria) this; } - public Criteria andHumidityGreaterThanOrEqualTo(Short value) { + public Criteria andHumidityGreaterThanOrEqualTo(Integer value) { addCriterion("humidity >=", value, "humidity"); return (Criteria) this; } - public Criteria andHumidityLessThan(Short value) { + public Criteria andHumidityLessThan(Integer value) { addCriterion("humidity <", value, "humidity"); return (Criteria) this; } - public Criteria andHumidityLessThanOrEqualTo(Short value) { + public Criteria andHumidityLessThanOrEqualTo(Integer value) { addCriterion("humidity <=", value, "humidity"); return (Criteria) this; } - public Criteria andHumidityIn(List values) { + public Criteria andHumidityIn(List values) { addCriterion("humidity in", values, "humidity"); return (Criteria) this; } - public Criteria andHumidityNotIn(List values) { + public Criteria andHumidityNotIn(List values) { addCriterion("humidity not in", values, "humidity"); return (Criteria) this; } - public Criteria andHumidityBetween(Short value1, Short value2) { + public Criteria andHumidityBetween(Integer value1, Integer value2) { addCriterion("humidity between", value1, value2, "humidity"); return (Criteria) this; } - public Criteria andHumidityNotBetween(Short value1, Short value2) { + public Criteria andHumidityNotBetween(Integer value1, Integer value2) { addCriterion("humidity not between", value1, value2, "humidity"); return (Criteria) this; } @@ -1234,52 +1234,52 @@ public class WeathersExample { return (Criteria) this; } - public Criteria andRadiationIntensityEqualTo(Short value) { + public Criteria andRadiationIntensityEqualTo(Integer value) { addCriterion("radiation_Intensity =", value, "radiationIntensity"); return (Criteria) this; } - public Criteria andRadiationIntensityNotEqualTo(Short value) { + public Criteria andRadiationIntensityNotEqualTo(Integer value) { addCriterion("radiation_Intensity <>", value, "radiationIntensity"); return (Criteria) this; } - public Criteria andRadiationIntensityGreaterThan(Short value) { + public Criteria andRadiationIntensityGreaterThan(Integer value) { addCriterion("radiation_Intensity >", value, "radiationIntensity"); return (Criteria) this; } - public Criteria andRadiationIntensityGreaterThanOrEqualTo(Short value) { + public Criteria andRadiationIntensityGreaterThanOrEqualTo(Integer value) { addCriterion("radiation_Intensity >=", value, "radiationIntensity"); return (Criteria) this; } - public Criteria andRadiationIntensityLessThan(Short value) { + public Criteria andRadiationIntensityLessThan(Integer value) { addCriterion("radiation_Intensity <", value, "radiationIntensity"); return (Criteria) this; } - public Criteria andRadiationIntensityLessThanOrEqualTo(Short value) { + public Criteria andRadiationIntensityLessThanOrEqualTo(Integer value) { addCriterion("radiation_Intensity <=", value, "radiationIntensity"); return (Criteria) this; } - public Criteria andRadiationIntensityIn(List values) { + public Criteria andRadiationIntensityIn(List values) { addCriterion("radiation_Intensity in", values, "radiationIntensity"); return (Criteria) this; } - public Criteria andRadiationIntensityNotIn(List values) { + public Criteria andRadiationIntensityNotIn(List values) { addCriterion("radiation_Intensity not in", values, "radiationIntensity"); return (Criteria) this; } - public Criteria andRadiationIntensityBetween(Short value1, Short value2) { + public Criteria andRadiationIntensityBetween(Integer value1, Integer value2) { addCriterion("radiation_Intensity between", value1, value2, "radiationIntensity"); return (Criteria) this; } - public Criteria andRadiationIntensityNotBetween(Short value1, Short value2) { + public Criteria andRadiationIntensityNotBetween(Integer value1, Integer value2) { addCriterion("radiation_Intensity not between", value1, value2, "radiationIntensity"); return (Criteria) this; } diff --git a/xymanager_dao/src/main/resources/mappers/LeadPullsMapper.xml b/xymanager_dao/src/main/resources/mappers/LeadPullsMapper.xml index a5f6e57..4a7ef06 100644 --- a/xymanager_dao/src/main/resources/mappers/LeadPullsMapper.xml +++ b/xymanager_dao/src/main/resources/mappers/LeadPullsMapper.xml @@ -9,17 +9,17 @@ - - + + - + - + - + @@ -162,11 +162,11 @@ minwind_pull, minwind_wind, minwind_tilt, wid, wind_speed, create_time ) - values (#{termId,jdbcType=INTEGER}, #{updateTime,jdbcType=BIGINT}, #{funcCode,jdbcType=SMALLINT}, - #{maxpullPull,jdbcType=SMALLINT}, #{maxpullWind,jdbcType=REAL}, #{maxpullTilt,jdbcType=REAL}, - #{minpullPull,jdbcType=SMALLINT}, #{minpullWind,jdbcType=REAL}, #{minpullTilt,jdbcType=REAL}, - #{maxwindPull,jdbcType=SMALLINT}, #{maxwindWind,jdbcType=REAL}, #{maxwindTilt,jdbcType=REAL}, - #{minwindPull,jdbcType=SMALLINT}, #{minwindWind,jdbcType=REAL}, #{minwindTilt,jdbcType=REAL}, + values (#{termId,jdbcType=INTEGER}, #{updateTime,jdbcType=BIGINT}, #{funcCode,jdbcType=INTEGER}, + #{maxpullPull,jdbcType=INTEGER}, #{maxpullWind,jdbcType=REAL}, #{maxpullTilt,jdbcType=REAL}, + #{minpullPull,jdbcType=INTEGER}, #{minpullWind,jdbcType=REAL}, #{minpullTilt,jdbcType=REAL}, + #{maxwindPull,jdbcType=INTEGER}, #{maxwindWind,jdbcType=REAL}, #{maxwindTilt,jdbcType=REAL}, + #{minwindPull,jdbcType=INTEGER}, #{minwindWind,jdbcType=REAL}, #{minwindTilt,jdbcType=REAL}, #{wid,jdbcType=BIGINT}, #{windSpeed,jdbcType=REAL}, #{createTime,jdbcType=TIMESTAMP} ) @@ -243,10 +243,10 @@ #{updateTime,jdbcType=BIGINT}, - #{funcCode,jdbcType=SMALLINT}, + #{funcCode,jdbcType=INTEGER}, - #{maxpullPull,jdbcType=SMALLINT}, + #{maxpullPull,jdbcType=INTEGER}, #{maxpullWind,jdbcType=REAL}, @@ -255,7 +255,7 @@ #{maxpullTilt,jdbcType=REAL}, - #{minpullPull,jdbcType=SMALLINT}, + #{minpullPull,jdbcType=INTEGER}, #{minpullWind,jdbcType=REAL}, @@ -264,7 +264,7 @@ #{minpullTilt,jdbcType=REAL}, - #{maxwindPull,jdbcType=SMALLINT}, + #{maxwindPull,jdbcType=INTEGER}, #{maxwindWind,jdbcType=REAL}, @@ -273,7 +273,7 @@ #{maxwindTilt,jdbcType=REAL}, - #{minwindPull,jdbcType=SMALLINT}, + #{minwindPull,jdbcType=INTEGER}, #{minwindWind,jdbcType=REAL}, @@ -319,10 +319,10 @@ update_time = #{row.updateTime,jdbcType=BIGINT}, - func_code = #{row.funcCode,jdbcType=SMALLINT}, + func_code = #{row.funcCode,jdbcType=INTEGER}, - maxpull_pull = #{row.maxpullPull,jdbcType=SMALLINT}, + maxpull_pull = #{row.maxpullPull,jdbcType=INTEGER}, maxpull_wind = #{row.maxpullWind,jdbcType=REAL}, @@ -331,7 +331,7 @@ maxpull_tilt = #{row.maxpullTilt,jdbcType=REAL}, - minpull_pull = #{row.minpullPull,jdbcType=SMALLINT}, + minpull_pull = #{row.minpullPull,jdbcType=INTEGER}, minpull_wind = #{row.minpullWind,jdbcType=REAL}, @@ -340,7 +340,7 @@ minpull_tilt = #{row.minpullTilt,jdbcType=REAL}, - maxwind_pull = #{row.maxwindPull,jdbcType=SMALLINT}, + maxwind_pull = #{row.maxwindPull,jdbcType=INTEGER}, maxwind_wind = #{row.maxwindWind,jdbcType=REAL}, @@ -349,7 +349,7 @@ maxwind_tilt = #{row.maxwindTilt,jdbcType=REAL}, - minwind_pull = #{row.minwindPull,jdbcType=SMALLINT}, + minwind_pull = #{row.minwindPull,jdbcType=INTEGER}, minwind_wind = #{row.minwindWind,jdbcType=REAL}, @@ -380,17 +380,17 @@ set id = #{row.id,jdbcType=BIGINT}, term_id = #{row.termId,jdbcType=INTEGER}, update_time = #{row.updateTime,jdbcType=BIGINT}, - func_code = #{row.funcCode,jdbcType=SMALLINT}, - maxpull_pull = #{row.maxpullPull,jdbcType=SMALLINT}, + func_code = #{row.funcCode,jdbcType=INTEGER}, + maxpull_pull = #{row.maxpullPull,jdbcType=INTEGER}, maxpull_wind = #{row.maxpullWind,jdbcType=REAL}, maxpull_tilt = #{row.maxpullTilt,jdbcType=REAL}, - minpull_pull = #{row.minpullPull,jdbcType=SMALLINT}, + minpull_pull = #{row.minpullPull,jdbcType=INTEGER}, minpull_wind = #{row.minpullWind,jdbcType=REAL}, minpull_tilt = #{row.minpullTilt,jdbcType=REAL}, - maxwind_pull = #{row.maxwindPull,jdbcType=SMALLINT}, + maxwind_pull = #{row.maxwindPull,jdbcType=INTEGER}, maxwind_wind = #{row.maxwindWind,jdbcType=REAL}, maxwind_tilt = #{row.maxwindTilt,jdbcType=REAL}, - minwind_pull = #{row.minwindPull,jdbcType=SMALLINT}, + minwind_pull = #{row.minwindPull,jdbcType=INTEGER}, minwind_wind = #{row.minwindWind,jdbcType=REAL}, minwind_tilt = #{row.minwindTilt,jdbcType=REAL}, wid = #{row.wid,jdbcType=BIGINT}, @@ -414,10 +414,10 @@ update_time = #{updateTime,jdbcType=BIGINT}, - func_code = #{funcCode,jdbcType=SMALLINT}, + func_code = #{funcCode,jdbcType=INTEGER}, - maxpull_pull = #{maxpullPull,jdbcType=SMALLINT}, + maxpull_pull = #{maxpullPull,jdbcType=INTEGER}, maxpull_wind = #{maxpullWind,jdbcType=REAL}, @@ -426,7 +426,7 @@ maxpull_tilt = #{maxpullTilt,jdbcType=REAL}, - minpull_pull = #{minpullPull,jdbcType=SMALLINT}, + minpull_pull = #{minpullPull,jdbcType=INTEGER}, minpull_wind = #{minpullWind,jdbcType=REAL}, @@ -435,7 +435,7 @@ minpull_tilt = #{minpullTilt,jdbcType=REAL}, - maxwind_pull = #{maxwindPull,jdbcType=SMALLINT}, + maxwind_pull = #{maxwindPull,jdbcType=INTEGER}, maxwind_wind = #{maxwindWind,jdbcType=REAL}, @@ -444,7 +444,7 @@ maxwind_tilt = #{maxwindTilt,jdbcType=REAL}, - minwind_pull = #{minwindPull,jdbcType=SMALLINT}, + minwind_pull = #{minwindPull,jdbcType=INTEGER}, minwind_wind = #{minwindWind,jdbcType=REAL}, @@ -472,17 +472,17 @@ update lead_pulls set term_id = #{termId,jdbcType=INTEGER}, update_time = #{updateTime,jdbcType=BIGINT}, - func_code = #{funcCode,jdbcType=SMALLINT}, - maxpull_pull = #{maxpullPull,jdbcType=SMALLINT}, + func_code = #{funcCode,jdbcType=INTEGER}, + maxpull_pull = #{maxpullPull,jdbcType=INTEGER}, maxpull_wind = #{maxpullWind,jdbcType=REAL}, maxpull_tilt = #{maxpullTilt,jdbcType=REAL}, - minpull_pull = #{minpullPull,jdbcType=SMALLINT}, + minpull_pull = #{minpullPull,jdbcType=INTEGER}, minpull_wind = #{minpullWind,jdbcType=REAL}, minpull_tilt = #{minpullTilt,jdbcType=REAL}, - maxwind_pull = #{maxwindPull,jdbcType=SMALLINT}, + maxwind_pull = #{maxwindPull,jdbcType=INTEGER}, maxwind_wind = #{maxwindWind,jdbcType=REAL}, maxwind_tilt = #{maxwindTilt,jdbcType=REAL}, - minwind_pull = #{minwindPull,jdbcType=SMALLINT}, + minwind_pull = #{minwindPull,jdbcType=INTEGER}, minwind_wind = #{minwindWind,jdbcType=REAL}, minwind_tilt = #{minwindTilt,jdbcType=REAL}, wid = #{wid,jdbcType=BIGINT}, diff --git a/xymanager_dao/src/main/resources/mappers/WeathersMapper.xml b/xymanager_dao/src/main/resources/mappers/WeathersMapper.xml index 6759ad8..7693605 100644 --- a/xymanager_dao/src/main/resources/mappers/WeathersMapper.xml +++ b/xymanager_dao/src/main/resources/mappers/WeathersMapper.xml @@ -11,7 +11,7 @@ - + @@ -19,11 +19,11 @@ - + - +