package com.example.entity; import lombok.Data; import java.io.Serializable; @Data public class WzHouseMaintEntity implements Serializable { private static final long serialVersionUID = 1L; private Integer id; private String province; private String city; private String county; private Integer houseAgeLessThanTwenty; private Integer houseAgeBetweentTewntyAndForty; private Integer houseAgeMoreThanFortyOne; private Integer buildingAgeLessThanTwenty; private Integer buildingAgeBetweentTewntyAndForty; private Integer buildingAgeMoreThanFortyOne; private Integer houseAll; private Integer buildingAll; private String statisticalMonth; public void setAll(){ if(buildingAgeLessThanTwenty==null){ buildingAgeLessThanTwenty=0; } if(buildingAgeBetweentTewntyAndForty==null){ buildingAgeBetweentTewntyAndForty=0; } if(buildingAgeMoreThanFortyOne==null){ buildingAgeMoreThanFortyOne=0; } if(houseAgeLessThanTwenty==null){ houseAgeLessThanTwenty=0; } if(houseAgeBetweentTewntyAndForty==null){ houseAgeBetweentTewntyAndForty=0; } if(houseAgeMoreThanFortyOne==null){ houseAgeMoreThanFortyOne=0; } buildingAll=buildingAgeLessThanTwenty+buildingAgeBetweentTewntyAndForty+buildingAgeMoreThanFortyOne; houseAll=houseAgeLessThanTwenty+houseAgeBetweentTewntyAndForty+houseAgeMoreThanFortyOne; } }