导出功能(维修审核管理)
This commit is contained in:
parent
8a80a7059e
commit
9003c84147
|
|
@ -1,5 +1,6 @@
|
|||
package com.bonus.material.repair.controller;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import javax.annotation.Resource;
|
||||
|
|
@ -11,6 +12,7 @@ import com.bonus.common.biz.annotation.StoreLog;
|
|||
import com.bonus.common.biz.config.ListPagingUtil;
|
||||
import com.bonus.common.core.utils.DateUtils;
|
||||
import com.bonus.common.core.utils.ServletUtils;
|
||||
import com.bonus.common.core.utils.bean.BeanUtils;
|
||||
import com.bonus.common.log.enums.OperaType;
|
||||
import com.bonus.material.basic.domain.report.LeaseOutInfo;
|
||||
import com.bonus.material.basic.domain.report.PurChaseReportInfo;
|
||||
|
|
@ -95,8 +97,25 @@ public class RepairAuditDetailsController extends BaseController {
|
|||
}
|
||||
repairAuditDetailsService.queryTimeCope(bean);
|
||||
List<ScrapApplyDetailsVO> list = repairAuditDetailsService.selectRepairQuestList(bean);
|
||||
List<ScrapApplyDetailsVO> newList = new ArrayList<>();
|
||||
list.forEach(item -> {
|
||||
RepairAuditDetails repairAuditDetails = new RepairAuditDetails();
|
||||
repairAuditDetails.setTaskId(item.getTaskId());
|
||||
List<RepairAuditDetails> detailsList = repairAuditDetailsService.getRepairAuditList(repairAuditDetails);
|
||||
detailsList.forEach(details -> {
|
||||
ScrapApplyDetailsVO scrapApplyDetailsVO = new ScrapApplyDetailsVO();
|
||||
BeanUtils.copyProperties(item, scrapApplyDetailsVO);
|
||||
scrapApplyDetailsVO.setTypeName(details.getSpecificationType());
|
||||
scrapApplyDetailsVO.setTypeName2(details.getMachineTypeName());
|
||||
scrapApplyDetailsVO.setRepairNum2(details.getRepairNum());
|
||||
scrapApplyDetailsVO.setRepairedNum(details.getRepairedNum());
|
||||
scrapApplyDetailsVO.setScrapNum3(details.getScrapNum());
|
||||
scrapApplyDetailsVO.setMaCode(details.getMaCode());
|
||||
newList.add(scrapApplyDetailsVO);
|
||||
});
|
||||
});
|
||||
ExcelUtil<ScrapApplyDetailsVO> util = new ExcelUtil<>(ScrapApplyDetailsVO.class);
|
||||
util.exportExcel(response, list, "修试审核任务列表", "修试审核数据一览表(导出时间:" + DateUtils.getTime() + ")");
|
||||
util.exportExcel(response, newList, "修试审核任务列表", "修试审核数据一览表(导出时间:" + DateUtils.getTime() + ")");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -49,19 +49,25 @@ public class ScrapApplyDetailsVO {
|
|||
|
||||
@Excel(name = "维修审核单号",sort = 4)
|
||||
private String auditCode;
|
||||
|
||||
@Excel(name = "物资类型",sort = 5)
|
||||
@ApiModelProperty(value = "机具编号")
|
||||
@Excel(name = "设备编码",sort = 5)
|
||||
private String maCode;
|
||||
@Excel(name = "物资类型",sort = 6)
|
||||
private String typeName2;
|
||||
|
||||
@Excel(name = "退料数量",sort = 6, cellType = Excel.ColumnType.NUMERIC)
|
||||
/**
|
||||
* 规格型号
|
||||
*/
|
||||
@Excel(name = "规格型号",sort = 7)
|
||||
private String typeName;
|
||||
@Excel(name = "退料数量",sort = 8, cellType = Excel.ColumnType.NUMERIC)
|
||||
private BigDecimal repairNum2;
|
||||
@Excel(name = "合格数量",sort = 7, cellType = Excel.ColumnType.NUMERIC)
|
||||
@Excel(name = "合格数量",sort = 9, cellType = Excel.ColumnType.NUMERIC)
|
||||
private BigDecimal repairedNum;
|
||||
@Excel(name = "报废数量",sort = 8, cellType = Excel.ColumnType.NUMERIC)
|
||||
@Excel(name = "报废数量",sort = 10, cellType = Excel.ColumnType.NUMERIC)
|
||||
private BigDecimal scrapNum3;
|
||||
@Excel(name = "维修人",sort = 9)
|
||||
@Excel(name = "维修人",sort = 11)
|
||||
private String createBy2;
|
||||
@Excel(name = "审核时间", dateFormat = "yyyy-MM-dd HH:mm:ss", sort = 10)
|
||||
@Excel(name = "审核时间", dateFormat = "yyyy-MM-dd HH:mm:ss", sort = 12)
|
||||
private String auditTime;
|
||||
|
||||
/**
|
||||
|
|
@ -118,15 +124,9 @@ public class ScrapApplyDetailsVO {
|
|||
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 规格型号
|
||||
*/
|
||||
|
||||
private String typeName;
|
||||
|
||||
@ApiModelProperty(value = "机具编号")
|
||||
|
||||
private String maCode;
|
||||
|
||||
|
||||
/** 报废数量 */
|
||||
|
|
|
|||
|
|
@ -341,7 +341,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
rn.repairedNum as repairedNum,
|
||||
tk.task_status AS taskStatus,
|
||||
rad.create_by AS createBy2,
|
||||
rad.create_time AS auditTime
|
||||
rad.create_time AS auditTime,
|
||||
rad.create_time AS createTime,
|
||||
tk.CODE AS repairCode
|
||||
FROM
|
||||
tm_task tk
|
||||
LEFT JOIN repair_audit_details rad ON tk.task_id = rad.task_id
|
||||
|
|
@ -417,7 +419,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
rn.repairedNum as repairedNum,
|
||||
tk.task_status AS taskStatus,
|
||||
su.nick_name AS createBy2,
|
||||
rad.audit_time AS auditTime
|
||||
rad.audit_time AS auditTime,
|
||||
rad.create_time AS createTime,
|
||||
tk.CODE AS repairCode
|
||||
FROM
|
||||
tm_task tk
|
||||
LEFT JOIN (
|
||||
|
|
|
|||
Loading…
Reference in New Issue