yang_shj
2 years ago
14 changed files with 243 additions and 40 deletions
@ -0,0 +1,38 @@
|
||||
package com.hnac.hzims.operational.census.vo; |
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
||||
import com.fasterxml.jackson.databind.ser.std.NullSerializer; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
/** |
||||
* @author ysj |
||||
* @date 2023/03/14 15:01:17 |
||||
* @version 4.0.0 |
||||
*/ |
||||
@Data |
||||
public class DeviceGroupVo { |
||||
|
||||
@ApiModelProperty("区域Id") |
||||
private Long deptId; |
||||
|
||||
@ApiModelProperty("区域名称") |
||||
private String areaName; |
||||
|
||||
@ApiModelProperty("故障数量") |
||||
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||
private Long faultCount; |
||||
|
||||
@ApiModelProperty("检修数量") |
||||
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||
private Long overhaultCount; |
||||
|
||||
@ApiModelProperty("运行数量") |
||||
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||
private Long runCount; |
||||
|
||||
@ApiModelProperty("备用数量") |
||||
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||
private Long reserveCount; |
||||
|
||||
} |
@ -0,0 +1,25 @@
|
||||
package com.hnac.hzims.operational.census.vo; |
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
||||
import com.fasterxml.jackson.databind.ser.std.NullSerializer; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
/** |
||||
* @author ysj |
||||
* @date 2023/03/14 15:01:17 |
||||
* @version 4.0.0 |
||||
*/ |
||||
@Data |
||||
public class TicketGroupVo { |
||||
|
||||
@ApiModelProperty("区域Id") |
||||
private Long deptId; |
||||
|
||||
@ApiModelProperty("区域名称") |
||||
private String areaName; |
||||
|
||||
@ApiModelProperty("票据数量") |
||||
@JsonSerialize(nullsUsing = NullSerializer.class) |
||||
private Integer count; |
||||
} |
@ -0,0 +1,28 @@
|
||||
package com.hnac.hzims.operational.alert.wrapper; |
||||
|
||||
import com.hnac.hzims.operational.alert.vo.AlarmHandleVo; |
||||
import org.springblade.core.mp.support.BaseEntityWrapper; |
||||
import org.springblade.core.tool.utils.ObjectUtil; |
||||
import org.springblade.system.user.cache.UserCache; |
||||
import org.springblade.system.user.entity.User; |
||||
|
||||
import java.util.Optional; |
||||
|
||||
|
||||
public class HandleWrapper extends BaseEntityWrapper<AlarmHandleVo,AlarmHandleVo> { |
||||
|
||||
public static HandleWrapper build() { |
||||
return new HandleWrapper(); |
||||
} |
||||
|
||||
@Override |
||||
public AlarmHandleVo entityVO(AlarmHandleVo entity) { |
||||
User createUser = UserCache.getUser(entity.getCreateUser()); |
||||
if(ObjectUtil.isEmpty(createUser)){ |
||||
return entity; |
||||
} |
||||
assert entity != null; |
||||
entity.setUserName(Optional.ofNullable(createUser.getName()).orElse(null)); |
||||
return entity; |
||||
} |
||||
} |
Loading…
Reference in new issue