17 changed files with 580 additions and 100 deletions
@ -0,0 +1,49 @@ |
|||
package com.easy.admin.modules.huzhou.converter; |
|||
|
|||
import com.alibaba.excel.converters.Converter; |
|||
import com.alibaba.excel.metadata.GlobalConfiguration; |
|||
import com.alibaba.excel.metadata.data.WriteCellData; |
|||
import com.alibaba.excel.metadata.property.ExcelContentProperty; |
|||
|
|||
/** |
|||
* 所属改革任务,转换器。 |
|||
* |
|||
* @author gjh |
|||
*/ |
|||
public class SuperLeaderConverter implements Converter<String> { |
|||
/** |
|||
* Convert Java objects to excel objects |
|||
* |
|||
* @param value Java Data.NotNull. |
|||
* @param contentProperty Content property.Nullable. |
|||
* @param globalConfiguration Global configuration.NotNull. |
|||
* @return Data to put into a Excel |
|||
*/ |
|||
|
|||
@Override |
|||
public WriteCellData<?> convertToExcelData(String value, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) { |
|||
switch (value) { |
|||
case "1": |
|||
return new WriteCellData<>("医政处"); |
|||
case "2": |
|||
return new WriteCellData<>("妇幼处"); |
|||
case "3": |
|||
return new WriteCellData<>("科教处"); |
|||
case "4": |
|||
return new WriteCellData<>("体改处"); |
|||
case "5": |
|||
return new WriteCellData<>("规信处"); |
|||
case "6": |
|||
return new WriteCellData<>("中医处"); |
|||
case "7": |
|||
return new WriteCellData<>("财审处"); |
|||
case "8": |
|||
return new WriteCellData<>("机关党委"); |
|||
case "9": |
|||
return new WriteCellData<>("组织人事处"); |
|||
case "10": |
|||
default: |
|||
return new WriteCellData<>("未知"); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,18 @@ |
|||
package com.easy.admin.modules.huzhou.dto; |
|||
|
|||
import com.alibaba.excel.annotation.ExcelProperty; |
|||
import lombok.Data; |
|||
|
|||
@Data |
|||
public class ContractPayInfoDTO { |
|||
|
|||
|
|||
/** |
|||
* 超时支付次数 (超时7天以上为超时1次) |
|||
*/ |
|||
private int timeOutPayCount; |
|||
/** |
|||
* 超时支付情况 |
|||
*/ |
|||
private String timeOutPaySituation; |
|||
} |
@ -0,0 +1,58 @@ |
|||
package com.easy.admin.modules.huzhou.dto; |
|||
|
|||
import com.alibaba.excel.annotation.ExcelProperty; |
|||
import com.alibaba.excel.annotation.write.style.HeadStyle; |
|||
import com.easy.admin.modules.huzhou.converter.ReformNameConverter; |
|||
import com.easy.admin.modules.huzhou.converter.SuperLeaderConverter; |
|||
import lombok.Data; |
|||
|
|||
@HeadStyle(fillForegroundColor = 44) |
|||
@Data |
|||
public class ProjectTimeOutInfoExportDTO { |
|||
@ExcelProperty("项目名称") |
|||
private String projectName; |
|||
|
|||
@ExcelProperty("建设单位") |
|||
private String dutyWorkplace; |
|||
|
|||
@ExcelProperty(value = {"任务改革任务"}, converter = ReformNameConverter.class) |
|||
private String reformName; |
|||
|
|||
@ExcelProperty(value = {"上级指导处室"}, converter = SuperLeaderConverter.class) |
|||
private String superLeader; |
|||
|
|||
@ExcelProperty("当且所处节点") |
|||
private String currentPointName; |
|||
|
|||
//@NumberFormat("0.00%")
|
|||
@ExcelProperty("整体资金支付情况(%)") |
|||
private Double superiorFundPayRate; |
|||
|
|||
//超时7天以上为超时1次
|
|||
@ExcelProperty("超时支付次数") |
|||
private int timeOutPayCount; |
|||
|
|||
@ExcelProperty("超时支付情况") |
|||
private String timeOutPaySituation; |
|||
|
|||
public ProjectTimeOutInfoExportDTO(String projectName, |
|||
String dutyWorkplace, |
|||
String reformName, |
|||
String superLeader, |
|||
String currentPointName, |
|||
Double superiorFundPayRate, |
|||
int timeOutPayCount, |
|||
String timeOutPaySituation |
|||
) { |
|||
this.projectName = projectName; |
|||
this.superiorFundPayRate = superiorFundPayRate; |
|||
this.currentPointName = currentPointName; |
|||
this.timeOutPayCount = timeOutPayCount; |
|||
this.dutyWorkplace = dutyWorkplace; |
|||
this.reformName = reformName; |
|||
this.superLeader = superLeader; |
|||
this.timeOutPaySituation = timeOutPaySituation; |
|||
} |
|||
|
|||
|
|||
} |
Loading…
Reference in new issue