Quellcode durchsuchen

出入登记新增 备注

zhulu vor 10 Monaten
Ursprung
Commit
9f678c97e3

+ 11 - 0
project_data/sql/1.0.11/soc/soc.sql

@@ -48,6 +48,17 @@ END IF;
                         AND column_name = 'producer') THEN
 ALTER TABLE  `iot_server_product`
     ADD COLUMN `producer` varchar(125) NULL AFTER `models`;
+
+
+IF NOT EXISTS(SELECT *
+                      FROM information_schema.columns
+                      WHERE table_schema = DATABASE()
+                        AND table_name = 'core_out_in_record'
+                        AND column_name = 'remark') THEN
+ALTER TABLE `core_out_in_record`
+    ADD COLUMN `remark` varchar(255) NULL COMMENT '备注信息' AFTER `update_time`;
+
+
 END IF;
 
 delete from iot_server_product;

+ 3 - 0
soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/letter/domain/CoreOutInRecord.java

@@ -147,4 +147,7 @@ public class CoreOutInRecord extends BaseEntity {
     @ApiModelProperty(value = "出入人员Id")
     private Long outInRequestUserId;
 
+    @ApiModelProperty(value = "备注信息")
+    private String remark;
+
 }

+ 2 - 0
soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/letter/vo/CoreOutInRecordVo.java

@@ -168,5 +168,7 @@ public class CoreOutInRecordVo{
 
     private Long outInRequestUserId;
 
+    /*备注信息*/
+    private String remark;
 
 }

+ 2 - 1
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/letter/service/impl/CoreOutInRecordServiceImpl.java

@@ -373,7 +373,8 @@ public class CoreOutInRecordServiceImpl extends ServiceImpl<CoreOutInRecordMappe
         data.put("createBy", record.getCreateBy());
         //陪同人员人员
         data.put("accompanyingPerson", record.getAccompanyingPerson());
-
+        //备注信息
+        data.put("remark", record.getRemark());
         return data;
     }
 

+ 49 - 17
soc-modules/soc-modules-file/src/main/java/com/xunmei/file/utils/PdfUtil.java

@@ -423,7 +423,11 @@ public class PdfUtil {
         dealImageCell((List<String>) data.get("approveSign"), table, 1, 80, 30, 2, 1);
         createPDFCell(tableFont, table, "登记人签字", Element.ALIGN_MIDDLE, 1, 1);
         dealImageCell((List<String>) data.get("submitSign"), table, 1, 80, 30, 2, 1);
-//           /statics/2023/12/05/20231205183106A001.png
+        //第8行
+        createPDFCell(tableFont, table, "备注", Element.ALIGN_MIDDLE, 1, 1);
+        createPDFCell(tableFont, table, data.get("remark").toString(), Element.ALIGN_MIDDLE, 5, 1);
+
+
         //证件图片
         createPDFCell(tableFont, table, "证件图片", Element.ALIGN_MIDDLE, 1, 1);
         //证件图片 图片填充
@@ -440,10 +444,32 @@ public class PdfUtil {
         cell1.addElement(imageTable1);
         table.addCell(cell1);
 
+        // 核查结果图片为非必填,没有图片时不显示
+        List<String> checkImages= (List<String>) data.get("checkImage");
+        if(!checkImages.isEmpty())
+        {
+            createPDFCell(tableFont, table, "核查结果", Element.ALIGN_MIDDLE, 1, 1);
+            final PdfPTable imageTable3 = getImage((List<String>) data.get("checkImage"), 2, 190, 190, 2);
+            final PdfPCell cell3 = new PdfPCell();
+            cell3.setNoWrap(false);
+            cell3.setPaddingLeft(4f);
+            cell3.setPaddingRight(4f);
+            cell3.setPaddingBottom(4f);
+            cell3.setPaddingTop(4f);
+            cell3.setColspan(5);
+            cell3.setRowspan(1);
+            //cell1.setBorder(Rectangle.LEFT | Rectangle.RIGHT | Rectangle.BOTTOM);
+            cell3.addElement(imageTable3);
+            table.addCell(cell3);
+            document.add(table);
+        }
+
+
         List<String> files= (List<String>) data.get("file");
         List<String> files1=new ArrayList<>();
         List<String> files2= new ArrayList<>();
-        if(ObjectUtil.isNotEmpty(files))
+        // 没有 核查结果 图片 时 需要把 介绍信图片上移
+        if(ObjectUtil.isNotEmpty(files) && ObjectUtil.isEmpty(checkImages))
         {
             files1= files.subList(0,1);
             if(files.size()>1)
@@ -451,22 +477,28 @@ public class PdfUtil {
                 files2= files.subList(1,files.size());
             }
         }
+        else{
+            files2=files;
+        }
+        // 没有 核查结果 图片 时 需要把 介绍信图片上移
+        if(ObjectUtil.isNotEmpty(files1))
+        {
+            createPDFCell(tableFont, table, "介绍信附件", Element.ALIGN_MIDDLE, 1, 1);
+            final PdfPTable imageTable3 = getImage(files1, 1, 380, 320, 1);
+            final PdfPCell cell3 = new PdfPCell();
+            cell3.setNoWrap(false);
+            cell3.setPaddingLeft(4f);
+            cell3.setPaddingRight(4f);
+            cell3.setPaddingBottom(4f);
+            cell3.setPaddingTop(4f);
+            cell3.setColspan(5);
+            cell3.setRowspan(1);
+            //cell1.setBorder(Rectangle.LEFT | Rectangle.RIGHT | Rectangle.BOTTOM);
+            cell3.addElement(imageTable3);
+            table.addCell(cell3);
+            document.add(table);
+        }
 
-        createPDFCell(tableFont, table, "介绍信附件", Element.ALIGN_MIDDLE, 1, 1);
-        final PdfPTable imageTable3 = getImage(files1, 1, 380, 320, 1);
-        final PdfPCell cell3 = new PdfPCell();
-        cell3.setNoWrap(false);
-        cell3.setPaddingLeft(4f);
-        cell3.setPaddingRight(4f);
-        cell3.setPaddingBottom(4f);
-        cell3.setPaddingTop(4f);
-        cell3.setColspan(5);
-        cell3.setRowspan(1);
-        //cell1.setBorder(Rectangle.LEFT | Rectangle.RIGHT | Rectangle.BOTTOM);
-        cell3.addElement(imageTable3);
-        table.addCell(cell3);
-
-        document.add(table);
         if(files2.size()>0)
         {
             PdfPTable innerTable = new PdfPTable(6);