yanghb
2024-12-17 1287337fd0b0c156ec79712f9a600ebeffefe3a6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package com.zzg.system.domain.bo;
 
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
 
@Data
public class PolicyCompensationBO {
    @ApiModelProperty(value = "电话移机费用(元)", example = "200")
    private Integer telephoneRelocation = 0;
    private Double telephoneRelocationAmount;
 
    @ApiModelProperty(value = "有线电视迁装费用(元)", example = "150")
    private Integer cableTVRelocation = 0;
    private Double cableTVRelocationAmount;
 
    @ApiModelProperty(value = "空调移机费用(元)", example = "300")
    private Integer airConditionerRelocation = 0;
    private Double airConditionerRelocationAmount;
 
    @ApiModelProperty(value = "宽带迁装费用(元)", example = "100")
    private Integer broadbandRelocation = 0;
    private Double broadbandRelocationAmount;
 
    @ApiModelProperty(value = "一户一表安装费用(元)", example = "500")
    private Integer individualMeterInstallation = 0;
    private Double individualMeterInstallationAmount;
 
    @ApiModelProperty(value = "天然气初装费用(元)", example = "800")
    private Integer gasInitialInstallation = 0;
    private Double gasInitialInstallationAmount;
 
    @ApiModelProperty(value = "合计补偿 ")
    private Double policyCompensationMoney;
 
    public void calculateTotalAmount() {
        this.policyCompensationMoney = (telephoneRelocationAmount != null ? telephoneRelocationAmount : 0)
                + (cableTVRelocationAmount != null ? cableTVRelocationAmount : 0)
                + (airConditionerRelocationAmount != null ? airConditionerRelocationAmount : 0)
                + (broadbandRelocationAmount != null ? broadbandRelocationAmount : 0)
                + (individualMeterInstallationAmount != null ? individualMeterInstallationAmount : 0)
                + (gasInitialInstallationAmount != null ? gasInitialInstallationAmount : 0);
        if (this.policyCompensationMoney == 0.0) {
            this.policyCompensationMoney = null;
        }
    }
}