代码调整

This commit is contained in:
2023-07-14 21:37:54 +08:00
parent c7e0da8d1a
commit a9fae48c77
4 changed files with 27 additions and 2 deletions

View File

@@ -1,5 +1,6 @@
package com.njcn.process.pojo.po;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
@@ -106,12 +107,14 @@ public class SupvPlan extends BaseEntity {
* 计划执行开始时间
*/
@JsonFormat(pattern = "yyyy-MM-dd")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private LocalDate effectStartTime;
/**
* 计划执行结束时间
*/
@JsonFormat(pattern = "yyyy-MM-dd")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private LocalDate effectEndTime;
@@ -145,12 +148,14 @@ public class SupvPlan extends BaseEntity {
/**
* 关联电站
*/
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String substationName;
/**
* 关联电站电压等级
*/
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String substationVoltageLevel;
/**
@@ -163,16 +168,19 @@ public class SupvPlan extends BaseEntity {
/**
* 监督对象属性
*/
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String objType;
/**
* 监督对象属性名称
*/
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String objTypeName;
/**
* 监督对象协议容量(MVA)
*/
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Double objCapacity;
@@ -181,12 +189,14 @@ public class SupvPlan extends BaseEntity {
* 报告出具时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private LocalDateTime reportIssueTime;
/**
* 电能质量问题发生时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private LocalDateTime problemOcTime;

View File

@@ -1,5 +1,6 @@
package com.njcn.process.pojo.po;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
@@ -55,6 +56,7 @@ public class SupvProblem extends BaseEntity {
/**
* 整改时间
*/
@TableField(updateStrategy = FieldStrategy.IGNORED)
private LocalDate rectificationTime;
/**

View File

@@ -64,6 +64,7 @@ public class SupvPlanVO {
* 计划监督时间
*/
@ApiModelProperty(value = "计划监督时间",required = true)
@JsonFormat(pattern = "yyyy-MM")
private String planSupvDate;
/**

View File

@@ -161,10 +161,22 @@ public class SupvPlanServiceImpl extends ServiceImpl<SupvPlanMapper, SupvPlan> i
List<String> deptIds = deptFeignClient.getDepSonSelfCodetByCode(supvPlanParam.getSupvOrgId()).getData();
lambdaQueryWrapper.in(SupvPlan::getSupvOrgId, deptIds)
.between(SupvPlan::getCreateTime, LocalDateTimeUtil.beginOfDay(LocalDate.parse(supvPlanParam.getSearchBeginTime()).atStartOfDay()), LocalDateTimeUtil.endOfDay(LocalDate.parse(supvPlanParam.getSearchEndTime()).atStartOfDay()))
.eq(StrUtil.isNotBlank(supvPlanParam.getSupvType()),SupvPlan::getSupvType,supvPlanParam.getSupvType())
.orderByDesc(SupvPlan::getCreateTime);
.eq(StrUtil.isNotBlank(supvPlanParam.getSupvType()),SupvPlan::getSupvType,supvPlanParam.getSupvType());
}
if(StrUtil.isNotBlank(supvPlanParam.getSortBy())){
if(supvPlanParam.getOrderBy().equals("desc")){
lambdaQueryWrapper.orderByDesc(SupvPlan::getPlanSupvDate);
}else {
lambdaQueryWrapper.orderByAsc(SupvPlan::getPlanSupvDate);
}
}else {
lambdaQueryWrapper.orderByDesc(SupvPlan::getCreateTime);
}
List<PvTerminalTreeVO> deptList = deptFeignClient.allDeptList().getData();
Map<String, PvTerminalTreeVO> mapCode = deptList.stream().collect(Collectors.toMap(PvTerminalTreeVO::getCode, Function.identity()));
Map<String, PvTerminalTreeVO> mapList = deptList.stream().collect(Collectors.toMap(PvTerminalTreeVO::getId, Function.identity()));