导出修改

This commit is contained in:
haozq 2025-01-22 11:21:46 +08:00
parent f9aac40c7b
commit b866f60f9f
2 changed files with 16 additions and 8 deletions

View File

@ -77,16 +77,21 @@ public class CarContractController {
List<CarContractSupVo> supList=vo.getSupList();
StringBuffer supName=new StringBuffer();
StringBuffer supRadio=new StringBuffer();
StringBuffer radioMoney=new StringBuffer();
supList.forEach(sup->{
if(StringHelper.isNotEmpty(supName.toString())){
supName.append("\n");
supRadio.append("\n");
radioMoney.append("\n");
}
supName.append(sup.getSupName());
supRadio.append(sup.getRatio());
supRadio.append(sup.getRatio()).append("%");
radioMoney.append(sup.getRatioMoney());
});
vo.setSupName(supName.toString());
vo.setSipRadio(supRadio.toString());
vo.setRatioMoney(radioMoney.toString());
vo.setXh(num[0]);
num[0]++;
});

View File

@ -24,18 +24,18 @@ public class CarContractVo extends ParentVo {
/**
* 合同类型名称 1 车辆 2吊车
*/
@Excel(name = "合同类型", width = 10.0, orderNum = "3")
@Excel(name = "合同类型", width = 10.0,height = 20.0, orderNum = "3")
private String typeName;
/**
* 合同编码
*/
@Excel(name = "合同编号", width = 10.0, orderNum = "1")
@Excel(name = "合同编号", width = 15.0, orderNum = "1")
private String code;
/**
* 合同名称
*/
@Excel(name = "合同名称", width = 10.0, orderNum = "2")
@Excel(name = "合同名称", width = 15.0, orderNum = "2")
private String name;
/**
* 开始时间
@ -46,12 +46,12 @@ public class CarContractVo extends ParentVo {
*/
private String endTime;
@Excel(name = "合同有效期", width = 10.0, orderNum = "4")
@Excel(name = "合同有效期", width = 15.0, orderNum = "4")
private String times;
/**
* 金额
*/
@Excel(name = "金额", width = 10.0, orderNum = "5")
@Excel(name = "金额", width = 15.0, orderNum = "5")
private String money;
private String remark;
@ -69,12 +69,15 @@ public class CarContractVo extends ParentVo {
*/
private List<CarContractSupVo> supList;
@Excel(name = "供应商", width = 10.0, orderNum = "7")
@Excel(name = "供应商", width = 20.0, orderNum = "7")
private String supName;
@Excel(name = "占比", width = 10.0, orderNum = "8")
@Excel(name = "占比", width = 15.0, orderNum = "8")
private String sipRadio;
@Excel(name = "金额", width = 20.0, orderNum = "9")
private String ratioMoney;
/**
* 吊车 车辆型号集合
*/