Commit fdd6fa0b authored by caotao's avatar caotao

户用光伏-运维工单代码调整。

parent 70a00dd4
...@@ -26,6 +26,10 @@ public class HYGFMaintenanceTicketsDto extends BaseDto { ...@@ -26,6 +26,10 @@ public class HYGFMaintenanceTicketsDto extends BaseDto {
*/ */
private String stationId; private String stationId;
/** /**
* 业主姓名
*/
private String ownerName;
/**
* 场站名称 * 场站名称
*/ */
private String stationName; private String stationName;
......
...@@ -85,4 +85,6 @@ public class TdHygfJpInverterWarnDto { ...@@ -85,4 +85,6 @@ public class TdHygfJpInverterWarnDto {
private List<String> states; private List<String> states;
private String name; private String name;
private String handlerStatus;
private List<String> listHandlerStatus;
} }
...@@ -29,6 +29,12 @@ public class HYGFMaintenanceTickets extends BaseEntity { ...@@ -29,6 +29,12 @@ public class HYGFMaintenanceTickets extends BaseEntity {
*/ */
@TableField("station_id") @TableField("station_id")
private String stationId; private String stationId;
/**
* 业主名称
*/
@TableField("owner_name")
private String ownerName;
/** /**
* 场站名称 * 场站名称
*/ */
......
...@@ -33,6 +33,12 @@ ...@@ -33,6 +33,12 @@
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="param.listHandlerStatus!=null">
AND handler_status IN
<foreach collection="param.listHandlerStatus" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</where> </where>
order by start_time DESC order by start_time DESC
......
...@@ -126,37 +126,37 @@ public class TdHygfJpInverterWarnController extends BaseController { ...@@ -126,37 +126,37 @@ public class TdHygfJpInverterWarnController extends BaseController {
* @param current 每页大小 * @param current 每页大小
* @return * @return
*/ */
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@GetMapping(value = "/page") @GetMapping(value = "/page")
@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) {
List<JpPersonStation> pPersonStation =null; // List<JpPersonStation> pPersonStation =null;
if(tdHygfJpInverterWarnDto.getName()!=null&&!"".equals(tdHygfJpInverterWarnDto.getName())){ // if(tdHygfJpInverterWarnDto.getName()!=null&&!"".equals(tdHygfJpInverterWarnDto.getName())){
LambdaQueryWrapper<JpPersonStation> qug1=new LambdaQueryWrapper<>(); // LambdaQueryWrapper<JpPersonStation> qug1=new LambdaQueryWrapper<>();
qug1.like(JpPersonStation::getStationName,tdHygfJpInverterWarnDto.getName()); // qug1.like(JpPersonStation::getStationName,tdHygfJpInverterWarnDto.getName());
pPersonStation=pPersonStationMapper.selectList(qug1); // pPersonStation=pPersonStationMapper.selectList(qug1);
}else{ // }else{
LambdaQueryWrapper<JpPersonStation> qug = new LambdaQueryWrapper<>(); // LambdaQueryWrapper<JpPersonStation> qug = new LambdaQueryWrapper<>();
qug.eq(JpPersonStation::getPersonId, getUserInfo().getUserId()); // qug.eq(JpPersonStation::getPersonId, getUserInfo().getUserId());
pPersonStation = pPersonStationMapper.selectList(qug); // pPersonStation = pPersonStationMapper.selectList(qug);
//
//
} // }
if (!pPersonStation.isEmpty()) { // if (!pPersonStation.isEmpty()) {
Page<TdHygfJpInverterWarnDto> page = new Page<TdHygfJpInverterWarnDto>(); Page<TdHygfJpInverterWarnDto> page = new Page<TdHygfJpInverterWarnDto>();
page.setCurrent(current); page.setCurrent(current);
page.setSize(size); page.setSize(size);
List<String> ids = pPersonStation.stream().map(i -> i.getStationId()).collect(Collectors.toList()); // List<String> ids = pPersonStation.stream().map(i -> i.getStationId()).collect(Collectors.toList());
tdHygfJpInverterWarnDto.setStationIds(ids); // tdHygfJpInverterWarnDto.setStationIds(ids);
return ResponseHelper.buildResponse( return ResponseHelper.buildResponse(
tdHygfJpInverterWarnServiceImpl.queryForTdHygfJpInverterWarnPage(page, tdHygfJpInverterWarnDto)); tdHygfJpInverterWarnServiceImpl.queryForTdHygfJpInverterWarnPage(page, tdHygfJpInverterWarnDto));
} else { // } else {
return ResponseHelper.buildResponse(new Page<TdHygfJpInverterWarnDto>()); // return ResponseHelper.buildResponse(new Page<TdHygfJpInverterWarnDto>());
} // }
} }
......
...@@ -100,9 +100,14 @@ public class MaintenanceResultHandlerMessage extends EmqxListener { ...@@ -100,9 +100,14 @@ public class MaintenanceResultHandlerMessage extends EmqxListener {
//纬度 //纬度
hygfMaintenanceTickets.setStationLatitude(jpStation.getLatitude()); hygfMaintenanceTickets.setStationLatitude(jpStation.getLatitude());
//电站联系人电话 //电站联系人电话
// hygfMaintenanceTickets.setStationContactPhone(jpStation.getContactPhone()); hygfMaintenanceTickets.setStationContactPhone(jpStation.getUserPhone());
//电站联系人 // 电站联系人
// hygfMaintenanceTickets.setStationContact(); hygfMaintenanceTickets.setStationContact(jpStation.getStationContact());
//业主姓名
hygfMaintenanceTickets.setOwnerName(jpStation.getUserName());
if(ObjectUtil.isEmpty(hygfMaintenanceTickets.getStationContact())){
hygfMaintenanceTickets.setStationContact(jpStation.getUserName());
}
} }
hygfMaintenanceTickets.setInverterSn(sncode); hygfMaintenanceTickets.setInverterSn(sncode);
hygfMaintenanceTickets.setWarningLevel(tdHygfJpInverterWarn.getLevel()); hygfMaintenanceTickets.setWarningLevel(tdHygfJpInverterWarn.getLevel());
......
...@@ -100,7 +100,8 @@ public class HYGFMaintenanceTicketsServiceImpl extends BaseService<HYGFMaintenan ...@@ -100,7 +100,8 @@ public class HYGFMaintenanceTicketsServiceImpl extends BaseService<HYGFMaintenan
specialMap.put("stationContactPhone", hygfMaintenanceTicketsDto.getStationContactPhone()); specialMap.put("stationContactPhone", hygfMaintenanceTicketsDto.getStationContactPhone());
//场站地址 //场站地址
specialMap.put("stationAddress", hygfMaintenanceTicketsDto.getStationAddress()); specialMap.put("stationAddress", hygfMaintenanceTicketsDto.getStationAddress());
//业主姓名
specialMap.put("ownerName", hygfMaintenanceTicketsDto.getOwnerName());
riskDynamicDetailsVoList.add(riskDynamicDetailsVo); riskDynamicDetailsVoList.add(riskDynamicDetailsVo);
bizInfo.put("sourceAttributionDesc", hygfMaintenanceTicketsDto.getStationName()); bizInfo.put("sourceAttributionDesc", hygfMaintenanceTicketsDto.getStationName());
bizInfo.put("sourceAttribution", hygfMaintenanceTicketsDto.getStationName()); bizInfo.put("sourceAttribution", hygfMaintenanceTicketsDto.getStationName());
......
package com.yeejoin.amos.boot.module.hygf.biz.service.impl; package com.yeejoin.amos.boot.module.hygf.biz.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
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.PageHelper;
...@@ -39,10 +40,10 @@ public class TdHygfJpInverterWarnServiceImpl ...@@ -39,10 +40,10 @@ public class TdHygfJpInverterWarnServiceImpl
int pageNum = (int) pageParam.getCurrent(); int pageNum = (int) pageParam.getCurrent();
int pageSize = (int) pageParam.getSize(); int pageSize = (int) pageParam.getSize();
PageHelper.startPage(pageNum, pageSize); PageHelper.startPage(pageNum, pageSize);
if (tdHygfJpInverterWarnDto.getState() != null) { // if (tdHygfJpInverterWarnDto.getState() != null) {
String[] s = tdHygfJpInverterWarnDto.getState().split(","); // String[] s = tdHygfJpInverterWarnDto.getState().split(",");
tdHygfJpInverterWarnDto.setStates(Arrays.asList(s)); // tdHygfJpInverterWarnDto.setStates(Arrays.asList(s));
} // }
if (tdHygfJpInverterWarnDto.getStationName() != null) { if (tdHygfJpInverterWarnDto.getStationName() != null) {
LambdaQueryWrapper<JpStation> wapper = new LambdaQueryWrapper<JpStation>().like(JpStation::getName, LambdaQueryWrapper<JpStation> wapper = new LambdaQueryWrapper<JpStation>().like(JpStation::getName,
tdHygfJpInverterWarnDto.getStationName()); tdHygfJpInverterWarnDto.getStationName());
...@@ -53,11 +54,17 @@ public class TdHygfJpInverterWarnServiceImpl ...@@ -53,11 +54,17 @@ public class TdHygfJpInverterWarnServiceImpl
List<String> ids = sList.stream().map(i -> i.getThirdStationId()).collect(Collectors.toList()); List<String> ids = sList.stream().map(i -> i.getThirdStationId()).collect(Collectors.toList());
tdHygfJpInverterWarnDto.setStationIds(ids); tdHygfJpInverterWarnDto.setStationIds(ids);
} }
if (tdHygfJpInverterWarnDto.getHandlerStatus() != null) {
String[] s = tdHygfJpInverterWarnDto.getHandlerStatus().split(",");
tdHygfJpInverterWarnDto.setListHandlerStatus(Arrays.asList(s));
}
List<TdHygfJpInverterWarnDto> list = new ArrayList<>(); List<TdHygfJpInverterWarnDto> list = new ArrayList<>();
if (tdHygfJpInverterWarnDto.getStationIds().isEmpty()) { // if (tdHygfJpInverterWarnDto.getStationIds().isEmpty()) {
//
// } else {
} else {
list = this.baseMapper.list(tdHygfJpInverterWarnDto); list = this.baseMapper.list(tdHygfJpInverterWarnDto);
if (!list.isEmpty()) { if (!list.isEmpty()) {
list.forEach(i -> { list.forEach(i -> {
JpStation jpStation = jpStationServiceImpl.getOne(new LambdaQueryWrapper<JpStation>() JpStation jpStation = jpStationServiceImpl.getOne(new LambdaQueryWrapper<JpStation>()
...@@ -72,7 +79,7 @@ public class TdHygfJpInverterWarnServiceImpl ...@@ -72,7 +79,7 @@ public class TdHygfJpInverterWarnServiceImpl
} }
}); });
} }
} // }
PageInfo<TdHygfJpInverterWarnDto> page = new PageInfo(list); PageInfo<TdHygfJpInverterWarnDto> page = new PageInfo(list);
com.baomidou.mybatisplus.extension.plugins.pagination.Page<TdHygfJpInverterWarnDto> pagenew = new com.baomidou.mybatisplus.extension.plugins.pagination.Page<TdHygfJpInverterWarnDto>(); com.baomidou.mybatisplus.extension.plugins.pagination.Page<TdHygfJpInverterWarnDto> pagenew = new com.baomidou.mybatisplus.extension.plugins.pagination.Page<TdHygfJpInverterWarnDto>();
pagenew.setCurrent(pageNum); pagenew.setCurrent(pageNum);
......
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