Commit 2643f2be authored by tangwei's avatar tangwei

修改冲突

parents 59ef65e7 a6a655fe
...@@ -19,12 +19,12 @@ public interface MonitorFanIndicatorMapper extends BaseMapper<MonitorFanIndicato ...@@ -19,12 +19,12 @@ public interface MonitorFanIndicatorMapper extends BaseMapper<MonitorFanIndicato
//批量修改 //批量修改
void UpdateMonitorFanIndicator(@Param(value = "list") List<IndexDto> list); void UpdateMonitorFanIndicator(@Param(value = "list") List<IndexDto> list);
Integer queryByPageTotal(@Param("fanCode") String fanCode, Integer queryByPageTotal(@Param("equipmentNumber") String equipmentNumber,
@Param("gateway") String gateway, @Param("gateway") String gateway,
@Param("frontModule") String frontModule); @Param("frontModule") String frontModule);
Page<MonitorFanIndicator> queryByPage(@Param("size") long size, List<MonitorFanIndicator> queryByPage(@Param("size") long size,
@Param("fanCode") String fanCode, @Param("equipmentNumber") String equipmentNumber,
@Param("gateway") String gateway, @Param("gateway") String gateway,
@Param("frontModule") String frontModule, @Param("frontModule") String frontModule,
@Param("offset") int offset); @Param("offset") int offset);
......
...@@ -39,8 +39,8 @@ ...@@ -39,8 +39,8 @@
<select id="queryByPage" resultType="com.yeejoin.amos.boot.module.jxiop.api.entity.MonitorFanIndicator"> <select id="queryByPage" resultType="com.yeejoin.amos.boot.module.jxiop.api.entity.MonitorFanIndicator">
select * from monitor_fan_indicator select * from monitor_fan_indicator
<where> <where>
<if test="fanCode != null and fanCode !=''"> <if test="equipmentNumber != null and equipmentNumber !=''">
fan_code like concat('%', #{fanCode},'%') equipment_number = #{equipmentNumber}
</if> </if>
<if test="gateway != null and gateway !=''"> <if test="gateway != null and gateway !=''">
AND gateway = #{gateway} AND gateway = #{gateway}
...@@ -55,8 +55,8 @@ ...@@ -55,8 +55,8 @@
<select id="queryByPageTotal" resultType="java.lang.Integer"> <select id="queryByPageTotal" resultType="java.lang.Integer">
select count(1) from monitor_fan_indicator select count(1) from monitor_fan_indicator
<where> <where>
<if test="fanCode != null and fanCode !=''"> <if test="equipmentNumber != null and equipmentNumber !=''">
fan_code like concat('%', #{fanCode},'%') equipment_number = #{equipmentNumber}
</if> </if>
<if test="gateway != null and gateway !=''"> <if test="gateway != null and gateway !=''">
AND gateway = #{gateway} AND gateway = #{gateway}
......
...@@ -143,7 +143,7 @@ ...@@ -143,7 +143,7 @@
WHERE WHERE
station_basic.sequence_nbr = #{sequence_nbr} station_basic.sequence_nbr = #{sequence_nbr}
</select> </select>
<select id="getStationBasicDtoList" resultType="com.yeejoin.amos.boot.module.jxiop.api.dto.StationBasicDto"> <select id="getStationBasicDtoList" resultType="com.yeejoin.amos.boot.module.jxiop.api.dto.StationTaksDto">
SELECT SELECT
station_number stationNumber, station_number stationNumber,
gateway_id gateway gateway_id gateway
......
...@@ -43,7 +43,7 @@ public class ClusterDbConfig { ...@@ -43,7 +43,7 @@ public class ClusterDbConfig {
private String driverClassName; private String driverClassName;
@Bean(name = "clusterDataSource") //声明其为Bean实例 @Bean(name = "clusterDataSource2") //声明其为Bean实例
public DataSource clusterDataSource() { public DataSource clusterDataSource() {
DruidDataSource datasource = new DruidDataSource(); DruidDataSource datasource = new DruidDataSource();
...@@ -60,7 +60,7 @@ public class ClusterDbConfig { ...@@ -60,7 +60,7 @@ public class ClusterDbConfig {
} }
@Bean(name = "clusterSqlSessionFactory") @Bean(name = "clusterSqlSessionFactory")
public SqlSessionFactory clusterSqlSessionFactory(@Qualifier("clusterDataSource") DataSource culsterDataSource) public SqlSessionFactory clusterSqlSessionFactory(@Qualifier("clusterDataSource2") DataSource culsterDataSource)
throws Exception { throws Exception {
final MybatisSqlSessionFactoryBean sessionFactory = new MybatisSqlSessionFactoryBean(); final MybatisSqlSessionFactoryBean sessionFactory = new MybatisSqlSessionFactoryBean();
sessionFactory.setDataSource(culsterDataSource); sessionFactory.setDataSource(culsterDataSource);
......
...@@ -34,14 +34,14 @@ public class MonitorFanIdxController extends BaseController { ...@@ -34,14 +34,14 @@ public class MonitorFanIdxController extends BaseController {
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY) @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@ApiOperation(value = "根据风机编码、网关ID、前段展示模块查询表数据") @ApiOperation(value = "根据设备编号、网关ID、前段展示模块查询表数据")
@GetMapping("/getFanIdxInfoByPage") @GetMapping("/getFanIdxInfoByPage")
public ResponseModel<IPage<MonitorFanIndicator>> getFanIdxInfoByPage(@RequestParam(value = "fanCode", required = false) String fanCode, public ResponseModel<IPage<MonitorFanIndicator>> getFanIdxInfoByPage(@RequestParam(value = "equipmentNumber", required = false) String equipmentNumber,
@RequestParam(value = "gateway", required = false) String gateway, @RequestParam(value = "gateway", required = false) String gateway,
@RequestParam(value = "frontModule", required = false) String frontModule, @RequestParam(value = "frontModule", required = false) String frontModule,
@RequestParam(value = "current", required = false) int current, @RequestParam(value = "current", required = false) int current,
@RequestParam(value = "size", required = false) int size) { @RequestParam(value = "size", required = false) int size) {
return ResponseHelper.buildResponse(monitorFanIndicator.getFanIdxInfoByPage(fanCode, gateway, frontModule, current, size)); return ResponseHelper.buildResponse(monitorFanIndicator.getFanIdxInfoByPage(equipmentNumber, gateway, frontModule, current, size));
} }
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY) @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
......
...@@ -51,12 +51,13 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator { ...@@ -51,12 +51,13 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
} }
public IPage<MonitorFanIndicator> getFanIdxInfoByPage(String fanCode, String gateway, String frontModule, int current, int size) { public IPage<MonitorFanIndicator> getFanIdxInfoByPage(String equipmentNumber, String gateway, String frontModule, int current, int size) {
Page<MonitorFanIndicator> page = new Page<>(current, size); Page<MonitorFanIndicator> page = new Page<>(current, size);
Integer integer = monitorFanIndicatorregionMapper.queryByPageTotal(fanCode, gateway, frontModule); Integer integer = monitorFanIndicatorregionMapper.queryByPageTotal(equipmentNumber, gateway, frontModule);
Page<MonitorFanIndicator> monitorFanIndicators = monitorFanIndicatorregionMapper.queryByPage(page.getSize(), fanCode, gateway, frontModule, (current - 1) * size); List<MonitorFanIndicator> monitorFanIndicators = monitorFanIndicatorregionMapper.queryByPage(page.getSize(), equipmentNumber, gateway, frontModule, (current - 1) * size);
monitorFanIndicators.setTotal(integer); page.setTotal(integer);
return monitorFanIndicators; page.setRecords(monitorFanIndicators);
return page;
} }
public TreeDto getTreeInfo(String sequenceNbr) { public TreeDto getTreeInfo(String sequenceNbr) {
......
...@@ -80,6 +80,8 @@ public class MonitoringServiceImpl { ...@@ -80,6 +80,8 @@ public class MonitoringServiceImpl {
}); });
regionNationWideDto.setFengdian(fengdian.toString()); regionNationWideDto.setFengdian(fengdian.toString());
regionNationWideDto.setGuangfu(guangfu.toString()); regionNationWideDto.setGuangfu(guangfu.toString());
regionNationWideDto.setGuangfuMW(guangfuMW.toString());
regionNationWideDto.setFengdianMV(fengdianMW.toString());
regionNationWideDto.setName(region.getRegionName()); regionNationWideDto.setName(region.getRegionName());
regionNationWideDtoList.add(regionNationWideDto); regionNationWideDtoList.add(regionNationWideDto);
} }
...@@ -94,7 +96,7 @@ public class MonitoringServiceImpl { ...@@ -94,7 +96,7 @@ public class MonitoringServiceImpl {
regionNationWideDto.setStaitionType(stationBasic.getStationType()); regionNationWideDto.setStaitionType(stationBasic.getStationType());
String speendOrirradiate = ""; String speendOrirradiate = "";
if(stationBasic.getStationType().equals("FDZ")){ if(stationBasic.getStationType().equals("FDZ")){
speendOrirradiate = (String) getIndicatoralueAvage(stationBasic.getGatewayId(),"30秒平均风速"); speendOrirradiate = String.valueOf( getIndicatoralueAvage(stationBasic.getGatewayId(),"30秒平均风速"));
regionNationWideDto.setSpeendOrirradiate(speendOrirradiate); regionNationWideDto.setSpeendOrirradiate(speendOrirradiate);
}else{ }else{
regionNationWideDto.setSpeendOrirradiate(String.valueOf(Math.random()*1000)); regionNationWideDto.setSpeendOrirradiate(String.valueOf(Math.random()*1000));
......
...@@ -57,6 +57,6 @@ public class SjglZsjZsbtzServiceImpl { ...@@ -57,6 +57,6 @@ public class SjglZsjZsbtzServiceImpl {
return sjglZsjZsbtzList; return sjglZsjZsbtzList;
} }
public Double getStationCapactityByStationWerks(String WERKS){ public Double getStationCapactityByStationWerks(String WERKS){
return this.sjglZsjZsbtzMapper.getStationCapactityByStationWerks(WERKS); return sjglZsjZsbtzMapper.getStationCapactityByStationWerks(WERKS);
} }
} }
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.amos.boot.module.jxiop.biz.mapper2.SjglZsjZsbtzMapper"> <mapper namespace="com.yeejoin.amos.boot.module.jxiop.biz.mapper2.SjglZsjZsbtzMapper">
<select id="getStationCapactityByStationWerks" resultType="Double">
select SUM(CAPACITYL) from sjgl_zsj_zsbtz where WERKS = #{WERKS}
</select>
</mapper> </mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment