BUG修改

This commit is contained in:
haozq 2024-11-16 18:04:26 +08:00
parent 54174e1805
commit e45e662644
3 changed files with 44 additions and 8 deletions

View File

@ -470,6 +470,5 @@ public class ExportController {
log.error(e.toString(), e);
}
return "待审核";
}
}

View File

@ -92,11 +92,12 @@ public class PlanAuditController {
list.forEach(vo->{
vo.setXh(num[0]);
num[0]++;
vo.setAuditStatus(getStatus(vo.getStatusType(),vo.getStatus()));
});
ExportParams exportParams = new ExportParams("配件退回", "配件退回", ExcelType.XSSF);
ExportParams exportParams = new ExportParams("计划审核", "计划审核", ExcelType.XSSF);
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, PlanApplyAuditBean.class, list);
response.setContentType("application/vnd.ms-excel");
response.setHeader("content-disposition", "attachment;fileName=" + URLEncoder.encode("配件退回" + ".xlsx", "UTF-8"));
response.setHeader("content-disposition", "attachment;fileName=" + URLEncoder.encode("计划审核" + ".xlsx", "UTF-8"));
ServletOutputStream outputStream = response.getOutputStream();
workbook.write(outputStream);
outputStream.close();
@ -105,10 +106,41 @@ public class PlanAuditController {
log.error(e.toString(), e);
}
}
/**
* 获取审核状态
* @param statusType
* @param status
* @return
*/
private String getStatus(String statusType,String status) {
try {
String company ="";
if("1".equals(statusType)) {
return "审核通过";
}else if("2".equals(statusType)) {
company="分公司";
}else if("3".equals(statusType)) {
company="项目管理中心";
}else if("4".equals(statusType)) {
company="机具公司";
}
if("1".equals(status)) {
return ""+company+"审核";
}else if("2".equals(status)) {
return "审核通过";
}else if("3".equals(status)) {
return company+"审核驳回";
}
}catch (Exception e) {
log.error(e.toString(), e);
}
return "待审核";
}

View File

@ -30,12 +30,13 @@ public class PlanApplyAuditBean {
/**
* 工程id
*/
@Excel(name = "工程名称", width = 10.0, orderNum = "1")
@Excel(name = "工程名称", width = 10.0, orderNum = "2")
private String projectId;
/**
* 项目部分
*/
@Excel(name = "项目部分", width = 10.0, orderNum = "3")
private String projectPart;
/**
@ -47,6 +48,7 @@ public class PlanApplyAuditBean {
/**
* 施工地点
*/
@Excel(name = "备注", width = 10.0, orderNum = "10")
private String remark;
@ -58,10 +60,12 @@ public class PlanApplyAuditBean {
/**
* 创建人
*/
@Excel(name = "提交人", width = 10.0, orderNum = "4")
private String creator;
/**
* 创建时间
*/
@Excel(name = "提交时间", width = 10.0, orderNum = "6")
private String createTime;
/**
* 状态
@ -95,6 +99,7 @@ public class PlanApplyAuditBean {
/**
* 审核状态
*/
@Excel(name = "审核状态", width = 10.0, orderNum = "5")
private String auditStatus;