| | |
| | | import io.swagger.models.auth.In; |
| | | import org.apache.poi.openxml4j.exceptions.InvalidFormatException; |
| | | import org.apache.poi.ss.usermodel.*; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | |
| | | |
| | | @Resource |
| | | private ProductBomApprovingMapper mapper; |
| | | |
| | | @Autowired |
| | | private WorksheetMainService mainService; |
| | | |
| | | public List<ProductBomApproving> excelParse(InputStream inputStream) throws IOException, InvalidFormatException { |
| | | List<ProductBomApproving> list = new LinkedList<>(); |
| | |
| | | long timeStamp = System.currentTimeMillis(); |
| | | String filePath = rootFile + File.separator + "product_approving" + File.separator + user.getName() + File.separator + dateFormat+ File.separator + timeStamp; |
| | | File parentFile = new File(filePath); |
| | | File zipFile = new File(filePath+File.separator+file.getOriginalFilename()); |
| | | String originalFilename = file.getOriginalFilename(); |
| | | File zipFile = new File(filePath+File.separator+ originalFilename); |
| | | if(!zipFile.exists()){ |
| | | zipFile.mkdirs(); |
| | | } |
| | |
| | | return new Response().set(1,false,"拒绝解析,一次审批包含不同的产品修改"); |
| | | } |
| | | } |
| | | return response.setII(1,true,list,"解析完成"); |
| | | //通过包名,查询工单流程审批标题 |
| | | //String nextTitle = mainService.getNextTitle(originalFilename); |
| | | String nextTitle = originalFilename.substring(0,originalFilename.lastIndexOf(".")); |
| | | return response.setIII(1,true,list,nextTitle,"解析完成"); |
| | | } |
| | | |
| | | private List<FileUrlDTO> getDwgList(List<String> fileList) { |