|
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 = BigDecimalConverter.class)
|
@ApiModelProperty(value = "补偿金额 - 新建商品住房、商业用房、停车位")
|
private BigDecimal compensationNewAmount;
|
|
@ExcelProperty(value = {"补偿金额(万元)", "二手住房"}, index = 13, converter = BigDecimalConverter.class)
|
@ApiModelProperty(value = "补偿金额 - 二手住房")
|
private BigDecimal 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(new BigDecimal("200.00"));
|
exampleData.setCompensationOldAmount(new BigDecimal("150.00"));
|
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);
|
}
|
}
|