| | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | |
| | | import com.deepoove.poi.data.*; |
| | | import com.deepoove.poi.data.style.*; |
| | | import com.deepoove.poi.util.TableTools; |
| | | import com.deepoove.poi.xwpf.WidthScalePattern; |
| | | import com.yuanchu.mom.common.GetLook; |
| | | import com.yuanchu.mom.common.PrintChina; |
| | | import com.yuanchu.mom.dto.ExcelDto; |
| | |
| | | cells.add(cellRenderData); |
| | | } else { |
| | | //项目信息 |
| | | textRenderData.setText(insProducts1.get((int) (j - 2)).getInspectionItem() + "\n" + insProducts1.get((int) (j - 2)).getInspectionItemEn()+"∑"+(j+101)); |
| | | textRenderData.setText(insProducts1.get((int) (j - 2)).getInspectionItem() + "\n" + insProducts1.get((int) (j - 2)).getInspectionItemEn() + "∑" + (j + 101)); |
| | | renderData.add(textRenderData); |
| | | paragraphRenderData.setContents(renderData); |
| | | paragraphRenderDataList.add(paragraphRenderData); |
| | |
| | | //项目信息 |
| | | //判断是否有项目子类 |
| | | if (insProducts1.get((int) (j - 2)).getInspectionItemSubclass().equals("") || insProducts1.get((int) (j - 2)).getInspectionItemSubclass() == null) { |
| | | textRenderData.setText(insProducts1.get((int) (j - 2)).getInspectionItem() + "\n" + insProducts1.get((int) (j - 2)).getInspectionItemEn()+"∑"+(j+101)); |
| | | textRenderData.setText(insProducts1.get((int) (j - 2)).getInspectionItem() + "\n" + insProducts1.get((int) (j - 2)).getInspectionItemEn() + "∑" + (j + 101)); |
| | | } else { |
| | | textRenderData.setText(insProducts1.get((int) (j - 2)).getInspectionItemSubclass() + "\n" + insProducts1.get((int) (j - 2)).getInspectionItemSubclassEn()); |
| | | } |
| | |
| | | Map<String, Object> table = new HashMap<>(); |
| | | table.put("table2", tableRenderData); |
| | | table.put("report", insReport); |
| | | table.put("sample_number",sample.getSampleCode() ); |
| | | table.put("sample_number", sample.getSampleCode()); |
| | | table.put("type", sample.getModel()); |
| | | tables2.add(table); |
| | | }); |
| | | } |
| | | |
| | | /*获取附件图片类型*/ |
| | | List<Map<String, Object>> images = new ArrayList<>(); |
| | | List<InsOrderFile> insOrderFiles = insOrderFileMapper.selectList(Wrappers.<InsOrderFile>lambdaQuery().eq(InsOrderFile::getType, 1).eq(InsOrderFile::getInsOrderId, orderId)); |
| | | if (CollectionUtils.isNotEmpty(insOrderFiles)) { |
| | | insOrderFiles.forEach(insOrderFile -> { |
| | | Map<String, Object> image = new HashMap<>(); |
| | | PictureRenderData pictureRenderData = Pictures.ofLocal(imgUrl + "/" + insOrderFile.getFileUrl()).sizeInCm(17,20).create(); |
| | | image.put("url", pictureRenderData); |
| | | image.put("report", insReport); |
| | | images.add(image); |
| | | }); |
| | | } |
| | | |
| | |
| | | put("insTimeEn", monthNames[insOrder.getInsTime().getMonthValue() - 1] + " " + now.getDayOfMonth() + ", " + now.getYear()); |
| | | put("writeUrl", null); |
| | | put("insUrl", Pictures.ofLocal(imgUrl + "/" + signatureUrl).create()); |
| | | put("images", images); |
| | | put("examineUrl", null); |
| | | put("ratifyUrl", null); |
| | | put("sampleEn", sampleEn); |