wangbo 8 місяців тому
батько
коміт
7ee6aa794c

+ 7 - 0
business-common/src/main/java/com/rongwei/bscommon/sys/dao/ZhcxSeaBindProofDao.java

@@ -0,0 +1,7 @@
+package com.rongwei.bscommon.sys.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.rongwei.bsentity.domain.ZhcxSeaBindProofDo;
+
+public interface ZhcxSeaBindProofDao extends BaseMapper<ZhcxSeaBindProofDo> {
+}

+ 8 - 0
business-common/src/main/java/com/rongwei/bscommon/sys/dao/ZhcxSeaBindProofDetalDao.java

@@ -0,0 +1,8 @@
+package com.rongwei.bscommon.sys.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.rongwei.bsentity.domain.ZhcxSeaBindProofDetalDo;
+import com.rongwei.bsentity.domain.ZhcxSeaBindProofDo;
+
+public interface ZhcxSeaBindProofDetalDao extends BaseMapper<ZhcxSeaBindProofDetalDo> {
+}

+ 10 - 0
business-common/src/main/java/com/rongwei/bscommon/sys/service/ZhcxSeaBindProofDetalService.java

@@ -0,0 +1,10 @@
+package com.rongwei.bscommon.sys.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.rongwei.bsentity.domain.ZhcxSeaBindProofDetalDo;
+import com.rongwei.bsentity.domain.ZhcxSeaBindProofDo;
+
+import javax.servlet.http.HttpServletResponse;
+
+public interface ZhcxSeaBindProofDetalService  extends IService<ZhcxSeaBindProofDetalDo> {
+}

+ 19 - 0
business-common/src/main/java/com/rongwei/bscommon/sys/service/ZhcxSeaBindProofService.java

@@ -0,0 +1,19 @@
+package com.rongwei.bscommon.sys.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.rongwei.bsentity.domain.ZhcxInspectionReportManageDo;
+import com.rongwei.bsentity.domain.ZhcxSeaBindProofDo;
+
+import javax.servlet.http.HttpServletResponse;
+
+public interface ZhcxSeaBindProofService extends IService<ZhcxSeaBindProofDo> {
+
+    void seabingdownloadExcel(HttpServletResponse response, ZhcxSeaBindProofDo zhcxSeaBindProofDo) throws Exception;
+
+
+    void seabingPreviewExcel(HttpServletResponse response, ZhcxSeaBindProofDo zhcxSeaBindProofDo) throws Exception;
+
+
+
+
+}

+ 13 - 0
business-common/src/main/java/com/rongwei/bscommon/sys/service/impl/ZhcxSeaBindProofServiceDetalImpl.java

@@ -0,0 +1,13 @@
+package com.rongwei.bscommon.sys.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.rongwei.bscommon.sys.dao.ZhcxSeaBindProofDao;
+import com.rongwei.bscommon.sys.dao.ZhcxSeaBindProofDetalDao;
+import com.rongwei.bscommon.sys.service.ZhcxSeaBindProofDetalService;
+import com.rongwei.bsentity.domain.ZhcxSeaBindProofDetalDo;
+import com.rongwei.bsentity.domain.ZhcxSeaBindProofDo;
+import org.springframework.stereotype.Service;
+
+@Service
+public class ZhcxSeaBindProofServiceDetalImpl  extends ServiceImpl<ZhcxSeaBindProofDetalDao, ZhcxSeaBindProofDetalDo> implements ZhcxSeaBindProofDetalService {
+}

+ 377 - 0
business-common/src/main/java/com/rongwei/bscommon/sys/service/impl/ZhcxSeaBindProofServiceImpl.java

@@ -0,0 +1,377 @@
+package com.rongwei.bscommon.sys.service.impl;
+
+import cn.hutool.core.io.FileUtil;
+import com.aspose.cells.*;
+import com.aspose.cells.Picture;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.google.zxing.BarcodeFormat;
+import com.google.zxing.EncodeHintType;
+import com.google.zxing.MultiFormatWriter;
+import com.google.zxing.WriterException;
+import com.google.zxing.client.j2se.MatrixToImageWriter;
+import com.google.zxing.common.BitMatrix;
+import com.google.zxing.qrcode.QRCodeWriter;
+import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel;
+import com.rongwei.bscommon.sys.dao.ZhcxSeaBindProofDao;
+import com.rongwei.bscommon.sys.service.ZhcxSeaBindProofDetalService;
+import com.rongwei.bscommon.sys.service.ZhcxSeaBindProofService;
+import com.rongwei.bsentity.domain.ZhcxSeaBindProofDetalDo;
+import com.rongwei.bsentity.domain.ZhcxSeaBindProofDo;
+import com.rongwei.rwcommon.base.exception.CustomException;
+import com.rongwei.rwcommon.utils.StringUtils;
+import com.rongwei.rwcommoncomponent.excel.aspose.ExcelUtils;
+import com.rongwei.rwcommoncomponent.excel.utils.ExcelHelpUtils;
+import com.rongwei.rwcommoncomponent.file.service.SysFileItemService;
+import com.rongwei.rwcommonentity.commonservers.domain.SysFileItemDo;
+import org.apache.poi.ss.usermodel.ClientAnchor;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Service;
+
+import javax.imageio.ImageIO;
+import javax.servlet.http.HttpServletResponse;
+import java.awt.image.BufferedImage;
+import java.io.*;
+import java.net.URLEncoder;
+import java.text.SimpleDateFormat;
+import java.util.*;
+
+import com.rongwei.bscommon.sys.utils.QRCodeGenerator;
+@Service
+public class ZhcxSeaBindProofServiceImpl extends ServiceImpl<ZhcxSeaBindProofDao, ZhcxSeaBindProofDo> implements ZhcxSeaBindProofService {
+
+    @Autowired
+    private SysFileItemService sysFileItemService;
+    @Autowired
+    private ExcelUtils excelUtils;
+    @Autowired
+    private ZhcxSeaBindProofDetalService zhcxSeaBindProofDetalService;
+    @Value("${hb-provider.url}")
+    private String PreviewUrl;
+
+
+
+
+
+ @Override
+ public void seabingdownloadExcel(HttpServletResponse response, ZhcxSeaBindProofDo zhcxSeaBindProofDo) throws Exception {
+     String id = zhcxSeaBindProofDo.getId();
+     if (StringUtils.isEmpty(id)) {
+         throw new CustomException("参数异常,请联系管理员排查");
+     }
+
+     // 获取模板文件
+     SysFileItemDo templateFile = sysFileItemService.getById("71fee567a23e410fb0210362e5b58017");
+
+     if (!excelUtils.GetLicense()) {
+         return;
+     }
+
+     // 加载工作簿
+     Workbook wb = ExcelHelpUtils.getWorkbook(templateFile.getFullpath());
+     Worksheet sheet0 = wb.getWorksheets().get(0);
+     Cells cells = sheet0.getCells();
+
+     // 要生成二维码的内容
+//     String text = "http://61.177.40.178:4300/mlApi/qualityInspection/zhcxSeaBindProof/previewSeaExcel/"+id;
+     String text = PreviewUrl + "/mlApi/qualityInspection/zhcxSeaBindProof/previewSeaExcel/"+id;
+     // 设置二维码的参数
+     int width = 100;  // 宽度
+     int height = 100; // 高度
+
+
+
+     try {
+
+         BufferedImage image1 =QRCodeGenerator.generateQRCode(text,width,height);
+         // 保存二维码图片到文件
+         File outputFile = new File("QRCode.png");
+         ImageIO.write(image1, "PNG", outputFile);
+
+         PictureCollection pictures1 = sheet0.getPictures();
+
+// 检查第二张图片是否存在
+         if (pictures1.getCount() > 1) {
+             pictures1.removeAt(1);  // 删除第二张图片
+         }
+
+         int pictureIndex =  pictures1.add(1, 6, outputFile.getAbsolutePath());
+         Picture picture = pictures1.get(pictureIndex);
+
+         // 设置图片的精确位置(偏移)
+         picture.setUpperDeltaX(350);
+         picture.setUpperDeltaY(0);
+         // 设置插入图片的显示大小
+         int newWidth = 80;  // 设置图片显示的宽度
+         int newHeight = 80; // 设置图片显示的高度
+         picture.setWidth(newWidth);
+         picture.setHeight(newHeight);
+//             pictures1.add(1, 6, outputFile.getAbsolutePath());
+
+
+     } catch (WriterException | IOException e) {
+         e.printStackTrace();
+     }
+
+     Map<String, Object> map = this.getMap(Wrappers.<ZhcxSeaBindProofDo>lambdaQuery()
+             .eq(ZhcxSeaBindProofDo::getId, id)
+             .eq(ZhcxSeaBindProofDo::getDeleted, "0"));
+     List<Map<String, Object>> map2 = zhcxSeaBindProofDetalService.listMaps(
+             Wrappers.<ZhcxSeaBindProofDetalDo>lambdaQuery()
+                     .eq(ZhcxSeaBindProofDetalDo::getPid, id)
+                     .eq(ZhcxSeaBindProofDetalDo::getDeleted, "0")
+     );
+
+     // 根据 map2 的长度来动态决定新增多少行
+     int numRowsToInsert = map2.size() - 6;
+
+     if (numRowsToInsert < 0) {
+         numRowsToInsert = 0; // 如果 map2 的长度小于 7,不插入任何行
+     }
+
+     // 插入多行:在第 7 行开始插入多行
+     int insertRowIndex = 7; // 插入行的位置,7 表示插入到第 7 行之后
+
+     for (int i = 0; i < numRowsToInsert; i++) {
+         // 插入一行
+         cells.insertRow(insertRowIndex + i);
+
+         // 复制上一行的格式到新插入的行
+         // 这里的 insertRowIndex - 1 是上一行的索引,insertRowIndex + i 是当前插入行的索引
+         cells.copyRow(cells, insertRowIndex + i - 1, insertRowIndex + i);
+     }
+
+     for (int i = 0; i < map2.size(); i++) {
+         Map<String, Object> rowData = map2.get(i);
+
+         // 获取当前行号,插入时填充的数据行
+         int currentRowIndex = insertRowIndex + i - 1;
+
+         // 填充每个占位符的值
+         cells.get(currentRowIndex, 1).setValue(rowData.get("ITEMS"));         // 填充 ITEMS 列
+         cells.get(currentRowIndex, 2).setValue(rowData.get("CHECKRESULT"));   // 填充 CHECKRESULT 列
+         cells.get(currentRowIndex, 4).setValue(rowData.get("QCINSPECTOR"));   // 填充 QCINSPECTOR 列
+//         cells.get(currentRowIndex, 6).setValue(rowData.get("DATA"));
+         // 获取 CHECKDATE 并格式化为 "yyyy-MM-dd"
+         Object checkDateObj = rowData.get("DATE");
+         if (checkDateObj instanceof Date) {
+             SimpleDateFormat rq = new SimpleDateFormat("yyyy-MM-dd");
+             String formattedDate = rq.format((Date) checkDateObj); // 格式化日期
+             cells.get(currentRowIndex, 6).setValue(formattedDate);  // 填充 CHECKDATE 列
+         } else {
+             cells.get(currentRowIndex, 6).setValue(""); // 如果 CHECKDATE 不是日期,填充为空字符串
+         }
+     }
+
+     for (int row = 0; row < cells.getMaxDataRow() + 1; row++) {
+         for (int col = 0; col < cells.getMaxDataColumn() + 1; col++) {
+             Cell cell = cells.get(row, col);
+             String cellValue = cell.getStringValue();
+             // 检查占位符并替换对应的数据
+             if (cellValue.startsWith("${") && cellValue.endsWith("}")) {
+                 String key = cellValue.substring(2, cellValue.length() - 1);
+                 Object value = map.get(key);
+                 if (value != null) {
+                     // 将占位符替换为实际值
+                     if(key.equals("CREATEDATE")){
+                         SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+                         String format = sdf.format((Date) value);
+                         cell.putValue(format);
+                     } else {
+                         cell.putValue(value);
+                     }
+                 } else {
+                     cell.putValue("");
+                 }
+             }
+         }
+     }
+
+        try {
+            // 设置响应头,准备将 Excel 文件输出给客户端
+            response.setContentType("application/octet-stream;charset=ISO8859-1");
+            response.setHeader("Content-Disposition", "attachment;filename=测试下载");
+
+            // 将模板内容输出到响应流
+            wb.save(response.getOutputStream(), SaveFormat.XLSX);
+            wb.dispose(); // 释放工作簿资源
+        } catch (Exception e) {
+            log.error("处理模板失败:{}", e);
+            throw new CustomException("处理模板失败");
+        }
+ }
+
+
+
+
+
+
+
+
+
+
+
+    @Override
+    public void seabingPreviewExcel(HttpServletResponse response, ZhcxSeaBindProofDo zhcxSeaBindProofDo) throws Exception {
+        String id = zhcxSeaBindProofDo.getId();
+        if (StringUtils.isEmpty(id)) {
+            throw new CustomException("参数异常,请联系管理员排查");
+        }
+
+        // 获取模板文件
+        SysFileItemDo templateFile = sysFileItemService.getById("71fee567a23e410fb0210362e5b58017");
+
+        if (!excelUtils.GetLicense()) {
+            return;
+        }
+
+        // 加载工作簿
+        Workbook wb = ExcelHelpUtils.getWorkbook(templateFile.getFullpath());
+        Worksheet sheet0 = wb.getWorksheets().get(0);
+        Cells cells = sheet0.getCells();
+
+        // 要生成二维码的内容
+//        String text = "http://127.0.0.1:4200/mlApi/qualityInspection/zhcxSeaBindProof/previewSeaExcel/"+id;
+        String text = PreviewUrl + "/mlApi/qualityInspection/zhcxSeaBindProof/previewSeaExcel/"+id;
+        // 设置二维码的参数
+        int width = 100;  // 宽度
+        int height = 100; // 高度
+
+
+
+        try {
+
+            BufferedImage image =QRCodeGenerator.generateQRCode(text,width,height);
+            // 保存二维码图片到文件
+            File outputFile = new File("QRCode.png");
+            ImageIO.write(image, "PNG", outputFile);
+
+            PictureCollection pictures1 = sheet0.getPictures();
+
+// 检查第二张图片是否存在
+            if (pictures1.getCount() > 1) {
+                pictures1.removeAt(1);  // 删除第二张图片
+            }
+
+            int pictureIndex =  pictures1.add(1, 6, outputFile.getAbsolutePath());
+            Picture picture = pictures1.get(pictureIndex);
+
+            // 设置图片的精确位置(偏移)
+            picture.setUpperDeltaX(380);
+            picture.setUpperDeltaY(0);
+            // 设置插入图片的显示大小
+            int newWidth = 80;  // 设置图片显示的宽度
+            int newHeight = 80; // 设置图片显示的高度
+            picture.setWidth(newWidth);
+            picture.setHeight(newHeight);
+        } catch (WriterException | IOException e) {
+            e.printStackTrace();
+        }
+
+        Map<String, Object> map = this.getMap(Wrappers.<ZhcxSeaBindProofDo>lambdaQuery()
+                .eq(ZhcxSeaBindProofDo::getId, id)
+                .eq(ZhcxSeaBindProofDo::getDeleted, "0"));
+        List<Map<String, Object>> map2 = zhcxSeaBindProofDetalService.listMaps(
+                Wrappers.<ZhcxSeaBindProofDetalDo>lambdaQuery()
+                        .eq(ZhcxSeaBindProofDetalDo::getPid, id)
+                        .eq(ZhcxSeaBindProofDetalDo::getDeleted, "0")
+        );
+
+        // 根据 map2 的长度来动态决定新增多少行
+        int numRowsToInsert = map2.size() - 6;
+
+        if (numRowsToInsert < 0) {
+            numRowsToInsert = 0;
+        }
+
+        // 插入多行:在第 7 行开始插入多行
+        int insertRowIndex = 7;
+
+        for (int i = 0; i < numRowsToInsert; i++) {
+            // 插入一行
+            cells.insertRow(insertRowIndex + i);
+
+            // 复制上一行的格式到新插入的行
+            // 这里的 insertRowIndex - 1 是上一行的索引,insertRowIndex + i 是当前插入行的索引
+            cells.copyRow(cells, insertRowIndex + i - 1, insertRowIndex + i);
+        }
+
+        for (int i = 0; i < map2.size(); i++) {
+            Map<String, Object> rowData = map2.get(i);
+
+            // 获取当前行号,插入时填充的数据行
+            int currentRowIndex = insertRowIndex + i -1;
+
+            // 填充每个占位符的值
+            cells.get(currentRowIndex, 1).setValue(rowData.get("ITEMS"));         // 填充 ITEMS 列
+            cells.get(currentRowIndex, 2).setValue(rowData.get("CHECKRESULT"));   // 填充 CHECKRESULT 列
+            cells.get(currentRowIndex, 4).setValue(rowData.get("QCINSPECTOR"));   // 填充 QCINSPECTOR 列
+            // 获取 CHECKDATE 并格式化为 "yyyy-MM-dd"
+            Object checkDateObj = rowData.get("DATE");
+            if (checkDateObj instanceof Date) {
+                SimpleDateFormat rq = new SimpleDateFormat("yyyy-MM-dd");
+                String formattedDate = rq.format((Date) checkDateObj); // 格式化日期
+                cells.get(currentRowIndex, 6).setValue(formattedDate);  // 填充 CHECKDATE 列
+            } else {
+                cells.get(currentRowIndex, 6).setValue(""); // 如果 CHECKDATE 不是日期,填充为空字符串
+            }
+        }
+
+        for (int row = 0; row < cells.getMaxDataRow() + 1; row++) {
+            for (int col = 0; col < cells.getMaxDataColumn() + 1; col++) {
+                Cell cell = cells.get(row, col);
+                String cellValue = cell.getStringValue();
+                // 检查占位符并替换对应的数据
+                if (cellValue.startsWith("${") && cellValue.endsWith("}")) {
+                    String key = cellValue.substring(2, cellValue.length() - 1);
+                    Object value = map.get(key);
+                    if (value != null) {
+                        // 将占位符替换为实际值
+                        if(key.equals("CREATEDATE")){
+                            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+                            String format = sdf.format((Date) value);
+                            cell.putValue(format);
+                        }
+
+                        else{
+                            if(key.equals("remark")){
+                                cell.putValue(value);
+                            }
+                            cell.putValue(value);
+                        }
+                    }
+                    else{
+                        cell.putValue("");
+                    }
+
+                }
+            }
+        }
+        try {
+            String ename = (map.containsKey("PROJECTCODE") ? String.valueOf(map.get("PROJECTCODE")) : "") +
+                    (map.containsKey("PROJECTNAME") ? String.valueOf(map.get("PROJECTNAME")) : "") +
+                    (map.containsKey("CRANENO") ? String.valueOf(map.get("CRANENO")) : "");
+
+//            ename = ename.replace("#", "");
+
+            String fileName = ename + "号机海绑证明";
+            String encodedFileName = URLEncoder.encode(fileName+".pdf", "UTF-8").replaceAll("\\+", "%20");  // 替换空格为 %20
+
+            // 设置响应头
+            response.setContentType("application/pdf");
+
+            response.setHeader("Content-Disposition", String.format("attachment; filename=\"%s\"", encodedFileName));
+            // 转换为PDF
+            ByteArrayOutputStream pdfOutputStream = new ByteArrayOutputStream();
+            wb.save(pdfOutputStream, SaveFormat.PDF);
+            // 将PDF文件写入响应输出流
+            response.getOutputStream().write(pdfOutputStream.toByteArray());
+            response.getOutputStream().flush();
+        } catch (Exception e) {
+            e.printStackTrace();
+            throw new CustomException("生成PDF失败");
+        }
+    }
+
+}

+ 86 - 0
business-common/src/main/java/com/rongwei/bscommon/sys/utils/QRCodeGenerator.java

@@ -0,0 +1,86 @@
+package com.rongwei.bscommon.sys.utils;
+
+import com.aspose.cells.Cells;
+import com.aspose.cells.PictureCollection;
+import com.aspose.cells.Workbook;
+import com.aspose.cells.Worksheet;
+import com.google.zxing.BarcodeFormat;
+import com.google.zxing.EncodeHintType;
+import com.google.zxing.MultiFormatWriter;
+import com.google.zxing.WriterException;
+import com.google.zxing.client.j2se.MatrixToImageWriter;
+import com.google.zxing.common.BitMatrix;
+import com.google.zxing.qrcode.QRCodeWriter;
+import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel;
+import com.rongwei.rwcommoncomponent.excel.utils.ExcelHelpUtils;
+import org.apache.poi.ss.usermodel.ClientAnchor;
+
+import javax.imageio.ImageIO;
+import java.awt.*;
+import java.awt.image.BufferedImage;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Hashtable;
+
+public class QRCodeGenerator {
+
+
+    public static BufferedImage generateQRCodeImage(QRCodeWriter qrCodeWriter, String text, int width, int height, Hashtable<EncodeHintType, Object> hints) throws WriterException {
+        // 使用 ZXing 库生成二维码矩阵
+        com.google.zxing.common.BitMatrix bitMatrix = qrCodeWriter.encode(text, BarcodeFormat.QR_CODE, width, height, hints);
+
+        // 创建一个 BufferedImage,用于将二维码矩阵渲染成图像
+        BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
+
+        // 填充白色背景
+        image.createGraphics().fillRect(0, 0, width, height);
+
+        // 绘制二维码矩阵
+        for (int x = 0; x < width; x++) {
+            for (int y = 0; y < height; y++) {
+                // 如果该点为二维码的黑色点,设置像素为黑色
+                image.setRGB(x, y, bitMatrix.get(x, y) ? 0x000000 : 0xFFFFFF);
+            }
+        }
+
+        return image;
+    }
+
+
+    public static BufferedImage generateQRCode(String content, int width, int height) throws Exception {
+        // 设置二维码的编码规则
+        Hashtable<EncodeHintType, Object> hintMap = new Hashtable<>();
+        hintMap.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.L);
+        hintMap.put(EncodeHintType.MARGIN, 0);  // 可选:控制二维码的白边
+
+        // 使用 ZXing 库生成二维码
+        MultiFormatWriter writer = new MultiFormatWriter();
+        BitMatrix bitMatrix = writer.encode(content, BarcodeFormat.QR_CODE, width, height, hintMap);
+
+        // 创建透明背景的图片
+        BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
+        Graphics2D graphics = image.createGraphics();
+
+        // 设置透明背景
+        graphics.setColor(new Color(255, 255, 255, 0)); // 透明背景
+        graphics.fillRect(0, 0, width, height);
+
+        // 使用二维码的点阵来绘制二维码
+        graphics.setColor(Color.BLACK);
+        for (int x = 0; x < width; x++) {
+            for (int y = 0; y < height; y++) {
+                if (bitMatrix.get(x, y)) {
+                    graphics.fillRect(x, y, 1, 1);
+                }
+            }
+        }
+
+        graphics.dispose();
+        return image;
+    }
+
+
+
+
+}

+ 78 - 0
business-entity/src/main/java/com/rongwei/bsentity/domain/ZhcxSeaBindProofDetalDo.java

@@ -0,0 +1,78 @@
+package com.rongwei.bsentity.domain;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.rongwei.rwcommon.base.BaseDo;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.util.Date;
+
+
+/**
+ * 海绑证明子表
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@TableName("ZHCX_INSPECTION_SEA_BIND_PROOF_DETAL")
+public class ZhcxSeaBindProofDetalDo extends BaseDo {
+
+    private static final long serialVersionUID=1L;
+
+    /**
+     * 主键
+     */
+    @TableField("ID")
+    private String id;
+    /**
+     * 租户id
+     */
+    @TableField("TENANTID")
+    private String tenantid;
+    /**
+     * 扩展json格式配置
+     */
+    @TableField("ROPTION")
+    private String roption;
+
+    /**
+     * 日期
+     */
+    @TableField("DATE")
+    private String date;
+
+    /**
+     *检查内容
+     */
+    @TableField("ITEMS")
+    private String items;
+    /**
+     *检查结果
+     */
+    @TableField("CHECKRESULT")
+    private String checkresult;
+    /**
+     *qc检验员
+     */
+    @TableField("QCINSPECTOR")
+    private String qcinspector;
+    /**
+     *无损检验员UT
+     */
+    @TableField("UT")
+    private String ut;
+    /**
+     *无损检验员MT
+     */
+    @TableField("MT")
+    private String mt ;
+    /**
+     *Pid
+     */
+    @TableField("PID")
+    private String pid ;
+
+
+}

+ 95 - 0
business-entity/src/main/java/com/rongwei/bsentity/domain/ZhcxSeaBindProofDo.java

@@ -0,0 +1,95 @@
+package com.rongwei.bsentity.domain;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.rongwei.rwcommon.base.BaseDo;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.util.Date;
+
+
+/**
+ * 海绑证明表
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@TableName("ZHCX_INSPECTION_SEA_BIND_PROOF")
+public class ZhcxSeaBindProofDo extends BaseDo {
+
+    private static final long serialVersionUID=1L;
+
+    /**
+     * 主键
+     */
+    @TableField("ID")
+    private String id;
+    /**
+     * 租户id
+     */
+    @TableField("TENANTID")
+    private String tenantid;
+    /**
+     * 扩展json格式配置
+     */
+    @TableField("ROPTION")
+    private String roption;
+
+    /**
+     * 日期
+     */
+    @TableField("DATE")
+    private String date;
+
+    /**
+     *经理副经理
+     */
+    @TableField("QCMANAGER")
+    private String qcmanager;
+
+
+    /**
+     *主任副主任
+     */
+    @TableField("QCLEADER")
+    private String qcleader;
+    /**
+     *绑扎图号
+     */
+    @TableField("DRAWINGNO")
+    private String drawingno;
+    /**
+     *运输船名
+     */
+    @TableField("SHIPPINGNO")
+    private String shippingno;
+/**
+ *产品机号
+ */
+    @TableField("CRANENO")
+    private String craneno ;
+/**
+ *产品名称
+ */
+    @TableField("PROJECTNAME")
+    private String projectname;
+/**
+ *产品工号
+ */
+    @TableField("PROJECTCODE")
+    private String projectcode;
+//    /**
+//     *备注
+//     */
+//    @TableField("REMARK")
+//    private String remark;
+    /**
+     *备注记录
+     */
+    @TableField("RECORDREMARK")
+    private String recordremark;
+
+
+}

+ 55 - 0
business-server/src/main/java/com/rongwei/bsserver/controller/ZhcxSeaBindProofController.java

@@ -0,0 +1,55 @@
+package com.rongwei.bsserver.controller;
+
+import com.rongwei.bscommon.sys.service.ZhcxSeaBindProofService;
+import com.rongwei.bsentity.domain.ZhcxInspectionReportManageDo;
+import com.rongwei.bsentity.domain.ZhcxSeaBindProofDo;
+import com.rongwei.rwcommoncomponent.file.service.SysFileItemService;
+import com.rongwei.rwcommonentity.commonservers.domain.SysFileItemDo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.core.io.FileSystemResource;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
+import java.io.File;
+import java.util.Map;
+
+@RestController
+@RequestMapping("/zhcxSeaBindProof")
+public class ZhcxSeaBindProofController {
+    @Autowired
+    ZhcxSeaBindProofService zhcxSeaBindProofService;
+    @Autowired
+    SysFileItemService sysFileItemService;
+    @PostMapping("/downloadSeaExcel/{id}")
+    public void downloadExcel(HttpServletResponse response, @PathVariable("id") String id) {
+        try {
+//            String id  = map.get("id");
+            ZhcxSeaBindProofDo zhcxSeaBindProofDo = new ZhcxSeaBindProofDo();
+            zhcxSeaBindProofDo.setId(id);
+            zhcxSeaBindProofService.seabingdownloadExcel(response,zhcxSeaBindProofDo);
+        } catch (Exception e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+
+    @RequestMapping("/previewSeaExcel/{id}")
+    public void previewExcel(HttpServletResponse response,@PathVariable("id") String id) {
+        try {
+            ZhcxSeaBindProofDo zhcxSeaBindProofDo = new ZhcxSeaBindProofDo();
+            zhcxSeaBindProofDo.setId(id);
+            zhcxSeaBindProofService.seabingPreviewExcel(response,zhcxSeaBindProofDo);
+        } catch (Exception e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+
+
+
+
+}

+ 3 - 0
business-server/src/main/resources/bootstrap.yml

@@ -100,6 +100,9 @@ wz-provider:
   url: http://61.177.40.178:5500/api
   syncWzDataUrl: ${wz-provider.url}//PersistentDisease/detailedList/syncByData
 
+hb-provider:
+  url: http://61.177.40.178:4300
+
 #luckysheet
 luckysheet-provider:
   url: http://127.0.0.1:9004