package com.moral.api.pojo.vo.allocation;
|
|
|
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModelProperty;
|
import lombok.Data;
|
import lombok.EqualsAndHashCode;
|
import lombok.experimental.Accessors;
|
import java.io.Serializable;
|
import java.util.Date;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.moral.api.pojo.enums.AllocationApproveEnum;
|
import com.moral.util.DateUtils;
|
|
@Data
|
@EqualsAndHashCode(callSuper = false)
|
@Accessors(chain = true)
|
@ApiModel(value="Allocation - 查询VO对象", description="Allocation - 查询VO对象")
|
public class AllocationFindVo implements Serializable {
|
|
|
|
@ApiModelProperty(value = "主键id")
|
private Integer allocationId;
|
|
@ApiModelProperty(value = "交办单号")
|
private String allocationNum;
|
|
@ApiModelProperty(value = "上报时间")
|
@JsonFormat(pattern="yyyy-MM-dd")
|
private Date escalationTime;
|
|
@ApiModelProperty(value = "责任单位id")
|
private Integer unitId;
|
|
@ApiModelProperty(value = "污染分类id")
|
private Integer polluteType;
|
|
@ApiModelProperty(value = "整改类型id")
|
private Integer changeType;
|
@ApiModelProperty(value = "污染位置")
|
private String pollutePosition;
|
|
@ApiModelProperty(value = "纬度")
|
private String latitude;
|
|
@ApiModelProperty(value = "经度")
|
private String longitude;
|
|
@ApiModelProperty(value = "省市区地址")
|
private String address;
|
|
@ApiModelProperty(value = "详细地址")
|
private String name;
|
@ApiModelProperty(value = "期限天数")
|
private Integer changeDay;
|
|
@ApiModelProperty(value = "剩余天数")
|
private Integer residueDay;
|
|
@ApiModelProperty(value = "上报单位id")
|
private Integer escalationUnitId;
|
|
@ApiModelProperty(value = "上报人")
|
private String escalationName;
|
|
@ApiModelProperty(value = "排查方式id")
|
private Integer investigationType;
|
|
@ApiModelProperty(value = "状态")
|
private Integer state;
|
|
@ApiModelProperty(value = "是否作废")
|
private Integer isInvalid;
|
|
@ApiModelProperty(value = "能否审批")
|
private Integer isApprove;
|
|
@ApiModelProperty(value = "状态名字")
|
private String stateName;
|
|
public Integer getResidueDay() {
|
int day = this.changeDay;
|
if(AllocationApproveEnum.UNDER_RECTIFICATION.value.equals(state)){
|
Date date = new Date();
|
int days = DateUtils.getDays(escalationTime, date);
|
return day-days;
|
}
|
return day;
|
}
|
|
}
|