EBOM修复
This commit is contained in:
parent
41c0b4346e
commit
b98fe9b4b2
|
|
@ -26,6 +26,7 @@ import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.ExecutionException;
|
import java.util.concurrent.ExecutionException;
|
||||||
|
|
||||||
|
|
@ -68,7 +69,7 @@ public class PBomApi extends BaseApi {
|
||||||
|
|
||||||
@PostMapping("exportWorkDetailsListByPage")
|
@PostMapping("exportWorkDetailsListByPage")
|
||||||
@ApiOperation("导出工作列表")
|
@ApiOperation("导出工作列表")
|
||||||
public void exportWorkDetailsListByPage(@RequestBody BomNewPbomParentQuery query ,HttpServletResponse response) {
|
public void exportWorkDetailsListByPage(@RequestBody BomNewPbomParentQuery query ,HttpServletResponse response) throws IOException {
|
||||||
bomNewPbomParentService.exportWorkDetailsListByPage(query,response);
|
bomNewPbomParentService.exportWorkDetailsListByPage(query,response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ 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.convert.Convert;
|
||||||
|
import cn.hutool.core.lang.TypeReference;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
|
@ -26,11 +27,14 @@ import nflg.product.common.constant.STATE;
|
||||||
import org.springframework.beans.factory.annotation.Qualifier;
|
import org.springframework.beans.factory.annotation.Qualifier;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import org.ttzero.excel.entity.ListMapSheet;
|
||||||
|
import org.ttzero.excel.entity.ListSheet;
|
||||||
import org.ttzero.excel.entity.Workbook;
|
import org.ttzero.excel.entity.Workbook;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.ExecutionException;
|
import java.util.concurrent.ExecutionException;
|
||||||
import java.util.concurrent.ForkJoinPool;
|
import java.util.concurrent.ForkJoinPool;
|
||||||
|
|
@ -160,8 +164,18 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void exportWorkDetailsListByPage(BomNewPbomParentQuery query,HttpServletResponse response){
|
public void exportWorkDetailsListByPage(BomNewPbomParentQuery query,HttpServletResponse response) throws IOException {
|
||||||
|
EecExcelUtil.setResponseExcelHeader(response, "bom明细列表");
|
||||||
|
new Workbook().addSheet(new ListSheet<BomNewPbomParentVO>() {
|
||||||
|
Long n = 1L;
|
||||||
|
@Override
|
||||||
|
protected List<BomNewPbomParentVO> more() {
|
||||||
|
query.setPage(n);
|
||||||
|
n++;
|
||||||
|
List<BomNewPbomParentVO> result=workDetailsListByPage(query).getRecords();
|
||||||
|
return CollUtil.isNotEmpty(result)?result:null;
|
||||||
|
}
|
||||||
|
}).writeTo(response.getOutputStream());
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<BomNewPbomParentVO> getChild(Long rowId) {
|
public List<BomNewPbomParentVO> getChild(Long rowId) {
|
||||||
|
|
|
||||||
|
|
@ -282,7 +282,8 @@ public class OriginalBomToEBomConvert extends BaseConvert {
|
||||||
childEntity.setParentRowId(parent.getEBomRowId()>0?parent.getEBomRowId(): parent.getRowId());
|
childEntity.setParentRowId(parent.getEBomRowId()>0?parent.getEBomRowId(): parent.getRowId());
|
||||||
childEntity.setOrderNumber("001");
|
childEntity.setOrderNumber("001");
|
||||||
childEntity.setIdentityNo(StrUtil.join("-", parent.getMaterialNo(), material.getMaterialNo()));
|
childEntity.setIdentityNo(StrUtil.join("-", parent.getMaterialNo(), material.getMaterialNo()));
|
||||||
childEntity.setDrawingNo(material.getDrawingNo());
|
//图号=物料编码
|
||||||
|
childEntity.setDrawingNo(material.getMaterialNo());
|
||||||
childEntity.setMaterialNo(material.getMaterialNo());
|
childEntity.setMaterialNo(material.getMaterialNo());
|
||||||
childEntity.setMaterialName(material.getMaterialName());
|
childEntity.setMaterialName(material.getMaterialName());
|
||||||
childEntity.setMaterialDesc(material.getMaterialDesc());
|
childEntity.setMaterialDesc(material.getMaterialDesc());
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue