1.pms微调
This commit is contained in:
@@ -95,5 +95,8 @@ public class PmsTerminalParam {
|
||||
@NotNull(message = "是否是上送国网监测点不能为空")
|
||||
private Integer isUpToGrid;
|
||||
|
||||
@ApiModelProperty(name = "terminalCode", value = "同源装置编号")
|
||||
private String terminalCode;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ import lombok.EqualsAndHashCode;
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class TerminalQueryParam extends BaseParam {
|
||||
|
||||
@ApiModelProperty(value = "单位id")
|
||||
private String orgId;
|
||||
|
||||
@ApiModelProperty(value = "监测点状态(字典)")
|
||||
private String monitorState;
|
||||
|
||||
@@ -13,6 +13,7 @@ import com.njcn.device.pms.pojo.dto.PmsStatationStatInfoDTO;
|
||||
import com.njcn.device.pms.pojo.param.PmsBaseParam;
|
||||
import com.njcn.device.pms.pojo.param.StatationStatParam;
|
||||
import com.njcn.device.pms.pojo.param.PmsStatationStatInfoParam;
|
||||
import com.njcn.device.pms.pojo.param.TerminalQueryParam;
|
||||
import com.njcn.device.pms.pojo.po.PmsMidLedger;
|
||||
import com.njcn.device.pms.pojo.po.StatationStat;
|
||||
import com.njcn.device.pms.pojo.vo.StatationStatVO;
|
||||
@@ -140,7 +141,7 @@ public class PmsStatationStatController extends BaseController {
|
||||
@PostMapping("/getStatationStatPageList")
|
||||
@ApiOperation("分页获取电站列表")
|
||||
@ApiImplicitParam(name = "baseParam", value = "基本查询体", required = true)
|
||||
public HttpResult<Page<StatationStatVO>> getStatationStatPageList(@RequestBody BaseParam baseParam) {
|
||||
public HttpResult<Page<StatationStatVO>> getStatationStatPageList(@RequestBody TerminalQueryParam baseParam) {
|
||||
String methodDescribe = getMethodDescribe("getStatationStatPageList");
|
||||
Page<StatationStatVO> result = statationStatService.getStatationStatPageList(baseParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
|
||||
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njcn.device.pms.pojo.dto.PmsStatationStatInfoDTO;
|
||||
import com.njcn.device.pms.pojo.param.PmsStatationStatInfoParam;
|
||||
import com.njcn.device.pms.pojo.param.TerminalQueryParam;
|
||||
import com.njcn.device.pms.pojo.po.StatationStat;
|
||||
import com.njcn.device.pms.pojo.vo.StatationStatVO;
|
||||
import com.njcn.web.pojo.param.BaseParam;
|
||||
@@ -37,7 +38,7 @@ public interface StatationStatMapper extends BaseMapper<StatationStat> {
|
||||
* @author cdf
|
||||
* @date 2022/11/18
|
||||
*/
|
||||
Page<StatationStatVO> getStatationStatPageList(Page<StatationStatVO> page,@Param("baseParam") BaseParam baseParam);
|
||||
Page<StatationStatVO> getStatationStatPageList(Page<StatationStatVO> page, @Param("baseParam") TerminalQueryParam baseParam, @Param("orgIds")List<String> orgIds);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -49,6 +49,12 @@
|
||||
left join sys_dept b on a.org_id = b.code and b.state = 1
|
||||
left join pms_mid_ledger c on a.Mid_Station_Id = c.id
|
||||
where a.status = 1
|
||||
<if test="orgIds!=null and orgIds.size()>0">
|
||||
and a.Org_Id in
|
||||
<foreach collection="orgIds" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="baseParam.searchValue!=null and baseParam.searchValue!=''">
|
||||
and
|
||||
(
|
||||
@@ -57,6 +63,7 @@
|
||||
or b.name like concat('%',#{baseParam.searchValue},'%')
|
||||
)
|
||||
</if>
|
||||
|
||||
order by a.org_name,a.Power_Name asc
|
||||
</select>
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import com.njcn.device.pms.pojo.dto.PmsStatationStatInfoDTO;
|
||||
import com.njcn.device.pms.pojo.param.PmsBaseParam;
|
||||
import com.njcn.device.pms.pojo.param.StatationStatParam;
|
||||
import com.njcn.device.pms.pojo.param.PmsStatationStatInfoParam;
|
||||
import com.njcn.device.pms.pojo.param.TerminalQueryParam;
|
||||
import com.njcn.device.pms.pojo.po.PmsMidLedger;
|
||||
import com.njcn.device.pms.pojo.po.StatationStat;
|
||||
import com.njcn.device.pms.pojo.po.StatationStat;
|
||||
@@ -90,7 +91,7 @@ public interface IStatationStatService extends IService<StatationStat> {
|
||||
* @author cdf
|
||||
* @date 2022/10/25
|
||||
*/
|
||||
Page<StatationStatVO> getStatationStatPageList(BaseParam baseParam);
|
||||
Page<StatationStatVO> getStatationStatPageList(TerminalQueryParam baseParam);
|
||||
|
||||
/**
|
||||
* 获取变电站信息
|
||||
|
||||
@@ -17,6 +17,7 @@ import com.njcn.device.pms.pojo.dto.PmsStatationStatInfoDTO;
|
||||
import com.njcn.device.pms.pojo.param.PmsBaseParam;
|
||||
import com.njcn.device.pms.pojo.param.StatationStatParam;
|
||||
import com.njcn.device.pms.pojo.param.PmsStatationStatInfoParam;
|
||||
import com.njcn.device.pms.pojo.param.TerminalQueryParam;
|
||||
import com.njcn.device.pms.pojo.po.*;
|
||||
import com.njcn.device.pms.pojo.vo.StatationStatVO;
|
||||
import com.njcn.device.pms.service.majornetwork.*;
|
||||
@@ -223,8 +224,12 @@ public class StatationStatServiceImpl extends ServiceImpl<StatationStatMapper, S
|
||||
}
|
||||
|
||||
@Override
|
||||
public Page<StatationStatVO> getStatationStatPageList(BaseParam baseParam) {
|
||||
return this.baseMapper.getStatationStatPageList(new Page<>(PageFactory.getPageNum(baseParam), PageFactory.getPageSize(baseParam)), baseParam);
|
||||
public Page<StatationStatVO> getStatationStatPageList(TerminalQueryParam baseParam) {
|
||||
List<String> orgIds = new ArrayList<>();
|
||||
if(StrUtil.isNotBlank(baseParam.getOrgId())){
|
||||
orgIds.addAll(deptFeignClient.getDepSonSelfCodetByCode(baseParam.getOrgId()).getData());
|
||||
}
|
||||
return this.baseMapper.getStatationStatPageList(new Page<>(PageFactory.getPageNum(baseParam), PageFactory.getPageSize(baseParam)), baseParam,orgIds);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -32,6 +32,7 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
@@ -60,8 +61,14 @@ public class TerminalServiceImpl extends ServiceImpl<TerminalMapper, PmsTerminal
|
||||
@Override
|
||||
public Page<PmsTerminal> getTerminalList(TerminalQueryParam baseParam) {
|
||||
|
||||
List<String> orgIds = new ArrayList<>();
|
||||
if(StrUtil.isNotBlank(baseParam.getOrgId())){
|
||||
orgIds.addAll(deptFeignClient.getDepSonSelfCodetByCode(baseParam.getOrgId()).getData());
|
||||
}
|
||||
|
||||
LambdaQueryWrapper<PmsTerminal> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(PmsTerminal::getStatus,DataStateEnum.ENABLE.getCode())
|
||||
.in(PmsTerminal::getOrgId,orgIds)
|
||||
.eq(StrUtil.isNotBlank(baseParam.getDeviceCategory()),PmsTerminal::getDeviceCategory,baseParam.getDeviceCategory());
|
||||
if(StrUtil.isNotBlank(baseParam.getSearchValue())) {
|
||||
lambdaQueryWrapper.and(i -> i.like(PmsTerminal::getName, baseParam.getSearchValue())
|
||||
|
||||
Reference in New Issue
Block a user