Commit 72899a60 authored by tangwei's avatar tangwei

解决冲突

parents 83ed02a0 b8066a13
......@@ -16,17 +16,16 @@ import java.util.Date;
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value="JpPersonStationDto", description="户用光伏监盘人员场站关系表")
@ApiModel(value = "JpPersonStationDto", description = "户用光伏监盘人员场站关系表")
public class JpPersonStationDto extends BaseDto {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "人员id")
private String personId;
@ApiModelProperty(value = "场站id")
private Long stationId;
private String stationId;
@ApiModelProperty(value = "场站名称")
private String stationName;
......
......@@ -6,6 +6,7 @@ import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
import java.util.List;
/**
* 户用光伏监盘逆变器报警表
......@@ -52,4 +53,6 @@ public class TdHygfJpInverterWarnDto {
@ApiModelProperty(value = "时间")
private Long time;
private List<String> stationIds;
}
......@@ -32,7 +32,7 @@ public class JpPersonStation extends BaseEntity {
* 场站id
*/
@TableField("station_id")
private Long stationId;
private String stationId;
/**
* 场站名称
......
<?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">
<mapper namespace="com.yeejoin.amos.boot.module.hygf.api.tdenginemapper.TdHygfJpInvertorElecHistoryMapper">
<select id="list" resultType="com.yeejoin.amos.boot.module.hygf.api.dto.TdHygfJpInverterWarnDto">
SELECT * FROM house_pv_data.td_hygf_jp_inverter_warn
<where>
<if test="param.state!=null">
`state` = #{param.state}
</if>
</where>
</select>
</mapper>
......@@ -18,6 +18,7 @@ import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import com.yeejoin.amos.boot.module.hygf.biz.service.impl.TdHygfJpInverterWarnServiceImpl;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
......@@ -49,6 +50,7 @@ public class TdHygfJpInverterWarnController extends BaseController {
TdHygfJpInverterWarnMapper tdHygfJpInverterWarnMapper;
@Autowired
JpStationMapper jpStationMapper;
/**
* 新增户用光伏监盘逆变器报警表
*
......@@ -72,10 +74,10 @@ public class TdHygfJpInverterWarnController extends BaseController {
@PutMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "PUT", value = "根据sequenceNbr更新户用光伏监盘逆变器报警表", notes = "根据sequenceNbr更新户用光伏监盘逆变器报警表")
public ResponseModel<TdHygfJpInverterWarnDto> updateBySequenceNbrTdHygfJpInverterWarn(@RequestBody TdHygfJpInverterWarnDto model,@PathVariable(value = "sequenceNbr") Long sequenceNbr) {
public ResponseModel<TdHygfJpInverterWarnDto> updateBySequenceNbrTdHygfJpInverterWarn(
@RequestBody TdHygfJpInverterWarnDto model, @PathVariable(value = "sequenceNbr") Long sequenceNbr) {
return ResponseHelper.buildResponse(tdHygfJpInverterWarnServiceImpl.updateWithModel(model));
}
/**
......@@ -117,11 +119,22 @@ public class TdHygfJpInverterWarnController extends BaseController {
@ApiOperation(httpMethod = "GET", value = "户用光伏监盘逆变器报警表分页查询", notes = "户用光伏监盘逆变器报警表分页查询")
public ResponseModel<Page<TdHygfJpInverterWarnDto>> queryForPage(@RequestParam(value = "current") int current,
@RequestParam(value = "size") int size, TdHygfJpInverterWarnDto tdHygfJpInverterWarnDto) {
LambdaQueryWrapper<JpPersonStation> qug = new LambdaQueryWrapper<>();
qug.eq(JpPersonStation::getPersonId, getUserInfo().getUserId());
List<JpPersonStation> pPersonStation = pPersonStationMapper.selectList(qug);
if (!pPersonStation.isEmpty()) {
Page<TdHygfJpInverterWarnDto> page = new Page<TdHygfJpInverterWarnDto>();
page.setCurrent(current);
page.setSize(size);
List<String> ids = pPersonStation.stream().map(i -> i.getStationId()).collect(Collectors.toList());
tdHygfJpInverterWarnDto.setStationIds(ids);
return ResponseHelper.buildResponse(
tdHygfJpInverterWarnServiceImpl.queryForTdHygfJpInverterWarnPage(page, tdHygfJpInverterWarnDto));
} else {
return ResponseHelper.buildResponse(new Page<TdHygfJpInverterWarnDto>());
}
}
/**
......@@ -169,5 +182,37 @@ public class TdHygfJpInverterWarnController extends BaseController {
}
// /**
// * 获取告警统计
// **/
// @TycloudOperation(ApiLevel = UserType.AGENCY)
// @ApiOperation(httpMethod = "GET", value = "户用光伏监盘逆变器报警表列表全部数据查询", notes = "户用光伏监盘逆变器报警表列表全部数据查询")
// @GetMapping(value = "/selectcount")
// public ResponseModel<List<Map<String, Object>>> selectcount(JpStationDto reviewDto) {
// LambdaQueryWrapper<JpStation> qugda = new LambdaQueryWrapper<>();
// // 获取当前人管理场站
// if (reviewDto.getThirdStationId() == null) {
// // 获取当前人管理场站
// LambdaQueryWrapper<JpPersonStation> qug = new LambdaQueryWrapper<>();
// qug.eq(JpPersonStation::getPersonId, getUserInfo().getUserId());
// List<JpPersonStation> pPersonStation = pPersonStationMapper.selectList(qug);
// List ids = null;
// if (pPersonStation != null && !pPersonStation.isEmpty()) {
// ids = new ArrayList();
// for (JpPersonStation jpPersonStation : pPersonStation) {
// ids.add(jpPersonStation.getStationId());
// }
// qugda.in(ids != null, JpStation::getThirdStationId, ids);
// }
// } else {
// qugda.eq(JpStation::getThirdStationId, reviewDto.getThirdStationId());
// }
// qugda.like(reviewDto.getUserName() != null, JpStation::getUserName, reviewDto.getUserName());
// qugda.like(reviewDto.getArea() != null, JpStation::getArea, reviewDto.getArea());
// List<JpStation> pPersonStation = jpStationMapper.selectList(qugda);
// List<Map<String, Object>> datalist = tdHygfJpInverterWarnMapper.getCountTdHygfJpInverterWarn(pPersonStation);
// return ResponseHelper.buildResponse(datalist);
// }
}
spring.application.name=AMOS-HYGF
spring.application.name=AMOS-HYGF-WJ
server.servlet.context-path=/hygf
server.port=33330
server.uri-encoding=UTF-8
......
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