Commit 2ecbea5a authored by tangwei's avatar tangwei

解决冲突

parents 5ef01947 14394887
...@@ -91,13 +91,4 @@ public class JpInverterDto extends BaseDto { ...@@ -91,13 +91,4 @@ public class JpInverterDto extends BaseDto {
@ApiModelProperty(value = "累计发电量") @ApiModelProperty(value = "累计发电量")
private Double totalPowerGeneration; private Double totalPowerGeneration;
@ApiModelProperty(value = "日用电量")
private Double dayPowerUse;
@ApiModelProperty(value = "月用电量")
private Double monthPowerUse;
@ApiModelProperty(value = "年用电量")
private Double yearPowerUse;
} }
...@@ -160,22 +160,4 @@ public class JpInverter extends BaseEntity { ...@@ -160,22 +160,4 @@ public class JpInverter extends BaseEntity {
@TableField("total_power_generation") @TableField("total_power_generation")
private Double totalPowerGeneration; private Double totalPowerGeneration;
/**
* 日用电量
*/
@TableField("day_power_use")
private Double dayPowerUse;
/**
* 月用电量
*/
@TableField("month_power_use")
private Double monthPowerUse;
/**
* 年用电量
*/
@TableField("year_power_use")
private Double yearPowerUse;
} }
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
<dependency> <dependency>
<groupId>com.qiyuesuo.sdk</groupId> <groupId>com.qiyuesuo.sdk</groupId>
<artifactId>sdk-java</artifactId> <artifactId>sdk-java</artifactId>
<version>3.0.0</version> <version>3.6.3</version>
</dependency> </dependency>
</dependencies> </dependencies>
......
...@@ -4,9 +4,18 @@ import com.yeejoin.amos.boot.module.hygf.api.entity.JpCollector; ...@@ -4,9 +4,18 @@ import com.yeejoin.amos.boot.module.hygf.api.entity.JpCollector;
import com.yeejoin.amos.boot.module.hygf.api.mapper.JpCollectorMapper; import com.yeejoin.amos.boot.module.hygf.api.mapper.JpCollectorMapper;
import com.yeejoin.amos.boot.module.hygf.api.service.IJpCollectorService; import com.yeejoin.amos.boot.module.hygf.api.service.IJpCollectorService;
import com.yeejoin.amos.boot.module.hygf.api.dto.JpCollectorDto; import com.yeejoin.amos.boot.module.hygf.api.dto.JpCollectorDto;
import com.yeejoin.amos.boot.module.hygf.api.dto.JpStationDto;
import org.typroject.tyboot.core.foundation.utils.Bean;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.rdbms.service.BaseService; import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
...@@ -25,9 +34,22 @@ public class JpCollectorServiceImpl extends BaseService<JpCollectorDto, JpCollec ...@@ -25,9 +34,22 @@ public class JpCollectorServiceImpl extends BaseService<JpCollectorDto, JpCollec
* 分页查询 * 分页查询
*/ */
public Page<JpCollectorDto> queryForJpCollectorPage(Page<JpCollectorDto> page, JpCollectorDto jpCollectorDto) { public Page<JpCollectorDto> queryForJpCollectorPage(Page<JpCollectorDto> page, JpCollectorDto jpCollectorDto) {
Map<String, Object> params = new HashMap<>(); Page<JpCollector> entiryPage = new Page<>(page.getCurrent(), page.getSize());
params.put("state", jpCollectorDto.getState()); LambdaQueryWrapper<JpCollector> wrapper = new LambdaQueryWrapper<>();
return this.queryForPage(page, null, false,params); if (jpCollectorDto.getState() != null) {
wrapper.eq(JpCollector::getState, jpCollectorDto.getState());
}
entiryPage = (Page<JpCollector>) this.page(entiryPage, wrapper);
if (!ValidationUtil.isEmpty(entiryPage.getRecords())) {
page.setTotal(entiryPage.getTotal());
page.setPages(entiryPage.getPages());
page.setCurrent(entiryPage.getCurrent());
page.setSize(entiryPage.getSize());
if (!ValidationUtil.isEmpty(entiryPage.getRecords()))
page.setRecords(Bean.toModels(entiryPage.getRecords(), this.getModelClass()));
}
return page;
} }
/** /**
......
package com.yeejoin.amos.boot.module.hygf.biz.service.impl; package com.yeejoin.amos.boot.module.hygf.biz.service.impl;
import java.util.List;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.foundation.utils.Bean;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.hygf.api.dto.JpInverterDto;
import com.yeejoin.amos.boot.module.hygf.api.entity.JpInverter; import com.yeejoin.amos.boot.module.hygf.api.entity.JpInverter;
import com.yeejoin.amos.boot.module.hygf.api.mapper.JpInverterMapper; import com.yeejoin.amos.boot.module.hygf.api.mapper.JpInverterMapper;
import com.yeejoin.amos.boot.module.hygf.api.service.IJpInverterService; import com.yeejoin.amos.boot.module.hygf.api.service.IJpInverterService;
import com.yeejoin.amos.boot.module.hygf.api.dto.JpInverterDto;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/** /**
* 户用光伏监盘逆变器表服务实现类 * 户用光伏监盘逆变器表服务实现类
...@@ -25,9 +27,22 @@ public class JpInverterServiceImpl extends BaseService<JpInverterDto, JpInverter ...@@ -25,9 +27,22 @@ public class JpInverterServiceImpl extends BaseService<JpInverterDto, JpInverter
* 分页查询 * 分页查询
*/ */
public Page<JpInverterDto> queryForJpInverterPage(Page<JpInverterDto> page, JpInverterDto jpInverterDto) { public Page<JpInverterDto> queryForJpInverterPage(Page<JpInverterDto> page, JpInverterDto jpInverterDto) {
Map<String, Object> params = new HashMap<>(); Page<JpInverter> entiryPage = new Page<>(page.getCurrent(), page.getSize());
params.put("state", jpInverterDto.getState()); LambdaQueryWrapper<JpInverter> wrapper = new LambdaQueryWrapper<>();
return this.queryForPage(page, null, false, params); if (jpInverterDto.getState() != null) {
wrapper.eq(JpInverter::getState, jpInverterDto.getState());
}
entiryPage = (Page<JpInverter>) this.page(entiryPage, wrapper);
if (!ValidationUtil.isEmpty(entiryPage.getRecords())) {
page.setTotal(entiryPage.getTotal());
page.setPages(entiryPage.getPages());
page.setCurrent(entiryPage.getCurrent());
page.setSize(entiryPage.getSize());
if (!ValidationUtil.isEmpty(entiryPage.getRecords()))
page.setRecords(Bean.toModels(entiryPage.getRecords(), this.getModelClass()));
}
return page;
} }
/** /**
......
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