比较导出excel
This commit is contained in:
parent
dd0cda516e
commit
ae7de19498
|
|
@ -0,0 +1,57 @@
|
||||||
|
package com.nflg.product.bomnew.excel;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class CompareReportField {
|
||||||
|
|
||||||
|
// @ApiModelProperty("汇总")
|
||||||
|
// @ExcelProperty(value="汇总")
|
||||||
|
// private Integer levelNum;
|
||||||
|
|
||||||
|
@ApiModelProperty("物料编码")
|
||||||
|
@ExcelProperty(value="物料编码")
|
||||||
|
private String materialNo;
|
||||||
|
@ApiModelProperty("图号")
|
||||||
|
@ExcelProperty(value="图号")
|
||||||
|
private String drawingNo;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty("物料描述")
|
||||||
|
@ExcelProperty(value="物料描述")
|
||||||
|
private String materialDesc;
|
||||||
|
|
||||||
|
@ApiModelProperty("数量")
|
||||||
|
@ExcelProperty(value = "数量")
|
||||||
|
private BigDecimal num;
|
||||||
|
|
||||||
|
@ApiModelProperty("单位")
|
||||||
|
@ExcelProperty(value = "单位")
|
||||||
|
private String materialUnit;
|
||||||
|
@ApiModelProperty("层级")
|
||||||
|
@ExcelProperty(value="层级")
|
||||||
|
private Integer levelNum;
|
||||||
|
|
||||||
|
@ApiModelProperty("比对结果")
|
||||||
|
@ExcelProperty("比对结果")
|
||||||
|
private File compareSymbol;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty("数量")
|
||||||
|
@ExcelProperty(value = "数量")
|
||||||
|
private BigDecimal num2;
|
||||||
|
@ApiModelProperty("单位")
|
||||||
|
@ExcelProperty(value = "单位")
|
||||||
|
private String materialUnit2;
|
||||||
|
@ApiModelProperty("层级")
|
||||||
|
@ExcelProperty(value="层级")
|
||||||
|
private Integer levelNum2;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -29,6 +29,9 @@ import java.io.OutputStream;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
|
|
||||||
|
/**'
|
||||||
|
* 移动破导出设备
|
||||||
|
*/
|
||||||
public class ExportDeviceHelper {
|
public class ExportDeviceHelper {
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,12 @@
|
||||||
package com.nflg.product.bomnew.service;
|
package com.nflg.product.bomnew.service;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import cn.hutool.core.convert.Convert;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import cn.hutool.extra.spring.SpringUtil;
|
import cn.hutool.extra.spring.SpringUtil;
|
||||||
import com.nflg.product.bomnew.constant.ReportConstant;
|
import com.nflg.product.bomnew.constant.ReportConstant;
|
||||||
|
import com.nflg.product.bomnew.excel.CompareReportField;
|
||||||
import com.nflg.product.bomnew.pojo.query.CompareReportQuery;
|
import com.nflg.product.bomnew.pojo.query.CompareReportQuery;
|
||||||
|
|
||||||
import com.nflg.product.bomnew.pojo.vo.CompareReportListVO;
|
import com.nflg.product.bomnew.pojo.vo.CompareReportListVO;
|
||||||
|
|
@ -53,6 +55,33 @@ public class CompareReportService {
|
||||||
return compareReportListVO;
|
return compareReportListVO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public void compareBomExport(CompareReportQuery query) {
|
||||||
|
CompareReportListVO list=compareBom(query);
|
||||||
|
|
||||||
|
if(CollUtil.isEmpty(list.getChildNodes())){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (CompareReportVO compareReportVO:
|
||||||
|
list.getChildNodes()) {
|
||||||
|
|
||||||
|
CompareReportField compareReportField=null;
|
||||||
|
if(compareReportVO.getLeft()!=null){
|
||||||
|
compareReportField= Convert.convert(CompareReportField.class,compareReportVO.getLeft());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 左倾斜 或右倾斜
|
* 左倾斜 或右倾斜
|
||||||
* @param leftNode
|
* @param leftNode
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue