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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
 
package com.ruoyi.bussiness.object.response.placementBatch;
 
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
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 java.math.BigDecimal;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
 
@Data
public class PlacementHouseholdTemplateResponse {
 
    @ExcelProperty(value = "镇(街道)", index = 0, converter = StringConverter.class)
    @ApiModelProperty(value = "街道")
    private String street;
 
    @ExcelProperty(value = "拆迁项目名称", index = 1, converter = StringConverter.class)
    @ApiModelProperty(value = "拆迁项目名称")
    private String projectName;
 
    @ExcelProperty(value = "所在村(社区)", index = 2, converter = StringConverter.class)
    @ApiModelProperty(value = "所在村(社区)")
    private String community;
 
    @ExcelProperty(value = "拆迁时间", index = 3, converter = DateConverter.class)
    @DateTimeFormat(pattern = "yyyy/MM/dd")
    @ApiModelProperty(value = "拆迁时间")
    private Date demolitionTime;
 
    @ExcelProperty(value = "户主姓名", index = 4, converter = StringConverter.class)
    @ApiModelProperty(value = "户主姓名")
    private String householdHead;
 
    @ExcelProperty(value = "身份证号", index = 5, converter = StringConverter.class)
    @ApiModelProperty(value = "身份证号")
    private String idCard;
 
    @ExcelProperty(value = "联系电话", index = 6, converter = StringConverter.class)
    @ApiModelProperty(value = "联系电话")
    private String mobile;
 
    @ExcelProperty(value = {"本次安置人数(人)", "集体经济组织成员"}, index = 7, converter = NumberConverter.class)
    @ApiModelProperty(value = "本次安置人数 - 集体经济组织成员")
    private Integer currentCollectiveNum;
 
    @ExcelProperty(value = {"本次安置人数(人)", "非集体经济组织成员"}, index = 8, converter = NumberConverter.class)
    @ApiModelProperty(value = "本次安置人数 - 非集体经济组织成员")
    private Integer currentNoCollectiveNum;
 
    @ExcelProperty(value = {"本次安置人数", "合计"}, index = 9, converter = NumberConverter.class)
    @ApiModelProperty(value = "本次安置人数 - 合计")
    private Integer currentCount;
 
    @ExcelProperty(value = "待安置家庭成员姓名", index = 10, converter = StringConverter.class)
    @ApiModelProperty(value = "待安置家庭成员姓名")
    private String waitFamilyNames;
 
    @ExcelProperty(value = "待安置人员应安置面积合计(m²)", index = 11, converter = BigDecimalConverter.class)
    @ApiModelProperty(value = "待安置人员应安置面积合计(m²)")
    private BigDecimal waitFamilyArea;
 
    @ExcelProperty(value = {"补偿金额(万元)", "新建商品住房、商业用房、停车位"}, index = 12, converter = StringConverter.class)
    @ApiModelProperty(value = "补偿金额 - 新建商品住房、商业用房、停车位")
    private String compensationNewAmount;
 
    @ExcelProperty(value = {"补偿金额(万元)", "二手住房"}, index = 13, converter = StringConverter.class)
    @ApiModelProperty(value = "补偿金额 - 二手住房")
    private String compensationOldAmount;
 
    @ExcelProperty(value = {"补偿金额(万元)", "合计"}, index = 14, converter = BigDecimalConverter.class)
    @ApiModelProperty(value = "补偿金额(合计)")
    private BigDecimal compensationSum;
 
    @ExcelProperty(value = "25%首付款(万元)", index = 15, converter = BigDecimalConverter.class)
    @ApiModelProperty(value = "25%首付款(万元)")
    private BigDecimal downPaymentAmount;
 
    @ExcelProperty(value = "每季度需支付款项(万元)", index = 16, converter = BigDecimalConverter.class)
    @ApiModelProperty(value = "每季度需支付款项(万元)")
    private BigDecimal quarterPayAmount;
 
    @ExcelProperty(value = "过渡补贴", index = 17, converter = BigDecimalConverter.class)
    @ApiModelProperty(value = "过渡补贴")
    private BigDecimal subsidyAmount;
 
    @ExcelProperty(value = "备注", index = 18, converter = StringConverter.class)
    @ApiModelProperty(value = "备注")
    private String remark;
 
    @ExcelProperty(value = "凭证发放时间", index = 19, converter = DateConverter.class)
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "凭证发放时间")
    private Date certificateTime;
 
    @ExcelProperty(value = "购房时间", index = 20, converter = DateConverter.class)
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "购房时间")
    private Date buyTime;
 
    @ExcelProperty(value = "成交金额", index = 21, converter = BigDecimalConverter.class)
    @ApiModelProperty(value = "成交金额")
    private BigDecimal dealAmount;
 
    @ExcelProperty(value = {"新建商品住房", "楼盘名称"}, index = 22, converter = StringConverter.class)
    @ApiModelProperty(value = "新建商品住房 - 楼盘名称")
    private String newHousingName;
 
    @ExcelProperty(value = {"新建商品住房", "面积(m²)"}, index = 23, converter = BigDecimalConverter.class)
    @ApiModelProperty(value = "新建商品住房 - 面积(m²)")
    private BigDecimal newHousingArea;
 
    @ExcelProperty(value = {"新建商品住房", "套数(套)"}, index = 24, converter = NumberConverter.class)
    @ApiModelProperty(value = "新建商品住房 - 套数(套)")
    private Integer newHousingNum;
 
    @ExcelProperty(value = {"二手住房", "小区名称"}, index = 25, converter = StringConverter.class)
    @ApiModelProperty(value = "二手住房 - 小区名称")
    private String oldHousingName;
 
    @ExcelProperty(value = {"二手住房", "面积(m²)"}, index = 26, converter = BigDecimalConverter.class)
    @ApiModelProperty(value = "二手住房 - 面积(m²)")
    private BigDecimal oldHousingArea;
 
    @ExcelProperty(value = {"二手住房", "套数(套)"}, index = 27, converter = NumberConverter.class)
    @ApiModelProperty(value = "二手住房 - 套数(套)")
    private Integer oldHousingNum;
 
    @ExcelProperty(value = {"新建商业用房", "楼盘名称"}, index = 28, converter = StringConverter.class)
    @ApiModelProperty(value = "新建商业用房 - 楼盘名称")
    private String buildHousingName;
 
    @ExcelProperty(value = {"新建商业用房", "面积(m²)"}, index = 29, converter = BigDecimalConverter.class)
    @ApiModelProperty(value = "新建商业用房 - 面积(m²)")
    private BigDecimal buildHousingArea;
 
    @ExcelProperty(value = {"新建商业用房", "套数(套)"}, index = 30, converter = NumberConverter.class)
    @ApiModelProperty(value = "新建商业用房 - 套数(套)")
    private Integer buildHousingNum;
 
    @ExcelProperty(value = {"新建停车位", "楼盘名称"}, index = 31, converter = StringConverter.class)
    @ApiModelProperty(value = "新建停车位 - 楼盘名称")
    private String newStopName;
 
    @ExcelProperty(value = {"新建停车位", "金额(万元)"}, index = 32, converter = BigDecimalConverter.class)
    @ApiModelProperty(value = "新建停车位 - 金额(万元)")
    private BigDecimal newStopArea;
 
    @ExcelProperty(value = {"新建停车位", "个数"}, index = 33, converter = NumberConverter.class)
    @ApiModelProperty(value = "新建停车位个数")
    private Integer newStopNum;
 
    @ExcelProperty(value = "自主购房签订时间", index = 34, converter = DateConverter.class)
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "自主购房签订时间")
    private Date signTime;
 
    @ExcelProperty(value = "25%补偿款及过渡补贴支付时间", index = 35, converter = DateConverter.class)
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "25%补偿款及过渡补贴支付时间")
    private Date compensationPayTime;
 
    @ExcelProperty(value = {"剩余款项支付时间", "第一年"}, index = 36, converter = DateConverter.class)
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "剩余款项支付时间第一年")
    private Date remainingTime1;
 
    @ExcelProperty(value = {"剩余款项支付时间", "第二年"}, index = 37, converter = DateConverter.class)
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "剩余款项支付时间第二年")
    private Date remainingTime2;
 
    @ExcelProperty(value = {"剩余款项支付时间", "第三年"}, index = 38, converter = DateConverter.class)
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "剩余款项支付时间第三年")
    private Date remainingTime3;
 
    @ExcelProperty(value = {"剩余款项支付时间", "第四年"}, index = 39, converter = DateConverter.class)
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "剩余款项支付时间第四年")
    private Date remainingTime4;
 
    @ExcelProperty(value = {"剩余款项支付时间", "第五年"}, index = 40, converter = DateConverter.class)
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "剩余款项支付时间第五年")
    private Date remainingTime5;
 
 
    public static PlacementHouseholdTemplateResponse generateExampleData() {
        PlacementHouseholdTemplateResponse exampleData = new PlacementHouseholdTemplateResponse();
        exampleData.setStreet("镇A");
        exampleData.setProjectName("项目B");
        exampleData.setCommunity("社区C");
        exampleData.setDemolitionTime(new Date());
        exampleData.setHouseholdHead("张三");
        exampleData.setIdCard("123456789012345678");
        exampleData.setMobile("13800138000");
        exampleData.setCurrentCollectiveNum(2);
        exampleData.setCurrentNoCollectiveNum(1);
        exampleData.setCurrentCount(3);
        exampleData.setWaitFamilyNames("李四,王五");
        exampleData.setWaitFamilyArea(new BigDecimal("100.00"));
        exampleData.setCompensationNewAmount("200");
        exampleData.setCompensationOldAmount("250");
        exampleData.setCompensationSum(new BigDecimal("350.00"));
        exampleData.setDownPaymentAmount(new BigDecimal("87.50"));
        exampleData.setQuarterPayAmount(new BigDecimal("25.00"));
        exampleData.setSubsidyAmount(new BigDecimal("10.00"));
        exampleData.setRemark("备注信息");
        exampleData.setCertificateTime(new Date());
        exampleData.setBuyTime(new Date());
        exampleData.setDealAmount(new BigDecimal("300.00"));
        exampleData.setNewHousingName("楼盘X");
        exampleData.setNewHousingArea(new BigDecimal("50.00"));
        exampleData.setNewHousingNum(1);
        exampleData.setOldHousingName("小区Y");
        exampleData.setOldHousingArea(new BigDecimal("40.00"));
        exampleData.setOldHousingNum(1);
        exampleData.setBuildHousingName("商业用房Z");
        exampleData.setBuildHousingArea(new BigDecimal("30.00"));
        exampleData.setBuildHousingNum(1);
        exampleData.setNewStopName("停车场W");
        exampleData.setNewStopArea(new BigDecimal("5.00"));
        exampleData.setNewStopNum(2);
        exampleData.setSignTime(new Date());
        exampleData.setCompensationPayTime(new Date());
        exampleData.setRemainingTime1(new Date());
        exampleData.setRemainingTime2(new Date());
        exampleData.setRemainingTime3(new Date());
        exampleData.setRemainingTime4(new Date());
        exampleData.setRemainingTime5(new Date());
        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);
    }
}