Commit 72899a60 authored by tangwei's avatar tangwei

解决冲突

parents 83ed02a0 b8066a13
...@@ -16,23 +16,22 @@ import java.util.Date; ...@@ -16,23 +16,22 @@ import java.util.Date;
*/ */
@Data @Data
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@ApiModel(value="JpPersonStationDto", description="户用光伏监盘人员场站关系表") @ApiModel(value = "JpPersonStationDto", description = "户用光伏监盘人员场站关系表")
public class JpPersonStationDto extends BaseDto { public class JpPersonStationDto extends BaseDto {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "人员id")
private String personId;
@ApiModelProperty(value = "人员id") @ApiModelProperty(value = "场站id")
private String personId; private String stationId;
@ApiModelProperty(value = "场站id") @ApiModelProperty(value = "场站名称")
private Long stationId; private String stationName;
/**
* 业主名称
*/
@ApiModelProperty(value = "场站名称") private String owner;
private String stationName;
/**
* 业主名称
*/
private String owner;
} }
...@@ -6,6 +6,7 @@ import com.yeejoin.amos.boot.biz.common.dto.BaseDto; ...@@ -6,6 +6,7 @@ import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import java.util.Date; import java.util.Date;
import java.util.List;
/** /**
* 户用光伏监盘逆变器报警表 * 户用光伏监盘逆变器报警表
...@@ -51,5 +52,7 @@ public class TdHygfJpInverterWarnDto { ...@@ -51,5 +52,7 @@ public class TdHygfJpInverterWarnDto {
@ApiModelProperty(value = "时间") @ApiModelProperty(value = "时间")
private Long time; private Long time;
private List<String> stationIds;
} }
...@@ -32,7 +32,7 @@ public class JpPersonStation extends BaseEntity { ...@@ -32,7 +32,7 @@ public class JpPersonStation extends BaseEntity {
* 场站id * 场站id
*/ */
@TableField("station_id") @TableField("station_id")
private Long stationId; private String stationId;
/** /**
* 场站名称 * 场站名称
......
<?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.hygf.api.tdenginemapper.TdHygfJpInvertorElecHistoryMapper"> <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> </mapper>
...@@ -18,6 +18,7 @@ import com.yeejoin.amos.boot.biz.common.controller.BaseController; ...@@ -18,6 +18,7 @@ import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors;
import com.yeejoin.amos.boot.module.hygf.biz.service.impl.TdHygfJpInverterWarnServiceImpl; import com.yeejoin.amos.boot.module.hygf.biz.service.impl.TdHygfJpInverterWarnServiceImpl;
import org.typroject.tyboot.core.restful.utils.ResponseHelper; import org.typroject.tyboot.core.restful.utils.ResponseHelper;
...@@ -43,12 +44,13 @@ public class TdHygfJpInverterWarnController extends BaseController { ...@@ -43,12 +44,13 @@ public class TdHygfJpInverterWarnController extends BaseController {
@Autowired @Autowired
TdHygfJpInverterWarnServiceImpl tdHygfJpInverterWarnServiceImpl; TdHygfJpInverterWarnServiceImpl tdHygfJpInverterWarnServiceImpl;
@Autowired @Autowired
JpPersonStationMapper pPersonStationMapper; JpPersonStationMapper pPersonStationMapper;
@Autowired @Autowired
TdHygfJpInverterWarnMapper tdHygfJpInverterWarnMapper; TdHygfJpInverterWarnMapper tdHygfJpInverterWarnMapper;
@Autowired @Autowired
JpStationMapper jpStationMapper; JpStationMapper jpStationMapper;
/** /**
* 新增户用光伏监盘逆变器报警表 * 新增户用光伏监盘逆变器报警表
* *
...@@ -72,9 +74,9 @@ public class TdHygfJpInverterWarnController extends BaseController { ...@@ -72,9 +74,9 @@ public class TdHygfJpInverterWarnController extends BaseController {
@PutMapping(value = "/{sequenceNbr}") @PutMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "PUT", value = "根据sequenceNbr更新户用光伏监盘逆变器报警表", notes = "根据sequenceNbr更新户用光伏监盘逆变器报警表") @ApiOperation(httpMethod = "PUT", value = "根据sequenceNbr更新户用光伏监盘逆变器报警表", notes = "根据sequenceNbr更新户用光伏监盘逆变器报警表")
public ResponseModel<TdHygfJpInverterWarnDto> updateBySequenceNbrTdHygfJpInverterWarn(@RequestBody TdHygfJpInverterWarnDto model,@PathVariable(value = "sequenceNbr") Long sequenceNbr) { public ResponseModel<TdHygfJpInverterWarnDto> updateBySequenceNbrTdHygfJpInverterWarn(
return ResponseHelper.buildResponse(tdHygfJpInverterWarnServiceImpl.updateWithModel(model)); @RequestBody TdHygfJpInverterWarnDto model, @PathVariable(value = "sequenceNbr") Long sequenceNbr) {
return ResponseHelper.buildResponse(tdHygfJpInverterWarnServiceImpl.updateWithModel(model));
} }
...@@ -117,11 +119,22 @@ public class TdHygfJpInverterWarnController extends BaseController { ...@@ -117,11 +119,22 @@ public class TdHygfJpInverterWarnController extends BaseController {
@ApiOperation(httpMethod = "GET", value = "户用光伏监盘逆变器报警表分页查询", notes = "户用光伏监盘逆变器报警表分页查询") @ApiOperation(httpMethod = "GET", value = "户用光伏监盘逆变器报警表分页查询", notes = "户用光伏监盘逆变器报警表分页查询")
public ResponseModel<Page<TdHygfJpInverterWarnDto>> queryForPage(@RequestParam(value = "current") int current, public ResponseModel<Page<TdHygfJpInverterWarnDto>> queryForPage(@RequestParam(value = "current") int current,
@RequestParam(value = "size") int size, TdHygfJpInverterWarnDto tdHygfJpInverterWarnDto) { @RequestParam(value = "size") int size, TdHygfJpInverterWarnDto tdHygfJpInverterWarnDto) {
Page<TdHygfJpInverterWarnDto> page = new Page<TdHygfJpInverterWarnDto>(); LambdaQueryWrapper<JpPersonStation> qug = new LambdaQueryWrapper<>();
page.setCurrent(current); qug.eq(JpPersonStation::getPersonId, getUserInfo().getUserId());
page.setSize(size); List<JpPersonStation> pPersonStation = pPersonStationMapper.selectList(qug);
return ResponseHelper.buildResponse(
tdHygfJpInverterWarnServiceImpl.queryForTdHygfJpInverterWarnPage(page, tdHygfJpInverterWarnDto)); 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 { ...@@ -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.servlet.context-path=/hygf
server.port=33330 server.port=33330
server.uri-encoding=UTF-8 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