Commit 2ecbea5a authored by tangwei's avatar tangwei

解决冲突

parents 5ef01947 14394887
......@@ -91,13 +91,4 @@ public class JpInverterDto extends BaseDto {
@ApiModelProperty(value = "累计发电量")
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 {
@TableField("total_power_generation")
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 @@
<dependency>
<groupId>com.qiyuesuo.sdk</groupId>
<artifactId>sdk-java</artifactId>
<version>3.0.0</version>
<version>3.6.3</version>
</dependency>
</dependencies>
......
......@@ -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.service.IJpCollectorService;
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.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.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import java.util.HashMap;
import java.util.List;
......@@ -25,9 +34,22 @@ public class JpCollectorServiceImpl extends BaseService<JpCollectorDto, JpCollec
* 分页查询
*/
public Page<JpCollectorDto> queryForJpCollectorPage(Page<JpCollectorDto> page, JpCollectorDto jpCollectorDto) {
Map<String, Object> params = new HashMap<>();
params.put("state", jpCollectorDto.getState());
return this.queryForPage(page, null, false,params);
Page<JpCollector> entiryPage = new Page<>(page.getCurrent(), page.getSize());
LambdaQueryWrapper<JpCollector> wrapper = new LambdaQueryWrapper<>();
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;
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.mapper.JpInverterMapper;
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
* 分页查询
*/
public Page<JpInverterDto> queryForJpInverterPage(Page<JpInverterDto> page, JpInverterDto jpInverterDto) {
Map<String, Object> params = new HashMap<>();
params.put("state", jpInverterDto.getState());
return this.queryForPage(page, null, false, params);
Page<JpInverter> entiryPage = new Page<>(page.getCurrent(), page.getSize());
LambdaQueryWrapper<JpInverter> wrapper = new LambdaQueryWrapper<>();
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