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
 
package com.ruoyi.bussiness.object.response.placementBatch;
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 java.math.BigDecimal;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
 
@Data
public class PlacementAssetTemplateResponse {
 
    @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 = StringConverter.class)
    @ApiModelProperty(value = "户主姓名")
    private String householdHead;
 
    @ExcelProperty(value = "身份证号", index = 4, converter = StringConverter.class)
    @ApiModelProperty(value = "身份证号")
    private String idCard;
 
    @ExcelProperty(value = "应安置人数(人)", index = 5, converter = NumberConverter.class)
    @ApiModelProperty(value = "应安置人数(人)")
    private Integer resettledNum;
 
    @ExcelProperty(value = "所有家庭人员应安置面积(m²)", index = 6, converter = BigDecimalConverter.class)
    @ApiModelProperty(value = "所有家庭人员应安置面积(m²)")
    private BigDecimal resettledArea;
 
    @ExcelProperty(value = {"补偿单价标准", "新建商品房、商业用房、停车位"}, index = 7, converter = StringConverter.class)
    @ApiModelProperty(value = "补偿单价标准-新建商品房、商业用房、停车位")
    private String priceNewAmount;
 
    @ExcelProperty(value = {"补偿单价标准", "二手住房"}, index = 8, converter = StringConverter.class)
    @ApiModelProperty(value = "补偿单价标准-二手住房")
    private String priceOldAmount;
 
    @ExcelProperty(value = "补偿总价(万元)", index = 9, converter = BigDecimalConverter.class)
    @ApiModelProperty(value = "补偿总价(万元)")
    private BigDecimal compensationAmount;
 
    @ExcelProperty(value = "25%首付款(万元)", index = 10, converter = BigDecimalConverter.class)
    @ApiModelProperty(value = "25%首付款(万元)")
    private BigDecimal downPaymentAmount;
 
    @ExcelProperty(value = "每季度需支付款项(万元)", index = 11, converter = BigDecimalConverter.class)
    @ApiModelProperty(value = "每季度需支付款项(万元)")
    private BigDecimal quarterPayAmount;
 
    @ExcelProperty(value = "过渡补贴(万元)", index = 12, converter = BigDecimalConverter.class)
    @ApiModelProperty(value = "过渡补贴(万元)")
    private BigDecimal subsidyAmount;
 
    public static PlacementAssetTemplateResponse generateExampleData() {
        PlacementAssetTemplateResponse exampleData = new PlacementAssetTemplateResponse();
        exampleData.setStreet("镇A");
        exampleData.setProjectName("项目B");
        exampleData.setCommunity("社区C");
        exampleData.setHouseholdHead("张三");
        exampleData.setIdCard("123456789012345678");
        exampleData.setResettledNum(3);
        exampleData.setResettledArea(new BigDecimal("120.5"));
        exampleData.setPriceNewAmount("20000");
        exampleData.setPriceOldAmount("15000");
        exampleData.setCompensationAmount(new BigDecimal("330.75"));
        exampleData.setDownPaymentAmount(new BigDecimal("82.6875"));
        exampleData.setQuarterPayAmount(new BigDecimal("25"));
        exampleData.setSubsidyAmount(new BigDecimal("10"));
        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);
    }
}