Commit fdd6fa0b authored by caotao's avatar caotao

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

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