Browse Source

Merge branch 'V0.0.2' of http://10.87.10.227:4000/jzyd_yyds/soc into V0.0.2

jiawuxian 1 year ago
parent
commit
3052add372
30 changed files with 806 additions and 100 deletions
  1. 45 4
      project_data/sql/0.0.3/soc/soc.sql
  2. 3 0
      soc-api/soc-api-system/src/main/java/com/xunmei/system/api/RemoteFileService.java
  3. 1 1
      soc-api/soc-api-system/src/main/java/com/xunmei/system/api/domain/SysUserInformation.java
  4. 5 0
      soc-api/soc-api-system/src/main/java/com/xunmei/system/api/factory/RemoteFileFallbackFactory.java
  5. 8 5
      soc-common/soc-common-core/src/main/java/com/xunmei/common/core/constant/DictConstants.java
  6. 14 20
      soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/drill/domain/CoreDrillDictionary.java
  7. 5 3
      soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/drill/dto/CoreDrillDictionaryInsertDto.java
  8. 4 1
      soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/drill/dto/CoreDrillDictionaryPageDto.java
  9. 9 5
      soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/drill/vo/CoreDrillDictionaryDetailVo.java
  10. 6 7
      soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/drill/vo/CoreDrillDictionaryPageVo.java
  11. 1 1
      soc-common/soc-common-security/src/main/java/com/xunmei/common/security/utils/DictUtils.java
  12. 18 9
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/drill/service/impl/CoreDrillDictionaryServiceImpl.java
  13. 17 3
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/drill/service/impl/CoreDrillTaskServiceImpl.java
  14. 16 21
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/edu/service/impl/CoreEduTrainingTaskServiceImpl.java
  15. 7 3
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/controller/ApiPlanController.java
  16. 1 0
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/domain/AppPlan.java
  17. 2 0
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/mapper/ResumptionMapper.java
  18. 2 0
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/service/AppPlanService.java
  19. 98 4
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/service/impl/AppPlanServiceImpl.java
  20. 4 2
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/vo/resumptionRecord/AppResumptionDataInfoVo.java
  21. 2 2
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/safetyCheck/controller/CoreSafecheckPlanController.java
  22. 1 1
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/safetyCheck/job/SafetyCheckJobBusiness.java
  23. 4 1
      soc-modules/soc-modules-core/src/main/resources/mapper/drill/CoreDrillDictionaryMapper.xml
  24. 9 0
      soc-modules/soc-modules-core/src/main/resources/mapper/resumption/ResumptionMapper.xml
  25. 2 1
      soc-modules/soc-modules-core/src/main/resources/mapper/resumption/ResumptionRecordMapper.xml
  26. 5 0
      soc-modules/soc-modules-file/src/main/java/com/xunmei/file/controller/SysFileController.java
  27. 1 0
      soc-modules/soc-modules-file/src/main/java/com/xunmei/file/service/ISysFileService.java
  28. 272 2
      soc-modules/soc-modules-file/src/main/java/com/xunmei/file/service/LocalSysFileServiceImpl.java
  29. 49 0
      soc-modules/soc-modules-file/src/main/java/com/xunmei/file/utils/AppResumptionDataInfoVo.java
  30. 195 4
      soc-modules/soc-modules-file/src/main/java/com/xunmei/file/utils/PdfUtil.java

+ 45 - 4
project_data/sql/0.0.3/soc/soc.sql

@@ -285,8 +285,19 @@ INSERT INTO sys_dict_type (dict_name, dict_type, status, create_by, create_time,
 INSERT INTO sys_dict_data (dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, update_by, update_time, remark) VALUES (0, '安保履职登记簿', '0', 'register_book_type', null, 'default', 'N', '0', null, now(), null, now(), null);
 INSERT INTO sys_dict_data (dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, update_by, update_time, remark) VALUES (1, '教育培训登记簿', '1', 'register_book_type', null, 'default', 'N', '0', null, now(), null, now(), null);
 INSERT INTO sys_dict_data (dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, update_by, update_time, remark) VALUES (2, '预案演练登记簿', '2', 'register_book_type', null, 'default', 'N', '0', null, now(), null, now(), null);
-
-
+-- 新增行政级别字典
+delete from sys_dict_type where dict_type='administrative_level';
+delete from sys_dict_data where dict_type='administrative_level';
+INSERT INTO sys_dict_type (dict_name, dict_type, status, create_by, create_time, update_by, update_time, remark)
+ VALUES ('行政级别', 'administrative_level', '0', null, now(), null, now(), '省市县');
+INSERT INTO sys_dict_data (dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, update_by, update_time, remark)
+ VALUES (1, '省级', '1', 'administrative_level', null, 'default', 'N', '0', '超级管理员', now(), '超级管理员', now(), '省级');
+INSERT INTO sys_dict_data (dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, update_by, update_time, remark)
+VALUES (2, '市级', '2', 'administrative_level', null, 'default', 'N', '0', '超级管理员', now(), '超级管理员', now(), '市级');
+INSERT INTO sys_dict_data (dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, update_by, update_time, remark)
+VALUES (3, '县级', '3', 'administrative_level', null, 'default', 'N', '0', '超级管理员', now(), '超级管理员', now(), '县级');
+INSERT INTO sys_dict_data (dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, update_by, update_time, remark)
+VALUES (4, '无', '4', 'administrative_level', null, 'default', 'N', '0', '超级管理员', now(), '超级管理员', now(), '无');
 ALTER TABLE  core_protection MODIFY COLUMN id bigint NOT NULL COMMENT '主键';
 ALTER TABLE  core_protection MODIFY COLUMN create_by varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '创建人';
 ALTER TABLE  core_protection MODIFY COLUMN update_by varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '修改人';
@@ -409,7 +420,8 @@ ALTER TABLE  core_safetycheck_rule MODIFY COLUMN update_time datetime NULL COMME
 ALTER TABLE  core_safetycheck_rule MODIFY COLUMN create_by varchar(255) CHARACTER SET utf8mb4;
 -- 修改演练任务表状态字段释义
 alter table core_drill_task  modify status int default 0 null comment '任务状态:0:待登记,5:待提交,1:待签名,2待评价,3:已完成,4:已逾期';
-
+alter table core_drill_dictionary modify drill_type varchar(12) null comment '演练项目,字典表关联取值';
+alter table core_drill_dictionary modify drill_type_name varchar(32) null comment '演练项目名称';
 
 DELIMITER ??
 DROP PROCEDURE IF EXISTS schema_change ??
@@ -421,6 +433,7 @@ DROP PROCEDURE IF EXISTS schema_change ??
         ALTER TABLE `core_resumption`
 			ADD COLUMN `times` smallint NULL COMMENT '第几次' AFTER `role_id`;
     END IF;
+
 		-- 履职表增加提交人
 	IF
         NOT EXISTS ( SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE () and TABLE_NAME = 'core_resumption' AND COLUMN_NAME = 'submitor_id' ) THEN
@@ -428,6 +441,12 @@ DROP PROCEDURE IF EXISTS schema_change ??
 			ADD COLUMN `submitor_id` bigint NULL COMMENT '提交人id' AFTER `submit_time`,
 			ADD COLUMN `submitor_name` varchar(32) NULL COMMENT '提交人姓名' AFTER `submitor_id`;
     END IF;
+		-- 人员补充信息表增加金融安全防范工程专家
+	IF
+NOT EXISTS ( SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE () and TABLE_NAME = 'sys_user_information' AND COLUMN_NAME = 'financial_experts' ) THEN
+ALTER TABLE `sys_user_information`
+    ADD COLUMN `financial_experts`varchar(32) NULL COMMENT '金融安全防范工程专家'
+END IF;
 	-- 机构扩展添加字段
     IF
         NOT EXISTS ( SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE () and TABLE_NAME = 'sys_org_extend' AND COLUMN_NAME = 'remote_count' ) THEN
@@ -540,6 +559,21 @@ DROP PROCEDURE IF EXISTS schema_change ??
     END IF;
 
 
+
+    -- 演练范本库表增加演练类型字段
+    IF NOT EXISTS(SELECT *
+                  FROM information_schema.columns
+                  WHERE table_schema = DATABASE()
+                    AND table_name = 'core_drill_dictionary'
+                    AND column_name = 'drill_category') THEN
+        alter table core_drill_dictionary
+            add drill_category int null comment '演练类型,字典表取值' after drill_type_name;
+
+        alter table core_drill_dictionary
+            add drill_category_name varchar(125) null comment '演练类型名称' after drill_category;
+    END IF;
+
+
     END ??
 DELIMITER;
 CALL schema_change ();
@@ -645,7 +679,14 @@ insert into sys_role_menu(role_id, menu_id)
 select r.id,m.id
 from sys_role r ,sys_menu m
 where m.menu_name ='演练任务删除' and  m.perms='core:drillTask:remove';
-
+-- 修改字典名称
+update sys_dict_type  SET dict_name = '预案演练项目' WHERE dict_name = '预案演练类型' and dict_type='core_drill_type' limit 1;
+-- 新增演练类型字典
+delete  from sys_dict_type where dict_type='core_drill_category';
+delete  from sys_dict_data where dict_type='core_drill_category';
+INSERT INTO sys_dict_type (dict_name, dict_type, status, create_by, create_time, update_by, update_time, remark) VALUES ('预案演练类型', 'core_drill_category', '0', null, now(), null, now(), null);
+INSERT INTO sys_dict_data (dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, update_by, update_time, remark) VALUES (10, '季度应急预案', '1', 'core_drill_category', null, 'default', 'N', '0',  null, now(), null, now(), null);
+INSERT INTO sys_dict_data (dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, update_by, update_time, remark) VALUES (20, '消防应急预案', '2', 'core_drill_category', null, 'default', 'N', '0',  null, now(), null, now(), null);
 
 -- 报警控制器
 ALTER TABLE `core_protection_log`

+ 3 - 0
soc-api/soc-api-system/src/main/java/com/xunmei/system/api/RemoteFileService.java

@@ -40,6 +40,9 @@ public interface RemoteFileService {
     @PostMapping(value = "/file/generateEduTrainingPdf")
     R<String> generateEduTrainingPdf(@RequestBody Map<String, Object> data);
 
+    @PostMapping(value = "/file/generateResumptionPdf")
+    R<String> generateResumptionPdf(@RequestBody Map<String, Object> data);
+
     /**
      * 生成预案演练登记簿
      *

+ 1 - 1
soc-api/soc-api-system/src/main/java/com/xunmei/system/api/domain/SysUserInformation.java

@@ -141,7 +141,7 @@ public class SysUserInformation extends BaseEntity {
      */
     private String delFlag;
 
-
+private String financialExperts;
     @Override
     public String toString() {
         return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)

+ 5 - 0
soc-api/soc-api-system/src/main/java/com/xunmei/system/api/factory/RemoteFileFallbackFactory.java

@@ -37,6 +37,11 @@ public class RemoteFileFallbackFactory implements FallbackFactory<RemoteFileServ
             }
 
             @Override
+            public R<String> generateResumptionPdf(Map<String, Object> data) {
+                return null;
+            }
+
+            @Override
             public R<String> generateDrillPdf(Map<String, Object> data) {
                 log.error("生成预案演练登记簿失败:{},参数:{}", throwable.getMessage(), JSON.toJSONString(data));
                 return null;

+ 8 - 5
soc-common/soc-common-core/src/main/java/com/xunmei/common/core/constant/DictConstants.java

@@ -1,10 +1,6 @@
 package com.xunmei.common.core.constant;
 
 
-import cn.hutool.core.util.ObjectUtil;
-
-import java.util.List;
-
 /**
  * @author jingyuanchao
  * @date 2023/9/8 18:33
@@ -242,10 +238,17 @@ public class DictConstants {
     public static final String REALITY_ORG_TYPE = "reality_org_type";
 
     /**
-     * 预案演练类型
+     * 预案演练项目
      */
     public static final String CORE_DRILL_TYPE = "core_drill_type";
+    /**
+     * 预案演练推荐状态
+     */
     public static final String DRILL_TASK_REC_STATUS = "drill_task_rec_status";
+    /**
+     * 预案演练类型
+     */
+    public static final String CORE_DRILL_CATEGORY = "core_drill_category";
 
 
 

+ 14 - 20
soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/drill/domain/CoreDrillDictionary.java

@@ -1,15 +1,12 @@
 package com.xunmei.common.core.domain.drill.domain;
 
 import com.baomidou.mybatisplus.annotation.*;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-
+import com.xunmei.common.core.web.domain.BaseEntity;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
-import com.xunmei.common.core.web.domain.BaseEntity;
 
 /**
  * 预案演练库对象 core_drill_dictionary
@@ -43,15 +40,24 @@ public class CoreDrillDictionary extends BaseEntity {
     private String orgPath;
 
     @TableField("drill_type")
-    @ApiModelProperty(value = "演练类型,字典表关联取值")
+    @ApiModelProperty(value = "演练项目,字典表关联取值")
     private String drillType;
 
     @TableField("drill_type_name")
-    @ApiModelProperty(value = "演练类型名称")
+    @ApiModelProperty(value = "演练项目名称")
     private String drillTypeName;
 
-    @TableField("drill_projects")
-    @ApiModelProperty(value = "演练项目")
+
+    @TableField("drill_category")
+    @ApiModelProperty(value = "演练类型,字典表关联取值")
+    private String drillCategory;
+
+    @TableField("drill_category_name")
+    @ApiModelProperty(value = "演练类型名称")
+    private String drillCategoryName;
+
+    @TableField(exist = false)
+    @ApiModelProperty(value = "解决方案")
     private String drillProjects;
 
     @TableField("default_cause")
@@ -63,16 +69,4 @@ public class CoreDrillDictionary extends BaseEntity {
     @TableField(value = "deleted")
     private int deleted;
 
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
-                .append("id", getId())
-                .append("drillType", getDrillType())
-                .append("drillTypeName", getDrillTypeName())
-                .append("drillProjects", getDrillProjects())
-                .append("defaultCause", getDefaultCause())
-                .append("deleted", getDeleted())
-                .toString();
-    }
 }

+ 5 - 3
soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/drill/dto/CoreDrillDictionaryInsertDto.java

@@ -1,6 +1,5 @@
 package com.xunmei.common.core.domain.drill.dto;
 
-import com.baomidou.mybatisplus.annotation.TableField;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
@@ -18,11 +17,14 @@ public class CoreDrillDictionaryInsertDto {
     @ApiModelProperty(value = "机构")
     private Long orgId;
 
+    @NotNull(message = "演练项目不能为空")
+    @ApiModelProperty(value = "演练项目,字典表关联取值")
+    private String drillType;
+
     @NotNull(message = "演练类型不能为空")
     @ApiModelProperty(value = "演练类型,字典表关联取值")
-    private String drillType;
+    private String drillCategory;
 
-    @NotEmpty(message = "解决方案不能为空")
     @ApiModelProperty(value = "解决方案")
     private String drillProjects;
 

+ 4 - 1
soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/drill/dto/CoreDrillDictionaryPageDto.java

@@ -24,9 +24,12 @@ public class CoreDrillDictionaryPageDto extends PageRequest {
     @JsonSerialize(using = ToStringSerializer.class)
     private Long id;
 
-    @ApiModelProperty(value = "演练类型,字典表关联取值")
+    @ApiModelProperty(value = "演练项目,字典表关联取值")
     private String drillType;
 
+    @ApiModelProperty(value = "演练类型,字典表关联取值")
+    private String drillCategory;
+
     @ApiModelProperty(value = "演练场景")
     private String drillProjects;
 

+ 9 - 5
soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/drill/vo/CoreDrillDictionaryDetailVo.java

@@ -3,8 +3,6 @@ package com.xunmei.common.core.domain.drill.vo;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
-import javax.validation.constraints.NotNull;
-
 /**
  * @author jingyuanchao
  * @date 2023/9/8 19:41
@@ -12,15 +10,21 @@ import javax.validation.constraints.NotNull;
 @Data
 public class CoreDrillDictionaryDetailVo {
     private Integer id;
-    @NotNull(message = "演练类型不能为空")
     @ApiModelProperty(value = "演练类型,字典表关联取值")
     private String drillType;
+
     @ApiModelProperty(value = "演练类型名称,字典表关联取值")
     private String drillTypeName;
-    @NotNull(message = "演练项目不能为空")
+
     @ApiModelProperty(value = "演练项目")
     private String drillProjects;
-    @NotNull(message = "预设案由不能为空")
+
     @ApiModelProperty(value = "预设案由")
     private String defaultCause;
+
+    @ApiModelProperty(value = "演练类型,字典表关联取值")
+    private String drillCategory;
+
+    @ApiModelProperty(value = "演练类型名称")
+    private String drillCategoryName;
 }

+ 6 - 7
soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/drill/vo/CoreDrillDictionaryPageVo.java

@@ -1,8 +1,5 @@
 package com.xunmei.common.core.domain.drill.vo;
 
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableLogic;
 import com.fasterxml.jackson.databind.annotation.JsonSerialize;
 import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
 import io.swagger.annotations.ApiModelProperty;
@@ -31,14 +28,16 @@ public class CoreDrillDictionaryPageVo {
     @ApiModelProperty(value = "演练类型名称")
     private String drillTypeName;
 
+    @ApiModelProperty(value = "演练类型,字典表关联取值")
+    private String drillCategory;
+
+    @ApiModelProperty(value = "演练类型名称")
+    private String drillCategoryName;
+
     @ApiModelProperty(value = "演练项目")
     private String drillProjects;
 
     @ApiModelProperty(value = "预设案由")
     private String defaultCause;
 
-    @ApiModelProperty(value = "删除标志", notes = "0:未删除,1:已删除")
-    @TableLogic(value = "0", delval = "1")
-    @TableField(value = "deleted")
-    private int deleted;
 }

+ 1 - 1
soc-common/soc-common-security/src/main/java/com/xunmei/common/security/utils/DictUtils.java

@@ -76,7 +76,7 @@ public class DictUtils {
         final List<SysDictData> statusTextList = DictUtils.getDictCache(status);
         if (ObjectUtil.isNotEmpty(statusTextList) && ObjectUtil.isNotNull(statusNum)) {
             Optional<SysDictData> optional = statusTextList.stream()
-                    .filter(dict -> ObjectUtil.equal(dict.getDictValue(), String.valueOf(statusNum)))
+                    .filter(dict -> ObjectUtil.equal(String.valueOf(dict.getDictValue()), String.valueOf(statusNum)))
                     .findFirst();
             if (optional.isPresent()) {
                 return optional.get().getDictLabel();

+ 18 - 9
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/drill/service/impl/CoreDrillDictionaryServiceImpl.java

@@ -1,6 +1,7 @@
 package com.xunmei.core.drill.service.impl;
 
 import cn.hutool.core.util.ObjectUtil;
+import com.alibaba.nacos.shaded.io.grpc.netty.shaded.io.netty.util.internal.StringUtil;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -64,7 +65,13 @@ public class CoreDrillDictionaryServiceImpl extends ServiceImpl<CoreDrillDiction
                 page = coreDrillDictionaryMapper.selectPageData4(request.getPageRequest(), request);
             }
         }
-
+        page.getRecords()
+                .forEach(coreDrillDictionaryPageVo -> {
+                    if (StringUtil.isNullOrEmpty(coreDrillDictionaryPageVo.getDrillCategory())) {
+                        return;
+                    }
+                    coreDrillDictionaryPageVo.setDrillCategoryName(DictUtils.getDictLabel(DictConstants.CORE_DRILL_CATEGORY, Integer.parseInt(coreDrillDictionaryPageVo.getDrillCategory())));
+                });
 
         //抓换为TableDataInfo适配前端
         return TableDataInfo.build(page);
@@ -113,8 +120,11 @@ public class CoreDrillDictionaryServiceImpl extends ServiceImpl<CoreDrillDiction
      */
     @Override
     public CoreDrillDictionaryDetailVo selectCoreDrillDictionaryById(Long id) {
-        return coreDrillDictionaryMapper.selectDetailData(id);
-
+        CoreDrillDictionaryDetailVo coreDrillDictionaryDetailVo = coreDrillDictionaryMapper.selectDetailData(id);
+        if (ObjectUtil.isNotEmpty(coreDrillDictionaryDetailVo.getDrillCategory())){
+            coreDrillDictionaryDetailVo.setDrillCategoryName(DictUtils.getDictLabel(DictConstants.CORE_DRILL_CATEGORY, Integer.parseInt(coreDrillDictionaryDetailVo.getDrillCategory())));
+        }
+        return coreDrillDictionaryDetailVo;
     }
 
     /**
@@ -132,6 +142,8 @@ public class CoreDrillDictionaryServiceImpl extends ServiceImpl<CoreDrillDiction
         if (null != drillTypeDictList && ObjectUtil.isNotEmpty(drillTypeDictList)) {
             drillTypeDictList.stream().filter(dict -> ObjectUtil.equal(dict.getDictValue(), request.getDrillType())).findFirst().ifPresent(dict -> dictionary.setDrillTypeName(dict.getDictLabel()));
         }
+
+        dictionary.setDrillCategoryName(DictUtils.getDictLabel(DictConstants.CORE_DRILL_CATEGORY, Integer.parseInt(request.getDrillCategory())));
         SysOrg sysOrg = getOrg(SecurityUtils.getLoginUser().getOrgId());
         dictionary.setOrgName(sysOrg.getShortName());
         dictionary.setOrgPath(sysOrg.getPath());
@@ -186,12 +198,7 @@ public class CoreDrillDictionaryServiceImpl extends ServiceImpl<CoreDrillDiction
         List<CoreDrillDictionary> selectList = coreDrillDictionaryMapper.selectList(new LambdaQueryWrapper<CoreDrillDictionary>()
                 .eq(CoreDrillDictionary::getDeleted, 0)
                 // .likeRight(CoreDrillDictionary::getOrgPath, path)
-                .eq(ObjectUtil.isNotNull(dictValue), CoreDrillDictionary::getDrillType, dictValue)
-                .select(CoreDrillDictionary::getId
-                        , CoreDrillDictionary::getDrillTypeName
-                        , CoreDrillDictionary::getDrillType
-                        , CoreDrillDictionary::getDrillProjects
-                        , CoreDrillDictionary::getDefaultCause));
+                .eq(ObjectUtil.isNotNull(dictValue), CoreDrillDictionary::getDrillType, dictValue));
         return selectList.stream().map(coreDrillDictionary -> {
             CoreDrillDictionaryDetailVo detailVo = new CoreDrillDictionaryDetailVo();
             detailVo.setId(coreDrillDictionary.getId());
@@ -199,6 +206,8 @@ public class CoreDrillDictionaryServiceImpl extends ServiceImpl<CoreDrillDiction
             detailVo.setDrillTypeName(coreDrillDictionary.getDrillTypeName());
             detailVo.setDrillProjects(coreDrillDictionary.getDrillTypeName());
             detailVo.setDefaultCause(coreDrillDictionary.getDefaultCause());
+            detailVo.setDrillCategory(coreDrillDictionary.getDrillCategory());
+            detailVo.setDrillCategoryName(coreDrillDictionary.getDrillCategoryName());
             return detailVo;
         }).collect(Collectors.toList());
     }

+ 17 - 3
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/drill/service/impl/CoreDrillTaskServiceImpl.java

@@ -22,11 +22,12 @@ import com.xunmei.common.core.domain.drill.vo.*;
 import com.xunmei.common.core.domain.panel.dto.PanelListDto;
 import com.xunmei.common.core.domain.panel.enums.PanelTypeEnums;
 import com.xunmei.common.core.domain.panel.vo.PanelListVo;
+import com.xunmei.common.core.domain.registerbook.domain.CoreRegisterBookPdf;
 import com.xunmei.common.core.domain.worktime.domain.SysWorkTime;
 import com.xunmei.common.core.domain.worktime.dto.WorkTimeDto;
 import com.xunmei.common.core.enums.CycleCommonEnum;
-import com.xunmei.common.core.enums.RegisterBookType;
 import com.xunmei.common.core.enums.OrgTypeEnum;
+import com.xunmei.common.core.enums.RegisterBookType;
 import com.xunmei.common.core.enums.drill.*;
 import com.xunmei.common.core.enums.edu.EduTrainingPlanCycleEnum;
 import com.xunmei.common.core.exception.SystemException;
@@ -40,8 +41,8 @@ import com.xunmei.core.drill.mapper.CoreDrillTaskMapper;
 import com.xunmei.core.drill.mapper.CoreDrillTaskToRoleMapper;
 import com.xunmei.core.drill.mapper.CoreDrillTaskToUserMapper;
 import com.xunmei.core.drill.service.ICoreDrillTaskService;
-import com.xunmei.core.drill.service.ICoreDrillTaskToRoleService;
 import com.xunmei.core.drill.service.ICoreDrillTaskToUserService;
+import com.xunmei.core.registerbook.service.ICoreRegisterBookPdfService;
 import com.xunmei.core.thread.ThreadPoolConfig;
 import com.xunmei.system.api.*;
 import com.xunmei.system.api.domain.SysConfig;
@@ -90,7 +91,7 @@ public class CoreDrillTaskServiceImpl extends ServiceImpl<CoreDrillTaskMapper, C
     @Autowired
     private RemoteRoleService roleService;
     @Autowired
-    private ICoreDrillTaskToRoleService coreDrillTaskToRoleService;
+    private ICoreRegisterBookPdfService registerBookPdfService;
     @Autowired
     private CoreDrillTaskToRoleMapper taskToRoleMapper;
     @Autowired
@@ -619,6 +620,19 @@ public class CoreDrillTaskServiceImpl extends ServiceImpl<CoreDrillTaskMapper, C
             updateWrapper.eq(CoreDrillTask::getId, id);
             updateWrapper.set(CoreDrillTask::getPdfUrl, pdfUrl);
             this.update(updateWrapper);
+
+            CoreRegisterBookPdf registerBookPdf = new CoreRegisterBookPdf();
+            registerBookPdf.setId(IdWorker.getId());
+            registerBookPdf.setRegisterBookType(RegisterBookType.SAFETY_DRILL.getNum());
+            registerBookPdf.setDate(new Date());
+            registerBookPdf.setOrgId(task.getOrgId());
+            registerBookPdf.setOrgName(task.getOrgName());
+            registerBookPdf.setOrgPath(sysOrg.getPath());
+            registerBookPdf.setFileUrl(pdfUrl);
+            registerBookPdf.setFileName(StringUtils.substringAfterLast(pdfUrl, "/"));
+            registerBookPdfService.save(registerBookPdf);
+
+
         }, threadPoolTaskExecutor);
 
         return AjaxResult.success("正在生成pdf,请稍后刷新页面查看!");

+ 16 - 21
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/edu/service/impl/CoreEduTrainingTaskServiceImpl.java

@@ -25,11 +25,13 @@ import com.xunmei.common.core.domain.edu.vo.*;
 import com.xunmei.common.core.domain.panel.dto.PanelListDto;
 import com.xunmei.common.core.domain.panel.enums.PanelTypeEnums;
 import com.xunmei.common.core.domain.panel.vo.PanelListVo;
+import com.xunmei.common.core.domain.registerbook.domain.CoreRegisterBookPdf;
+import com.xunmei.common.core.domain.worktime.domain.SysWorkTime;
 import com.xunmei.common.core.domain.worktime.dto.WorkTimeDto;
 import com.xunmei.common.core.enums.CycleCommonEnum;
-import com.xunmei.common.core.enums.edu.EduTrainingPlanCycleEnum;
 import com.xunmei.common.core.enums.RegisterBookType;
 import com.xunmei.common.core.enums.edu.EduTrainingDoStatus;
+import com.xunmei.common.core.enums.edu.EduTrainingPlanCycleEnum;
 import com.xunmei.common.core.enums.edu.EduTrainingPlanStatus;
 import com.xunmei.common.core.event.WorkTimeChangeEvent;
 import com.xunmei.common.core.exception.SystemException;
@@ -42,8 +44,8 @@ import com.xunmei.core.edu.mapper.CoreEduTrainingTaskMapper;
 import com.xunmei.core.edu.mapper.CoreEduTrainingTaskToRoleMapper;
 import com.xunmei.core.edu.mapper.CoreEduTrainingTaskToUserMapper;
 import com.xunmei.core.edu.service.ICoreEduTrainingTaskService;
-import com.xunmei.core.edu.service.ICoreEduTrainingTaskToRoleService;
 import com.xunmei.core.edu.service.ICoreEduTrainingTaskToUserService;
+import com.xunmei.core.registerbook.service.ICoreRegisterBookPdfService;
 import com.xunmei.core.thread.ThreadPoolConfig;
 import com.xunmei.system.api.RemoteFileService;
 import com.xunmei.system.api.RemoteOrgService;
@@ -51,7 +53,6 @@ import com.xunmei.system.api.RemoteRoleService;
 import com.xunmei.system.api.RemoteWorkTimeService;
 import com.xunmei.system.api.domain.SysOrg;
 import com.xunmei.system.api.domain.SysUser;
-import com.xunmei.common.core.domain.worktime.domain.SysWorkTime;
 import com.xunmei.system.api.function.RemoteCallHandlerExecutor;
 import io.netty.util.internal.StringUtil;
 import lombok.extern.slf4j.Slf4j;
@@ -99,7 +100,7 @@ public class CoreEduTrainingTaskServiceImpl extends ServiceImpl<CoreEduTrainingT
     @Autowired
     private RemoteRoleService roleService;
     @Autowired
-    private ICoreEduTrainingTaskToRoleService coreEduTrainingTaskToRoleService;
+    private ICoreRegisterBookPdfService registerBookPdfService;
     @Autowired
     private CoreEduTrainingTaskToRoleMapper taskToRoleMapper;
     @Autowired
@@ -682,25 +683,19 @@ public class CoreEduTrainingTaskServiceImpl extends ServiceImpl<CoreEduTrainingT
             updateWrapper.eq(CoreEduTrainingTask::getId, id);
             updateWrapper.set(CoreEduTrainingTask::getPdfUrl, pdfUrl);
             this.update(updateWrapper);
+
+            CoreRegisterBookPdf registerBookPdf = new CoreRegisterBookPdf();
+            registerBookPdf.setId(IdWorker.getId());
+            registerBookPdf.setRegisterBookType(RegisterBookType.EDUCATION_TRAINING.getNum());
+            registerBookPdf.setDate(new Date());
+            registerBookPdf.setOrgId(task.getOrgId());
+            registerBookPdf.setOrgName(task.getOrgName());
+            registerBookPdf.setOrgPath(sysOrg.getPath());
+            registerBookPdf.setFileUrl(pdfUrl);
+            registerBookPdf.setFileName(StringUtils.substringAfterLast(pdfUrl, "/"));
+            registerBookPdfService.save(registerBookPdf);
         }, threadPoolTaskExecutor);
 
-       /* //新方式生成pdf
-        try {
-            String url = createEduPdfByNewType(data, dest);
-            //此处set以后 jpa框架自动保存入库
-            edu.setPdfUrl(url);
-
-            final RegisterBookPdf bookPdf = new RegisterBookPdf();
-            bookPdf.setId(IDHelper.id());
-            bookPdf.setRegisterBookType(ExportPdfType.EDUCATION_TRAINING);
-            bookPdf.setDate(new Date());
-            bookPdf.setOrgId(edu.getOrgId());
-            bookPdf.setPdfUrl(url);
-            registerBookPdfMapper.insert(bookPdf);
-            return url;
-        } catch (Exception e) {
-            throw new RuntimeException(e);
-        }*/
         return AjaxResult.success("正在生成pdf,请稍后刷新页面查看!");
     }
 

+ 7 - 3
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/controller/ApiPlanController.java

@@ -131,6 +131,10 @@ public class ApiPlanController {
         List<Map<String, Object>> list = appPlanService.findByOrg(info);
         return AjaxResult.success(list);
     }
+    @PostMapping("/buildPdf")
+    public void buildPdf() {
+        appPlanService.buildResumptionPdf(4358025846522215L);
+    }
 
     /**
      * 新增 修改履职计划
@@ -148,13 +152,13 @@ public class ApiPlanController {
             AppPlan plan = null;
             plan = appPlanService.getById(info.getId());
             Long planOfOrgType = null;
-            if(info.getId()!=null) {
+            if (info.getId() != null) {
                 planOfOrgType = plan.getPlanOfOrgType();
             }
             //判断是否是编辑并且计划所属任务不存在已完成或者逾期,需要删除所有任务重新生成
-            boolean isEditAll = info.getHasEdit() == null && info.getId() != null&&info.getBuildTaskNow()>0;
+            boolean isEditAll = info.getHasEdit() == null && info.getId() != null && info.getBuildTaskNow() > 0;
             //如果计划所属机构类型为行社并且勾选立即执行,新增的时候立即生成任务
-            if ( isEditAll) {
+            if (isEditAll) {
 
                 //如果编辑
                 List<AppPlan> list = appPlanService.list(new LambdaQueryWrapper<AppPlan>().eq(AppPlan::getParentId, plan.getId()).eq(AppPlan::getDeleted, 0));

+ 1 - 0
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/domain/AppPlan.java

@@ -32,6 +32,7 @@ public class AppPlan extends Model<AppPlan> implements Serializable {
     @TableField(exist = false)
     private Integer orgType;
     private String distribute;
+    private String pdfUrl;
     /**
      * 主键
      */

+ 2 - 0
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/mapper/ResumptionMapper.java

@@ -80,4 +80,6 @@ public interface ResumptionMapper extends BaseMapper<Resumption> {
     int saveResumptionExceptionList(@Param("year") int year, @Param("quarter") int quarter, @Param("month") int month, @Param("roleId") Long roleId);
 
     int saveResumptionExceptionListNew(@Param("orgIds") List<Long> orgIds, @Param("startTime") Date startTime, @Param("endTime") Date endTime, @Param("roleId") Long roleId, @Param("request") CoreSafetyIndexReCalculateDto request);
+
+    List<Resumption> selectByYmdDateAndExec(@Param("date")Date date, @Param("exec")Integer exec,@Param("orgId")Long orgId);
 }

+ 2 - 0
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/service/AppPlanService.java

@@ -2,6 +2,7 @@ package com.xunmei.core.resumption.service;
 
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.xunmei.common.core.web.domain.AjaxResult;
 import com.xunmei.core.resumption.domain.AppPlan;
 import com.xunmei.core.resumption.dto.DistributeDto;
 import com.xunmei.core.resumption.dto.plan.CoreResumptionPlanPageDto;
@@ -86,4 +87,5 @@ public interface AppPlanService extends IService<AppPlan> {
     void cheHui(Long id);
 
     int distributeCheHui(Long id);
+    AjaxResult buildResumptionPdf(Long id);
 }

+ 98 - 4
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/service/impl/AppPlanServiceImpl.java

@@ -6,11 +6,19 @@ import cn.hutool.core.date.DateUtil;
 import cn.hutool.core.util.ObjectUtil;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.xunmei.common.core.constant.ErrorMsgConstants;
 import com.xunmei.common.core.constant.SecurityConstants;
 import com.xunmei.common.core.domain.DateRange;
+import com.xunmei.common.core.domain.R;
+import com.xunmei.common.core.domain.edu.domain.CoreEduTrainingTask;
+import com.xunmei.common.core.domain.edu.domain.CoreEduTrainingTaskToUser;
+import com.xunmei.common.core.domain.edu.vo.CoreEduTrainingTaskDetailVo;
+import com.xunmei.common.core.exception.SystemException;
 import com.xunmei.common.core.utils.DateUtils;
+import com.xunmei.common.core.web.domain.AjaxResult;
 import com.xunmei.common.security.utils.SecurityUtils;
 import com.xunmei.core.resumption.domain.*;
 import com.xunmei.core.resumption.dto.DistributeDto;
@@ -18,22 +26,37 @@ import com.xunmei.core.resumption.dto.DistributeStatusDto;
 import com.xunmei.core.resumption.dto.plan.CoreResumptionPlanPageDto;
 import com.xunmei.core.resumption.mapper.*;
 import com.xunmei.core.resumption.service.AppPlanService;
+import com.xunmei.core.resumption.service.IResumptionRecordService;
 import com.xunmei.core.resumption.task.ResumptionTaskBusiness;
 import com.xunmei.core.resumption.vo.appPlan.AppPlanVo;
 import com.xunmei.core.resumption.vo.appPlan.ResumptionPlanPageVo;
 import com.xunmei.core.resumption.vo.appPlan.RuleItemVo;
 import com.xunmei.core.resumption.vo.appPlan.RuleRequestVo;
+import com.xunmei.core.resumption.vo.resumptionRecord.AppResumptionDataInfoVo;
+import com.xunmei.core.resumption.vo.resumptionRecord.ResumptionRecordItemVo;
+import com.xunmei.core.resumption.vo.resumptionRecord.ResumptionRecordVo;
+import com.xunmei.core.thread.ThreadPoolConfig;
+import com.xunmei.system.api.RemoteFileService;
 import com.xunmei.system.api.RemoteOrgService;
 import com.xunmei.system.api.domain.SysDept;
 import com.xunmei.system.api.domain.SysOrg;
+import com.xunmei.system.api.function.RemoteCallHandlerExecutor;
+import io.netty.util.internal.StringUtil;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
 import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
+import javax.annotation.Resource;
 import java.util.*;
+import java.util.concurrent.CompletableFuture;
 import java.util.stream.Collectors;
 
+import static com.xunmei.common.core.constant.ErrorMsgConstants.QUERY_ORG_DATA_ERROR;
+
 /**
  * @author : 高雄
  * @date :2022/4/27 17:44
@@ -42,13 +65,15 @@ import java.util.stream.Collectors;
  */
 @Service
 public class AppPlanServiceImpl extends ServiceImpl<AppPlanMapper, AppPlan> implements AppPlanService {
-
+    @Resource
+    IResumptionRecordService resumptionRecordService;
     @Autowired
     private AppRuleMapper appRuleMapper;
 
     @Autowired
     private RemoteOrgService orgService;
-
+    @Autowired
+    private RemoteFileService fileService;
     @Autowired
     private AppPlanToRoleMapper appPlanToRoleMapper;
 
@@ -58,6 +83,9 @@ public class AppPlanServiceImpl extends ServiceImpl<AppPlanMapper, AppPlan> impl
     private AppPlanToExecOrgMapper appPlanToExecOrgMapper;
     @Autowired
     private ResumptionMapper resumptionMapper;
+    @Autowired
+    @Qualifier(ThreadPoolConfig.SOC_EXECUTOR)
+    private ThreadPoolTaskExecutor threadPoolTaskExecutor;
 
     @Override
     public List<Long> selectItemIdsByPlanId(Long id) {
@@ -215,7 +243,7 @@ public class AppPlanServiceImpl extends ServiceImpl<AppPlanMapper, AppPlan> impl
             baseMapper.updateById(ap);
             //撤回需要删除本周期所有任务
             DateRange dateRange = DateUtils.getStartAndEnd(new Date(), plan.getPlanCycle());
-            resumptionMapper.delete(new LambdaQueryWrapper<Resumption>().eq(Resumption::getPlanId, ap.getId()).in(Resumption::getStatus,1,2).between(Resumption::getYmdDate, dateRange.getStartTime(), dateRange.getEndTime()));
+            resumptionMapper.delete(new LambdaQueryWrapper<Resumption>().eq(Resumption::getPlanId, ap.getId()).in(Resumption::getStatus, 1, 2).between(Resumption::getYmdDate, dateRange.getStartTime(), dateRange.getEndTime()));
 
         }
         //设置下发状态为未下发
@@ -225,7 +253,7 @@ public class AppPlanServiceImpl extends ServiceImpl<AppPlanMapper, AppPlan> impl
 
 //撤回需要删除本周期所有任务
         DateRange dateRange = DateUtils.getStartAndEnd(new Date(), plan.getPlanCycle());
-        resumptionMapper.delete(new LambdaQueryWrapper<Resumption>().eq(Resumption::getPlanId, plan.getId()).in(Resumption::getStatus,1,2).between(Resumption::getYmdDate, dateRange.getStartTime(), dateRange.getEndTime()));
+        resumptionMapper.delete(new LambdaQueryWrapper<Resumption>().eq(Resumption::getPlanId, plan.getId()).in(Resumption::getStatus, 1, 2).between(Resumption::getYmdDate, dateRange.getStartTime(), dateRange.getEndTime()));
 
     }
 
@@ -704,4 +732,70 @@ public class AppPlanServiceImpl extends ServiceImpl<AppPlanMapper, AppPlan> impl
         }
         return list;
     }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public AjaxResult buildResumptionPdf(Long orgid) {
+
+        SysOrg sysOrg = RemoteCallHandlerExecutor.executeRemoteCall(() -> orgService.selectOrgById(orgid, SecurityConstants.INNER), ErrorMsgConstants.QUERY_ORG_DATA_ERROR);
+        String[] strings = sysOrg.getPath().split("-");
+        List<Long> list = Arrays.stream(strings).map(Long::valueOf).collect(Collectors.toList());
+        List<SysOrg> sysOrgList = RemoteCallHandlerExecutor.executeRemoteCall(() -> orgService.selectOrgByIdList(list, SecurityConstants.INNER), ErrorMsgConstants.QUERY_ORG_DATA_ERROR);
+        String orgName = sysOrgList.stream().map(SysOrg::getName).collect(Collectors.joining("_"));
+
+        String fileName = orgName + "_" + "_" + DateUtil.format(new Date(), "yyyyMMddHHmmss") + ".pdf";
+        Map<String, Object> data = this.getFtlResumption(orgid);
+        data.put("fileName", fileName);
+        CompletableFuture.runAsync(() -> {
+            R<String> r = RemoteCallHandlerExecutor.executeRemoteCall(() -> fileService.generateResumptionPdf(data), ErrorMsgConstants.GENERATE_PDF_ERROR);
+            if (null == r || null == r.getData()) {
+                throw new SystemException(ErrorMsgConstants.GENERATE_PDF_ERROR);
+            }
+//            String pdfUrl = r.getData();
+//            LambdaUpdateWrapper<AppPlan> updateWrapper = new LambdaUpdateWrapper<>();
+//            updateWrapper.eq(AppPlan::getId, id);
+//            updateWrapper.set(AppPlan::getPdfUrl, pdfUrl);
+//            this.update(updateWrapper);
+        }, threadPoolTaskExecutor);
+
+
+        return AjaxResult.success("正在生成pdf,请稍后刷新页面查看!");
+    }
+
+    private Map<String, Object> getFtlResumption(Long orgId) {
+        Map<String, Object> data = new HashMap<>();
+        //获取前一天
+        Date date = DateUtils.addDays(new Date(), 0);
+//        Date date = DateUtils.addDays(new Date(), -1);
+        //获取营业前的所有履职信息
+        List<Resumption> before = resumptionMapper.selectByYmdDateAndExec(date, 2, orgId);
+        //获取营业期间的所有履职信息
+        List<Resumption> ing = resumptionMapper.selectByYmdDateAndExec(date, 3, orgId);
+        //获取营业终了的所有履职信息
+        List<Resumption> after = resumptionMapper.selectByYmdDateAndExec(date, 4, orgId);
+        List<AppResumptionDataInfoVo> beforevos = getItems(before);
+        List<AppResumptionDataInfoVo> ingvos = getItems(ing);
+        List<AppResumptionDataInfoVo> aftervos = getItems(after);
+        Map<Long, List<AppResumptionDataInfoVo>> bef = beforevos.stream().collect(Collectors.groupingBy(AppResumptionDataInfoVo::getItemId));
+
+        data.put("营业前", getItems(before));
+        data.put("营业期间", getItems(ing));
+        data.put("营业终了", getItems(after));
+        return data;
+    }
+
+    public List<AppResumptionDataInfoVo> getItems(List<Resumption> resumptions) {
+        List<AppResumptionDataInfoVo> vos = new ArrayList<>();
+        for (Resumption r :
+                resumptions) {
+            ResumptionRecordVo resumptionRecordVo = resumptionRecordService.selectInfo(r.getId());
+            List<ResumptionRecordItemVo> items = resumptionRecordVo.getItems();
+            for (ResumptionRecordItemVo v :
+                    items) {
+                vos.addAll(v.getDataInfoList());
+            }
+        }
+        return vos;
+    }
+
 }

+ 4 - 2
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/resumption/vo/resumptionRecord/AppResumptionDataInfoVo.java

@@ -36,7 +36,7 @@ public class AppResumptionDataInfoVo {
 //    @ApiModelProperty(value = "标记,仅供前端页面渲染字体颜色使用")
 //    private String executeFlag;
 
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     @ApiModelProperty(value = "执行时间")
     private Date executeTime;
 
@@ -45,9 +45,11 @@ public class AppResumptionDataInfoVo {
 
     @ApiModelProperty(value = "状态")
     private Integer executeStatus;
+    @ApiModelProperty(value = "检查要点id")
+    private Long itemId;
 
     @ApiModelProperty(value = "图片数组")
-   // private List<AppResumptionDataImg> appResumptionDataImgList;
+    // private List<AppResumptionDataImg> appResumptionDataImgList;
     private List<AppResumptionDataRemarkimg> appResumptionDataImgList;
 
     private List<ResumptionDataProtectionVo> protections;

+ 2 - 2
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/safetyCheck/controller/CoreSafecheckPlanController.java

@@ -76,7 +76,7 @@ public class CoreSafecheckPlanController extends BaseController {
         if (plan.isBuildTaskNow() || plan.getPlanCycle() == 6) {
 //获取父计划下面所有父id相等并且未删除并且已启用的计划
             List<CoreSafecheckPlan> plans = coreSafecheckPlanService.list(new LambdaQueryWrapper<CoreSafecheckPlan>().eq(CoreSafecheckPlan::getParentId, plan.getId()).eq(CoreSafecheckPlan::getIsDeleted, 0).eq(CoreSafecheckPlan::getPlanStatus, 1));
-            if (plan.getPlanOfOrgType() == 3) {
+            if (plan.getPlanOfOrgType() == 3||plan.getExecOrgType()==1||plan.getExecOrgType()==2) {
                 plans.add(plan);
             }
             jobBusiness.createTaskByPlans(plans);
@@ -177,7 +177,7 @@ public class CoreSafecheckPlanController extends BaseController {
             if (plan.isBuildTaskNow() || plan.getPlanCycle() == 6) {
 //获取父计划下面所有父id相等并且未删除并且已启用的计划
                 List<CoreSafecheckPlan> plans = coreSafecheckPlanService.list(new LambdaQueryWrapper<CoreSafecheckPlan>().eq(CoreSafecheckPlan::getParentId, plan.getId()).eq(CoreSafecheckPlan::getIsDeleted, 0).eq(CoreSafecheckPlan::getPlanStatus, 1));
-                if (plan.getPlanOfOrgType() == 3) {
+                if (plan.getPlanOfOrgType() == 3||plan.getExecOrgType()==1||plan.getExecOrgType()==2) {
                     plans.add(plan);
                 }
                 jobBusiness.createTaskByPlans(plans);

+ 1 - 1
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/safetyCheck/job/SafetyCheckJobBusiness.java

@@ -525,7 +525,7 @@ public class SafetyCheckJobBusiness extends TaskCreatingServiceImplBase<CoreSafe
                 //如果存在同批次的已完成或者已逾期的任务需要同步批次id
                 checkTask.setBatchId(coreSafetyTasks.get(0).getBatchId());
             } else {
-                checkTaskService.remove(new LambdaQueryWrapper<CoreSafetyTask>().eq(CoreSafetyTask::getOrgId, checkTask.getOrgId()).eq(CoreSafetyTask::getYmdDate, checkTask.getYmdDate()).in(CoreSafetyTask::getStatus, 1, 2));
+                checkTaskService.remove(new LambdaQueryWrapper<CoreSafetyTask>().eq(CoreSafetyTask::getOrgId, checkTask.getOrgId()).eq(CoreSafetyTask::getYmdDate, checkTask.getYmdDate()).in(CoreSafetyTask::getStatus, 1, 2).eq(CoreSafetyTask::getPlanId,checkTask.getPlanId()));
                 ats.add(checkTask);
             }
 

+ 4 - 1
soc-modules/soc-modules-core/src/main/resources/mapper/drill/CoreDrillDictionaryMapper.xml

@@ -135,6 +135,9 @@
         <if test="request.drillProjects != null">
             and d.drill_projects like concat('%',#{request.drillProjects},'%')
         </if>
+        <if test="request.drillCategory != null">
+            and d.drill_category =#{request.drillCategory}
+        </if>
         <if test="request.drillType != null">
             and d.drill_type=#{request.drillType}
         </if>
@@ -201,7 +204,7 @@
 
 
     <select id="selectDetailData" resultType="com.xunmei.common.core.domain.drill.vo.CoreDrillDictionaryDetailVo">
-        select id, drill_type, default_cause, drill_projects
+        select id, drill_type, default_cause, drill_projects,drill_category,drill_category_name
         from core_drill_dictionary
         where id = #{id}
     </select>

+ 9 - 0
soc-modules/soc-modules-core/src/main/resources/mapper/resumption/ResumptionMapper.xml

@@ -325,6 +325,15 @@
             #{orgId}
         </foreach>
     </select>
+    <select id="selectByYmdDateAndExec" resultType="com.xunmei.core.resumption.domain.Resumption">
+        select res.*
+        from core_resumption res
+                 left join core_resumption_plan pl on res.plan_id = pl.id
+        where pl.plan_exec = #{exec}
+          and DATE(res.ymd_date) = DATE(#{date})
+          and res.org_id = #{orgId}
+          and res.status = 3
+    </select>
 
     <insert id="saveResumptionExceptionList">
         insert into core_safety_exception_data

+ 2 - 1
soc-modules/soc-modules-core/src/main/resources/mapper/resumption/ResumptionRecordMapper.xml

@@ -290,7 +290,8 @@
                d.submit_time AS executeTime,
                d.res_remark  AS resRemark,
                d.res_status  AS executeStatus,
-               d.id          AS dataId
+               d.id          AS dataId,
+               d.item_id
         FROM core_resumption_data d
                  INNER JOIN core_resumption_rule_point p ON d.item_id = p.id
                  LEFT JOIN sys_area a ON a.id = d.area_id

+ 5 - 0
soc-modules/soc-modules-file/src/main/java/com/xunmei/file/controller/SysFileController.java

@@ -139,7 +139,12 @@ public class SysFileController {
         return R.ok(sysFileService.generateEduTrainingPdf(data));
 
     }
+    @ApiOperation(value = "生成履职pdf")
+    @PostMapping(value = "/generateResumptionPdf")
+    R<String> generateResumptionPdf(@RequestBody Map<String, Object> data) throws Exception {
+        return R.ok(sysFileService.generateResumptionPdf(data));
 
+    }
     @ApiOperation(value = "预案演练pdf")
     @PostMapping(value = "/generateDrillPdf")
     R<String> generateDrillPdf(@RequestBody Map<String, Object> data) throws Exception {

+ 1 - 0
soc-modules/soc-modules-file/src/main/java/com/xunmei/file/service/ISysFileService.java

@@ -44,6 +44,7 @@ public interface ISysFileService
     void downloadFile(HttpServletResponse response, String filePath) throws Exception;
 
     String generateEduTrainingPdf(Map<String, Object> data) throws Exception;
+    String generateResumptionPdf(Map<String, Object> data) throws Exception;
 
     String getRelativePath(String path);
 

+ 272 - 2
soc-modules/soc-modules-file/src/main/java/com/xunmei/file/service/LocalSysFileServiceImpl.java

@@ -4,9 +4,9 @@ import cn.hutool.Hutool;
 import cn.hutool.core.codec.Base64;
 import cn.hutool.core.date.DateUtil;
 import cn.hutool.core.util.ObjectUtil;
-import com.lowagie.text.Document;
-import com.lowagie.text.Font;
+import com.lowagie.text.*;
 import com.lowagie.text.pdf.BaseFont;
+import com.lowagie.text.pdf.PdfPCell;
 import com.lowagie.text.pdf.PdfPTable;
 import com.lowagie.text.pdf.PdfWriter;
 import com.xunmei.common.core.utils.uuid.UUID;
@@ -191,6 +191,25 @@ public class LocalSysFileServiceImpl implements ISysFileService {
     }
 
     @Override
+    public String generateResumptionPdf(Map<String, Object> data) throws Exception {
+        PdfFilePathVo pathVo = getLocalFilePath(localFilePath, "resumption", data.get("fileName").toString());
+        log.info("开始生成履职登记簿,当前绝对地址为:{}", pathVo.getAbsolutePath());
+        final ItextPdfTableVo pdfTableVo = PdfUtil.createTable(pathVo.getAbsolutePath(), 6, 10);
+        final Document document = pdfTableVo.getDocument();
+        final PdfWriter writer = pdfTableVo.getWriter();
+        final PdfPTable table = pdfTableVo.getTable();
+        final BaseFont fs = pdfTableVo.getFs();
+        final Font tableFont = pdfTableVo.getTableFont();
+        PdfUtil.dealHeader(document, fs, "保 安 履 职", 24);
+        PdfUtil.dealResumptionBody(document, table, tableFont, data);
+        document.close();
+        writer.close();
+        log.info("履职登记簿生成结束,当前绝对地址为:{}", pathVo.getAbsolutePath());
+        //此处返回  /statics/edu/xxx.pdf
+        return this.prefix + pathVo.getRelativePath();
+    }
+
+    @Override
     public String generateDrillPdf(Map<String, Object> data) throws Exception {
         PdfFilePathVo pathVo = getLocalFilePath(localFilePath, "drill", data.get("fileName").toString());
         log.info("开始生成预案演练登记簿,当前绝对地址为:{}", pathVo.getAbsolutePath());
@@ -216,4 +235,255 @@ public class LocalSysFileServiceImpl implements ISysFileService {
         String filePath = FileUploadUtils.uploadBase64(localFilePath, file);
         return filePath;
     }
+    /**
+     * 履职转pdf
+     * @param dest
+     * @throws IOException
+     * @throws DocumentException
+     */
+    public void dataToPdf(String dest) throws IOException, DocumentException {
+        Document document = new Document();
+        PdfWriter.getInstance(document, new FileOutputStream(dest));
+        document.open();
+
+        // 使用语言包字体
+        BaseFont abf = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H",BaseFont.NOT_EMBEDDED);
+        //字体
+        Font font = new Font(abf, 8);
+
+        //段落
+        Paragraph p = new Paragraph("测试结算单", new Font(abf, 12, Font.BOLD));
+        p.setAlignment(Paragraph.ALIGN_CENTER);
+        document.add(p);
+
+        //表格
+        PdfPTable table = new PdfPTable(8);//numcolumns:列数
+        table.setSpacingBefore(16f);//表格与上面段落的空隙
+
+        //表格列创建并赋值
+        PdfPCell cell = new PdfPCell(new Phrase("单位名称:测试有限公司", font));
+        cell.setHorizontalAlignment(Element.ALIGN_LEFT);//居中
+        cell.disableBorderSide(13);//去除左右上边框,保留下边框
+        cell.setColspan(4);//合并列数
+        table.addCell(cell);
+        cell = new PdfPCell(new Phrase("日期:2020-06-05", font));
+        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+        cell.disableBorderSide(13);
+        cell.setColspan(3);
+        table.addCell(cell);
+        cell = new PdfPCell(new Phrase("单位(元)", font));
+        cell.setHorizontalAlignment(Element.ALIGN_LEFT);
+        cell.disableBorderSide(13);
+        cell.setColspan(1);
+        table.addCell(cell);
+        //首行
+        cell = new PdfPCell(new Phrase("期间", font));
+        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+        cell.setColspan(2);
+        table.addCell(cell);
+        cell = new PdfPCell(new Phrase("月份", font));
+        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+        table.addCell(cell);
+        cell = new PdfPCell(new Phrase("分类", font));
+        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+        table.addCell(cell);
+        cell = new PdfPCell(new Phrase("年利率", font));
+        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+        table.addCell(cell);
+        cell = new PdfPCell(new Phrase("日利率", font));
+        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+        table.addCell(cell);
+        cell = new PdfPCell(new Phrase("基数", font));
+        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+        table.addCell(cell);
+        cell = new PdfPCell(new Phrase("利息", font));
+        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+        table.addCell(cell);
+
+        cell = new PdfPCell(new Phrase("起始日:2020-03-26\n" +
+                "结束日:2020-04-25", font));
+        cell.setPadding(16f);
+        cell.setVerticalAlignment(Element.ALIGN_CENTER);
+        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+        cell.setRowspan(3);
+        cell.setColspan(2);
+        table.addCell(cell);
+        cell = new PdfPCell(new Phrase("4", font));
+        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+        table.addCell(cell);
+        cell = new PdfPCell(new Phrase("资金", font));
+        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+        table.addCell(cell);
+        cell = new PdfPCell(new Phrase("1.10%", font));
+        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+        table.addCell(cell);
+        cell = new PdfPCell(new Phrase("0.000031", font));
+        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+        table.addCell(cell);
+        cell = new PdfPCell(new Phrase("10598164.91", font));
+        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+        table.addCell(cell);
+        cell = new PdfPCell(new Phrase("325.01", font));
+        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+        table.addCell(cell);
+
+        cell = new PdfPCell(new Phrase("4", font));
+        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+        table.addCell(cell);
+        cell = new PdfPCell(new Phrase("资金", font));
+        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+        table.addCell(cell);
+        cell = new PdfPCell(new Phrase("1.10%", font));
+        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+        table.addCell(cell);
+        cell = new PdfPCell(new Phrase("0.000031", font));
+        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+        table.addCell(cell);
+        cell = new PdfPCell(new Phrase("-", font));
+        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+        table.addCell(cell);
+        cell = new PdfPCell(new Phrase("-", font));
+        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+        table.addCell(cell);
+
+        cell = new PdfPCell(new Phrase("4", font));
+        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+        table.addCell(cell);
+        cell = new PdfPCell(new Phrase("资金", font));
+        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+        table.addCell(cell);
+        cell = new PdfPCell(new Phrase("1.10%", font));
+        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+        table.addCell(cell);
+        cell = new PdfPCell(new Phrase("0.000031", font));
+        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+        table.addCell(cell);
+        cell = new PdfPCell(new Phrase("-", font));
+        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+        table.addCell(cell);
+        cell = new PdfPCell(new Phrase("-", font));
+        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+        table.addCell(cell);
+
+        cell = new PdfPCell(new Phrase("合计", font));
+        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+        cell.setColspan(7);
+        table.addCell(cell);
+        cell = new PdfPCell(new Phrase("325.01", font));
+        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+        table.addCell(cell);
+
+        cell = new PdfPCell(new Phrase("会计制单:", font));
+        cell.setHorizontalAlignment(Element.ALIGN_LEFT);
+        cell.disableBorderSide(14);
+        cell.setColspan(4);
+        table.addCell(cell);
+        cell = new PdfPCell(new Phrase("复核:", font));
+        cell.setHorizontalAlignment(Element.ALIGN_LEFT);
+        cell.disableBorderSide(14);
+        cell.setColspan(4);
+        table.addCell(cell);
+        table.setSpacingBefore(16f);
+        document.add(table);
+
+        //下一页
+        document.newPage();
+        //段落
+        Paragraph p1 = new Paragraph("下一页测试结算单", new Font(abf, 12, Font.BOLD));
+        p1.setAlignment(Paragraph.ALIGN_CENTER);
+        document.add(p1);
+
+        //表格
+        table = new PdfPTable(8);//numcolumns:列数
+        table.setSpacingBefore(16f);//表格与上面段落的空隙
+
+        //表格列创建并赋值
+        cell = new PdfPCell(new Phrase("单位名称:测试有限公司", font));
+        cell.setHorizontalAlignment(Element.ALIGN_LEFT);//居中
+        cell.disableBorderSide(13);//去除左右上边框,保留下边框
+        cell.setColspan(4);//合并列数
+        table.addCell(cell);
+        cell = new PdfPCell(new Phrase("日期:2020-06-05", font));
+        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+        cell.disableBorderSide(13);
+        cell.setColspan(3);
+        table.addCell(cell);
+        cell = new PdfPCell(new Phrase("单位(元)", font));
+        cell.setHorizontalAlignment(Element.ALIGN_LEFT);
+        cell.disableBorderSide(13);
+        cell.setColspan(1);
+        table.addCell(cell);
+        //首行
+        cell = new PdfPCell(new Phrase("期间", font));
+        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+        cell.setColspan(2);
+        table.addCell(cell);
+        cell = new PdfPCell(new Phrase("月份", font));
+        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+        table.addCell(cell);
+        cell = new PdfPCell(new Phrase("分类", font));
+        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+        table.addCell(cell);
+        cell = new PdfPCell(new Phrase("年利率", font));
+        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+        table.addCell(cell);
+        cell = new PdfPCell(new Phrase("日利率", font));
+        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+        table.addCell(cell);
+        cell = new PdfPCell(new Phrase("基数", font));
+        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+        table.addCell(cell);
+        cell = new PdfPCell(new Phrase("利息", font));
+        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+        table.addCell(cell);
+
+        cell = new PdfPCell(new Phrase("起始日:2020-04-26\n" +
+                "结束日:2020-05-25", font));
+        cell.setPadding(16f);
+        cell.setVerticalAlignment(Element.ALIGN_CENTER);
+        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+        cell.setColspan(2);
+        table.addCell(cell);
+        cell = new PdfPCell(new Phrase("4", font));
+        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+        table.addCell(cell);
+        cell = new PdfPCell(new Phrase("资金", font));
+        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+        table.addCell(cell);
+        cell = new PdfPCell(new Phrase("1.10%", font));
+        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+        table.addCell(cell);
+        cell = new PdfPCell(new Phrase("0.000031", font));
+        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+        table.addCell(cell);
+        cell = new PdfPCell(new Phrase("10598164.91", font));
+        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+        table.addCell(cell);
+        cell = new PdfPCell(new Phrase("325.01", font));
+        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+        table.addCell(cell);
+
+        cell = new PdfPCell(new Phrase("合计", font));
+        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+        cell.setColspan(7);
+        table.addCell(cell);
+        cell = new PdfPCell(new Phrase("325.01", font));
+        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+        table.addCell(cell);
+
+        cell = new PdfPCell(new Phrase("会计制单:", font));
+        cell.setHorizontalAlignment(Element.ALIGN_LEFT);
+        cell.disableBorderSide(14);
+        cell.setColspan(4);
+        table.addCell(cell);
+        cell = new PdfPCell(new Phrase("复核:", font));
+        cell.setHorizontalAlignment(Element.ALIGN_LEFT);
+        cell.disableBorderSide(14);
+        cell.setColspan(4);
+        table.addCell(cell);
+        table.setSpacingBefore(16f);
+        document.add(table);
+
+        document.close();
+    }
 }

+ 49 - 0
soc-modules/soc-modules-file/src/main/java/com/xunmei/file/utils/AppResumptionDataInfoVo.java

@@ -0,0 +1,49 @@
+package com.xunmei.file.utils;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @author jingyuanchao
+ * @date 2022/5/12 17:43
+ */
+@Data
+public class AppResumptionDataInfoVo {
+    @ApiModelProperty("履职任务详情id")
+    private Long dataId;
+
+    @ApiModelProperty("履职内容")
+    private String pointName;
+
+//    @ApiModelProperty(value = "安防类型,字典表")
+//    private String safeType;
+
+    @ApiModelProperty(value = "检查区域,区域表id")
+    private String areaName;
+
+    @ApiModelProperty(value = "履职点位")
+    private String checkName;
+
+    @ApiModelProperty(value = "执行结果")
+    private String executeResult;
+//
+//    @ApiModelProperty(value = "标记,仅供前端页面渲染字体颜色使用")
+//    private String executeFlag;
+
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
+    @ApiModelProperty(value = "执行时间")
+    private Date executeTime;
+
+    @ApiModelProperty(value = "描述")
+    private String resRemark;
+
+    @ApiModelProperty(value = "状态")
+    private Integer executeStatus;
+
+
+
+}

+ 195 - 4
soc-modules/soc-modules-file/src/main/java/com/xunmei/file/utils/PdfUtil.java

@@ -1,6 +1,7 @@
 package com.xunmei.file.utils;
 
 
+import cn.hutool.core.util.ObjectUtil;
 import cn.hutool.extra.spring.SpringUtil;
 import com.lowagie.text.*;
 import com.lowagie.text.pdf.*;
@@ -14,18 +15,18 @@ import java.io.FileInputStream;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.util.ArrayList;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
+
 @Slf4j
 public class PdfUtil {
 
 
-
-
     public static ItextPdfTableVo createTable(String filename, int numColumns, int fontSize) throws Exception {
         Document document = new Document(PageSize.A4, 0, 0, 50, 0);//SUPPRESS
         FileOutputStream fos = new FileOutputStream(filename);
-        log.info("filename,{}",filename);
+        log.info("filename,{}", filename);
         final PdfWriter writer = PdfWriter.getInstance(document, fos);
         document.open();
         // 使用语言包字
@@ -201,6 +202,196 @@ public class PdfUtil {
         document.add(table);
     }
 
+    public static void dealResumptionBody(Document document, PdfPTable table, Font tableFont, Map<String, Object> data) throws Exception {
+        PdfUtil.createPDFCell(tableFont, table, "检查内容", Element.ALIGN_CENTER, 6, 0);
+        PdfUtil.createPDFCell(tableFont, table, "检查情况", Element.ALIGN_CENTER, 0, 0);
+        PdfUtil.createPDFCell(tableFont, table, "检查人", Element.ALIGN_CENTER, 0, 0);
+
+        final Map<String,List<AppResumptionDataInfoVo>> lists = (Map<String,List<AppResumptionDataInfoVo>>) data.get("items");
+        if (ObjectUtil.isEmpty(lists)) {
+            return;
+        }
+        Iterator<String> iterator=lists.keySet().iterator();
+        while (iterator.hasNext()) {
+            List<AppResumptionDataInfoVo> list = lists.get(iterator.next());
+            //不同的执行时刻
+            String execTimeName = iterator.next();
+            PdfUtil.createPDFCell(tableFont, table, getLineStr(execTimeName), PdfPCell.ALIGN_MIDDLE, 0, list.size());
+            int o=1;
+            for (AppResumptionDataInfoVo listVo : list) {
+
+                // 检查内容
+                String rowContent = o+ "、" + listVo.getPointName();
+                PdfUtil.createPDFCell(tableFont, table, rowContent, Element.ALIGN_LEFT, 5, 0);
+                // 检查情况
+                PdfUtil.createPDFCell(tableFont, table, listVo.getExecuteResult(), Element.ALIGN_CENTER, 0, 0);
+                // 检查人
+                PdfUtil.createPDFCell(tableFont, table, listVo.getCheckName(), Element.ALIGN_CENTER, 0, 0);
+                o++;
+            }
+        }
+
+
+        // 备注数据
+        PdfUtil.createPDFCell(tableFont, table, getLineStr("备注"), PdfPCell.ALIGN_MIDDLE, 0, 0);
+        PdfUtil.createPDFCell(tableFont, table, data.get("remark").toString(), Element.ALIGN_LEFT, 7, 0);
+
+        document.add(table);
+
+        Paragraph foot = new Paragraph("                  注:检查情况正常打“√”;发现问题打“×”,并在备注中具体说明。", tableFont);
+//        Paragraph foot = new Paragraph("                  注:检查情况正常打“√”;发现问题打“×”,并在备注中具体说明。", new Font(fs, 8, Font.NORMAL));
+        foot.setAlignment(Paragraph.ALIGN_LEFT);
+        //在后方加入16个空格
+        document.add(foot);
+
+
+
+
+        //
+//
+////        //段落
+////        Paragraph p = new Paragraph("测试结算单", new Font(abf, 12, Font.BOLD));
+////        p.setAlignment(Paragraph.ALIGN_CENTER);
+////        document.add(p);
+//
+//        //表格
+//        table.setSpacingBefore(16f);//表格与上面段落的空隙
+//
+//        //表格列创建并赋值
+//        PdfPCell cell = new PdfPCell(new Phrase("单位名称:测试有限公司", font));
+//        cell.setHorizontalAlignment(Element.ALIGN_LEFT);//居中
+//        cell.disableBorderSide(13);//去除左右上边框,保留下边框
+//        cell.setColspan(4);//合并列数
+//        table.addCell(cell);
+//        cell = new PdfPCell(new Phrase("日期:2020-06-05", font));
+//        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+//        cell.disableBorderSide(13);
+//        cell.setColspan(3);
+//        table.addCell(cell);
+//        cell = new PdfPCell(new Phrase("单位(元)", font));
+//        cell.setHorizontalAlignment(Element.ALIGN_LEFT);
+//        cell.disableBorderSide(13);
+//        cell.setColspan(1);
+//        table.addCell(cell);
+//        //首行
+//        cell = new PdfPCell(new Phrase("期间", font));
+//        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+//        cell.setColspan(2);
+//        table.addCell(cell);
+//        cell = new PdfPCell(new Phrase("月份", font));
+//        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+//        table.addCell(cell);
+//        cell = new PdfPCell(new Phrase("分类", font));
+//        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+//        table.addCell(cell);
+//        cell = new PdfPCell(new Phrase("年利率", font));
+//        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+//        table.addCell(cell);
+//        cell = new PdfPCell(new Phrase("日利率", font));
+//        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+//        table.addCell(cell);
+//        cell = new PdfPCell(new Phrase("基数", font));
+//        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+//        table.addCell(cell);
+//        cell = new PdfPCell(new Phrase("利息", font));
+//        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+//        table.addCell(cell);
+//
+//        cell = new PdfPCell(new Phrase("起始日:2020-03-26\n" +
+//                "结束日:2020-04-25", font));
+//        cell.setPadding(16f);
+//        cell.setVerticalAlignment(Element.ALIGN_CENTER);
+//        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+//        cell.setRowspan(3);
+//        cell.setColspan(2);
+//        table.addCell(cell);
+//        cell = new PdfPCell(new Phrase("4", font));
+//        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+//        table.addCell(cell);
+//        cell = new PdfPCell(new Phrase("资金", font));
+//        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+//        table.addCell(cell);
+//        cell = new PdfPCell(new Phrase("1.10%", font));
+//        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+//        table.addCell(cell);
+//        cell = new PdfPCell(new Phrase("0.000031", font));
+//        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+//        table.addCell(cell);
+//        cell = new PdfPCell(new Phrase("10598164.91", font));
+//        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+//        table.addCell(cell);
+//        cell = new PdfPCell(new Phrase("325.01", font));
+//        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+//        table.addCell(cell);
+//
+//        cell = new PdfPCell(new Phrase("4", font));
+//        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+//        table.addCell(cell);
+//        cell = new PdfPCell(new Phrase("资金", font));
+//        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+//        table.addCell(cell);
+//        cell = new PdfPCell(new Phrase("1.10%", font));
+//        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+//        table.addCell(cell);
+//        cell = new PdfPCell(new Phrase("0.000031", font));
+//        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+//        table.addCell(cell);
+//        cell = new PdfPCell(new Phrase("-", font));
+//        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+//        table.addCell(cell);
+//        cell = new PdfPCell(new Phrase("-", font));
+//        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+//        table.addCell(cell);
+//
+//        cell = new PdfPCell(new Phrase("4", font));
+//        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+//        table.addCell(cell);
+//        cell = new PdfPCell(new Phrase("资金", font));
+//        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+//        table.addCell(cell);
+//        cell = new PdfPCell(new Phrase("1.10%", font));
+//        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+//        table.addCell(cell);
+//        cell = new PdfPCell(new Phrase("0.000031", font));
+//        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+//        table.addCell(cell);
+//        cell = new PdfPCell(new Phrase("-", font));
+//        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+//        table.addCell(cell);
+//        cell = new PdfPCell(new Phrase("-", font));
+//        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+//        table.addCell(cell);
+//
+//        cell = new PdfPCell(new Phrase("合计", font));
+//        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+//        cell.setColspan(7);
+//        table.addCell(cell);
+//        cell = new PdfPCell(new Phrase("325.01", font));
+//        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
+//        table.addCell(cell);
+//
+//        cell = new PdfPCell(new Phrase("会计制单:", font));
+//        cell.setHorizontalAlignment(Element.ALIGN_LEFT);
+//        cell.disableBorderSide(14);
+//        cell.setColspan(4);
+//        table.addCell(cell);
+//        cell = new PdfPCell(new Phrase("复核:", font));
+//        cell.setHorizontalAlignment(Element.ALIGN_LEFT);
+//        cell.disableBorderSide(14);
+//        cell.setColspan(4);
+//        table.addCell(cell);
+//        table.setSpacingBefore(16f);
+//
+//
+//        document.add(table);
+}
+    public static String getLineStr(String str) {
+        StringBuilder result = new StringBuilder();
+        for (int i = 0; i < str.length(); i++) {
+            result.append(str.charAt(i)).append("\r");
+        }
+        return result.toString();
+    }
     public static void dealDrillBody(Document document, PdfPTable table, Font tableFont, Map<String, Object> data) throws Exception {
         //第一行
         createPDFCell(tableFont, table, "演练单位", Element.ALIGN_CENTER, 1, 1);
@@ -324,7 +515,7 @@ public class PdfUtil {
             for (String image : row) {
                 Image imageData = null;
                 try {
-                    imageData=  getImage(image);
+                    imageData = getImage(image);
                 } catch (Exception e) {
                     final ApplicationContext applicationContext = SpringUtil.getApplicationContext();
                     final Resource[] resources = applicationContext.getResources("classpath:file/black.png");