| | |
| | | //编辑多个图片上传 |
| | | public Response updatePartPic(List<MultipartFile> multipartFileList, int num) throws IOException { |
| | | String rootFile = CommonUtil.getRootFile(); |
| | | rootFile=rootFile.replace("doc_file",""); |
| | | QueryWrapper wrapper=new QueryWrapper(); |
| | | wrapper.eq("num",num); |
| | | wrapper.last("limit 1"); |
| | |
| | | } |
| | | String devRoot=rootFile.replace("doc_file", ""); |
| | | List<String> devPicList=new ArrayList<>(); |
| | | if(bomAcceptance.getDevPicleft()!=null||!bomAcceptance.getDevPicleft().isEmpty()){ |
| | | devPicList.add(bomAcceptance.getDevPicleft()); |
| | | } |
| | | if(bomAcceptance.getDevPicright()!=null||!bomAcceptance.getDevPicright().isEmpty()){ |
| | | devPicList.add(bomAcceptance.getDevPicright()); |
| | | } |
| | | if(bomAcceptance.getDevPicfront()!=null||!bomAcceptance.getDevPicfront().isEmpty()){ |
| | | devPicList.add(bomAcceptance.getDevPicfront()); |
| | | } |
| | | if(bomAcceptance.getDevPicback()!=null||!bomAcceptance.getDevPicback().isEmpty()){ |
| | | devPicList.add(bomAcceptance.getDevPicback()); |
| | | } |
| | | |
| | | devPicList.add(bomAcceptance.getDevPicleft()); |
| | | devPicList.add(bomAcceptance.getDevPicfront()); |
| | | devPicList.add(bomAcceptance.getDevPicright()); |
| | | devPicList.add(bomAcceptance.getDevPicback()); |
| | | String fileName="产品验收信息记录"; |
| | | //创建单个sheet |
| | | HSSFWorkbook wb = new HSSFWorkbook(); |
| | |
| | | ByteArrayOutputStream byteArrayOut = null; |
| | | for(int i=0;i<devPicList.size();i++){ |
| | | String picUrl=devPicList.get(i); |
| | | if(picUrl.length()==0){ |
| | | continue; |
| | | } |
| | | try { |
| | | byteArrayOut = new ByteArrayOutputStream(); |
| | | String path=devRoot+File.separator+picUrl; |