yanghb
2025-04-25 39854ed874e1f38ce3f192ca8e0362a826cfdd55
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
 
package com.ruoyi.bussiness.object.response.placementApply;
 
import com.alibaba.excel.annotation.ExcelProperty;
import com.ruoyi.common.core.domain.entity.SysDictData;
import com.ruoyi.common.easyExcel.*;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
 
import javax.swing.*;
import java.math.BigDecimal;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
 
@Data
public class PlacementApplyTemplateResponse {
 
    @ApiModelProperty(value = "街道")
    @ExcelProperty(value = "镇(街道)", index = 0, converter = StringConverter.class)
    private String street;
 
    @ApiModelProperty(value = "项目名称")
    @ExcelProperty(value = "拆迁项目名称", index = 1, converter = StringConverter.class)
    private String projectName;
 
    @ApiModelProperty(value = "所在村(社区)")
    @ExcelProperty(value = "所在村(社区)", index = 2, converter = StringConverter.class)
    private String community;
 
    @ApiModelProperty(value = "拆迁时间")
    @ExcelProperty(value = "拆迁时间", index = 3, converter = DateConverter.class)
    private Date demolitionTime;
 
    @ApiModelProperty(value = "户主姓名")
    @ExcelProperty(value = "户主姓名", index = 4, converter = StringConverter.class)
    private String householdHead;
 
    @ApiModelProperty(value = "身份证")
    @ExcelProperty(value = "身份证号", index = 5, converter = StringConverter.class)
    private String idCard;
 
    @ApiModelProperty(value = "联系电话")
    @ExcelProperty(value = "联系电话", index = 6, converter = StringConverter.class)
    private String mobile;
 
    @ApiModelProperty(value = "本次安置人数(人)-集体经济组织成员")
    @ExcelProperty(value = {"本次安置人数(人)","集体经济组织成员"}, index = 7, converter = NumberConverter.class)
    private Integer currentCollectiveNum;
 
    @ApiModelProperty(value = "本次安置人数(人)-非集体经济组织成员")
    @ExcelProperty(value = {"本次安置人数(人)","非集体经济组织成员"}, index = 8, converter = NumberConverter.class)
    private Integer currentNoCollectiveNum;
 
    @ApiModelProperty(value = "本次安置人数(人)-合计")
    @ExcelProperty(value = {"本次安置人数(人)","合计"}, index = 9, converter = NumberConverter.class)
    private Integer currentCount;
 
    @ApiModelProperty(value = "待安置家庭成员姓名")
    @ExcelProperty(value = "待安置家庭成员姓名", index = 10, converter = StringConverter.class)
    private String waitFamilyNames;
 
    @ExcelProperty(value = "集体面积", index = 11, converter = BigDecimalConverter.class)
    @ApiModelProperty(value = "集体面积")
    private BigDecimal orgArea;
 
    @ExcelProperty(value = "非集体面积", index = 12, converter = BigDecimalConverter.class)
    @ApiModelProperty(value = "非集体面积")
    private BigDecimal noOrgArea;
 
    @ApiModelProperty(value = "待安置人员应安置面积合计(m²)")
    @ExcelProperty(value = "待安置人员应安置面积合计(m²)", index = 13, converter = BigDecimalConverter.class)
    private BigDecimal waitFamilyArea;
 
    @ApiModelProperty(value = "补偿金额(万元)-新建商品住房、商业用房、停车位")
    @ExcelProperty(value = {"补偿金额(万元)","新建商品住房、商业用房、停车位"}, index = 14, converter = BigDecimalConverter.class)
    private BigDecimal compensationNewAmount;
 
    @ApiModelProperty(value = "补偿金额(万元)-二手住房")
    @ExcelProperty(value = {"补偿金额(万元)","二手住房"}, index = 15, converter = StringConverter.class)
    private String compensationOldAmount;
 
    @ApiModelProperty(value = "补偿金额(合计)")
    @ExcelProperty(value = {"补偿金额(万元)","合计"}, index = 16, converter = StringConverter.class)
    private String compensationSum;
 
    @ApiModelProperty(value = "25%首付款(万元)")
    @ExcelProperty(value = "25%首付款(万元)", index = 17, converter = BigDecimalConverter.class)
    private BigDecimal downPaymentAmount;
 
    @ApiModelProperty(value = "每季度需支付款项(万元)")
    @ExcelProperty(value = "每季度需支付款项(万元)", index = 18, converter = BigDecimalConverter.class)
    private BigDecimal quarterPayAmount;
 
    @ApiModelProperty(value = "过渡补贴(万元)")
    @ExcelProperty(value = "过渡补贴(万元)", index = 19, converter = BigDecimalConverter.class)
    private BigDecimal subsidyAmount;
 
    @ApiModelProperty(value = "备注")
    @ExcelProperty(value = "备注", index = 20, converter = StringConverter.class)
    private String remark;
 
    @ApiModelProperty(value = "购房差异情况")
    @ExcelProperty(value = "购房差异情况", index = 21, converter = StringConverter.class)
    private String situation;
 
 
 
    public static PlacementApplyTemplateResponse generateExampleData() {
        PlacementApplyTemplateResponse exampleData = new PlacementApplyTemplateResponse();
        exampleData.setProjectName("示例项目");
        exampleData.setStreet("示例街道");
        exampleData.setCommunity("示例社区");
        exampleData.setDemolitionTime(new Date());
        exampleData.setHouseholdHead("示例外户主");
        exampleData.setIdCard("123456789012345678");
        exampleData.setMobile("13800138000");
        exampleData.setCurrentCollectiveNum(1);
        exampleData.setCurrentNoCollectiveNum(0);
        exampleData.setCurrentCount(1);
        exampleData.setWaitFamilyNames("示例外家庭成员");
        exampleData.setWaitFamilyArea(new BigDecimal("100.50"));
        exampleData.setCompensationNewAmount(new BigDecimal("500.00"));
        exampleData.setCompensationOldAmount("300.00");
        exampleData.setCompensationSum("800.00");
        exampleData.setDownPaymentAmount(new BigDecimal("200.00"));
        exampleData.setQuarterPayAmount(new BigDecimal("50.00"));
        exampleData.setSubsidyAmount(new BigDecimal("100.00"));
        exampleData.setRemark("示例外备注");
        exampleData.setSituation("示例外购房差异情况");
        exampleData.setOrgArea(BigDecimal.ZERO);
        exampleData.setNoOrgArea(BigDecimal.ZERO);
        return exampleData;
    }
 
    public static MultiDropdownWriteHandler generateHeaderData(List<SysDictData> street) {
        Map<Integer, String[]> dropdownOptionsMap = new HashMap<>();
        dropdownOptionsMap.put(0, street.stream()
                .map(SysDictData::getDictLabel)
                .toArray(String[]::new));
        return new MultiDropdownWriteHandler(dropdownOptionsMap);
    }
}