diff --git a/jero-boot/db/蔚来标准sql/dev_third_record.sql b/jero-boot/db/蔚来标准sql/dev_third_record.sql index 5af2789e3..44aae6736 100644 --- a/jero-boot/db/蔚来标准sql/dev_third_record.sql +++ b/jero-boot/db/蔚来标准sql/dev_third_record.sql @@ -238,3 +238,150 @@ CREATE TABLE `laws_technology_evaluation` ( `prc_num` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '流程编号', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '法规技术评估表' ROW_FORMAT = DYNAMIC; + +-- 上报库认证类别参数信息 添加字段 2022-07-11 +ALTER TABLE `laws_weilai`.`report_cert_category_params_info` + ADD COLUMN `params_manifest_id` varchar(50) NULL COMMENT '上报库id' AFTER `version`; + +-- 法规技术评估-流程明细表 +CREATE TABLE `laws_technology_evaluation_flow_detail` ( + `id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + `create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人', + `create_time` datetime NULL DEFAULT NULL COMMENT '创建日期', + `update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人', + `update_time` datetime NULL DEFAULT NULL COMMENT '更新日期', + `sys_org_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属部门', + `laws_technology_evaluation_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '法规技术评估表id', + `acti_proc_inst_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '流程实例id', + `prc_num` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '流程编号', + `prc_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '流程名称', + `evaluator_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '评估人id', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '法规技术评估-流程明细表' ROW_FORMAT = Dynamic; + +-- 工作流数据库增加数据。 +INSERT INTO `t_form` ( + `OBJECT_ID`,`CODE`,`CREATE_TIME`,`WIDGET_JSON`,`JSON`,`NAME`,`SHOW_KEY`,`IS_DELETED`, + `MODEL_ID`,`JSON_EVAL`,`HTML`,`RUN_TYPE`,`CATEGORY_ID`,`HTML_READONLY` +) +VALUES +( + 'fgjspglc','0006','2022-07-11 15:45:33',NULL,NULL,'法规技术评估流程',NULL, + 0,'15007',NULL,NULL,'json','4bdf0b396b4aa6ea10dd5e19956a1e22',NULL +); + +-- 法规技术评估-条款信息评估结果表 +CREATE TABLE `laws_technology_evaluation_item_result` ( + `id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + `create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人', + `create_time` datetime NULL DEFAULT NULL COMMENT '创建日期', + `update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人', + `update_time` datetime NULL DEFAULT NULL COMMENT '更新日期', + `sys_org_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属部门', + `item_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '条款id', + `item_num` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '条款号', + `item_name` varchar(600) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '条款名称', + `item_content` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '条款内容', + `evaluation_methods` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '评估方式', + `technical_file_name` varchar(600) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '技术文件名称', + `section` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '章节', + `opinion` varchar(600) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '意见', + `accessory_file` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '附件', + `compliance_result` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '符合性结果', + `evaluator_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '评估人id', + `acti_proc_inst_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '流程实例id', + `sponsor_feedback` varchar(600) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '发起人反馈', + `laws_technology_evaluation_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '法规技术评估表id', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '法规技术评估-条款信息评估结果表' ROW_FORMAT = Dynamic; + +-- 法规技术评估-评估人反馈-符合性结果表 +CREATE TABLE `laws_technology_evaluation_compliance_result` ( + `id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + `create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人', + `create_time` datetime NULL DEFAULT NULL COMMENT '创建日期', + `update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人', + `update_time` datetime NULL DEFAULT NULL COMMENT '更新日期', + `sys_org_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属部门', + `laws_technology_evaluation_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '法规技术评估表id', + `compliance_result` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '符合性结果', + `acti_proc_inst_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '流程实例id', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '法规技术评估-评估人反馈-符合性结果表' ROW_FORMAT = Dynamic; + +-- 法规技术评估-评估结果表 +CREATE TABLE `laws_technology_evaluation_result` ( + `id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + `create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人', + `create_time` datetime NULL DEFAULT NULL COMMENT '创建日期', + `update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人', + `update_time` datetime NULL DEFAULT NULL COMMENT '更新日期', + `sys_org_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属部门', + `laws_technology_evaluation_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '法规技术评估表id', + `related_section` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '相关章节', + `issue_or_suggest` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '问题/建议', + `reason` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '理由', + `accessory_file` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '附件', + `submit_time` datetime NULL DEFAULT NULL COMMENT '提出时间', + `acti_proc_inst_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '流程实例id', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '法规技术评估-评估结果表' ROW_FORMAT = Dynamic; + + +-- 增加评估方式树形字典。 +INSERT INTO `sys_category` (`id`, `pid`, `name`, `code`, `create_by`, `create_time`, `update_by`, `update_time`, `sys_org_code`, `sys_dict_id`, `has_child`, `en_name`, `description`, `is_tag_dict`, `attribute_type`, `is_read_only`, `del_flag`, `item_value`, `sort_order`) VALUES ('1546745025973256194', '0', '评1', NULL, 'admin', '2022-07-12 14:35:26', 'admin', '2022-07-12 14:36:36', 'A01', '1546744902203539458', '1', 'P1', '333', 1, NULL, NULL, 0, NULL, 1); +INSERT INTO `sys_category` (`id`, `pid`, `name`, `code`, `create_by`, `create_time`, `update_by`, `update_time`, `sys_org_code`, `sys_dict_id`, `has_child`, `en_name`, `description`, `is_tag_dict`, `attribute_type`, `is_read_only`, `del_flag`, `item_value`, `sort_order`) VALUES ('1546745149692641282', '0', '评2', NULL, 'admin', '2022-07-12 14:35:55', NULL, NULL, 'A01', '1546744902203539458', NULL, 'P2', NULL, 1, NULL, NULL, 0, NULL, 2); +INSERT INTO `sys_category` (`id`, `pid`, `name`, `code`, `create_by`, `create_time`, `update_by`, `update_time`, `sys_org_code`, `sys_dict_id`, `has_child`, `en_name`, `description`, `is_tag_dict`, `attribute_type`, `is_read_only`, `del_flag`, `item_value`, `sort_order`) VALUES ('1546745318161055745', '1546745025973256194', '评1+1', NULL, 'admin', '2022-07-12 14:36:36', NULL, NULL, 'A01', '1546744902203539458', NULL, 'P1+1', NULL, 1, NULL, NULL, 0, NULL, 1); + +INSERT INTO `sys_dict` (`id`, `dict_name`, `dict_code`, `description`, `del_flag`, `create_by`, `create_time`, `update_by`, `update_time`, `type`, `dict_en_name`, `is_tag_dict`, `is_read_only`, `attribute_type`, `order_num`) VALUES ('1546744902203539458', '评估方式', 'evaluation_method', '评估方式', 0, 'admin', '2022-07-12 14:34:56', NULL, NULL, NULL, NULL, 1, 0, '2', 1); + +-- 参数项清单 修改字段长度 2022-07-12 +ALTER TABLE `laws_weilai`.`params_info` + MODIFY COLUMN `description` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '参数说明' AFTER `duty_territory`; + +ALTER TABLE `laws_weilai`.`cert_category_params_info` + MODIFY COLUMN `description` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '参数说明' AFTER `params_name`; + +ALTER TABLE `laws_weilai`.`params_info_publish` + MODIFY COLUMN `description` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '参数说明' AFTER `duty_territory`; + +ALTER TABLE `laws_weilai`.`cert_category_params_info_publish` + MODIFY COLUMN `description` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '参数说明' AFTER `params_name`; + +ALTER TABLE `laws_weilai`.`params_collect_manifest` + MODIFY COLUMN `description` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '参数说明' AFTER `duty_territory`; + +ALTER TABLE `laws_weilai`.`params_collect_manifest_history` + MODIFY COLUMN `description` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '参数说明' AFTER `params_batch`; + +ALTER TABLE `laws_weilai`.`params_report_detail` + MODIFY COLUMN `description` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '参数说明' AFTER `duty_territory`; + +ALTER TABLE `laws_weilai`.`report_cert_category_params_info` + MODIFY COLUMN `description` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '参数说明' AFTER `params_name`; +--以上SQL 2022年7月12日 已同步正式环境 + +-- 参数项清单表 添加字段 标题默认值 2022-07-13 已同步正式环境 +ALTER TABLE `laws_weilai`.`params_info` + ADD COLUMN `title_default_value` varchar(100) NULL COMMENT '标题默认值' AFTER `params_template_id`; + +ALTER TABLE `laws_weilai`.`params_info_publish` + ADD COLUMN `title_default_value` varchar(100) NULL COMMENT '标题默认值' AFTER `version`; + +ALTER TABLE `laws_weilai`.`params_collect_manifest` + ADD COLUMN `title_default_value` varchar(100) NULL COMMENT '标题默认值' AFTER `add_flag`; + +ALTER TABLE `laws_weilai`.`params_collect_manifest_history` + ADD COLUMN `title_default_value` varchar(100) NULL COMMENT '标题默认值' AFTER `params_manifest_id`; + +ALTER TABLE `laws_weilai`.`params_report_detail` + ADD COLUMN `title_default_value` varchar(100) NULL COMMENT '标题默认值' AFTER `sync_time`; + +-- 法规技术评估 反馈评估表中,增加符合性结果表id关联 2022-07-14 已同步正式环境 +ALTER TABLE `laws_technology_evaluation_result` + ADD COLUMN `compliance_result_id` varchar(64) NULL COMMENT '符合性结果id' AFTER `acti_proc_inst_id`; + +-- 用户表 删除索引 2022-07-14 已同步 +ALTER TABLE `laws_weilai`.`sys_user` +DROP INDEX `uniq_sys_user_phone`, +DROP INDEX `uniq_sys_user_email`; \ No newline at end of file diff --git a/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/FileUtils.java b/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/FileUtils.java new file mode 100644 index 000000000..749f1f6d0 --- /dev/null +++ b/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/util/FileUtils.java @@ -0,0 +1,34 @@ +package com.jero.common.util; + +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; + +public class FileUtils { + /** + * 复制文件 + * @param in + * @param newFile + * @throws IOException + */ + public static void copyFile(InputStream in, String newFile) throws IOException { + File file2 = new File(newFile); + if (!file2.exists()) { + file2.createNewFile(); + } + try (FileOutputStream ou = new FileOutputStream(newFile);) { + byte[] bs = new byte[1024]; + int count = 0; + while ((count = in.read(bs, 0, bs.length)) != -1) { + ou.write(bs, 0, count); + } + ou.flush(); + } catch (IOException e) { + e.printStackTrace(); + throw new IOException("复制文件失败!"); + } finally { + in.close(); + } + } +} diff --git a/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/config/shiro/ShiroConfig.java b/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/config/shiro/ShiroConfig.java index c68350d46..a57e7db62 100644 --- a/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/config/shiro/ShiroConfig.java +++ b/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/config/shiro/ShiroConfig.java @@ -145,6 +145,12 @@ public class ShiroConfig { filterChainDefinitionMap.put("/wkflow/processHistoryEO/processCall", "anon"); // 流程历史 工作流处理数据接口排除 filterChainDefinitionMap.put("/lawsOpinionGather/lawsOpinionGatherEO/processCall", "anon"); // 法规收集表 工作流处理数据接口排除 filterChainDefinitionMap.put("/lawsOpinionGather/lawsProcessHistoryEO/processCall", "anon"); // 法规收集历史 工作流处理数据接口排除 + // 法规技术评估表-流程明细 工作流处理数据接口排除 + filterChainDefinitionMap.put("/lawsTechnologyEvaluation/lawsTechnologyEvaluationFlowDetailEO/processCall", "anon"); + // 法规技术评估表 工作流处理数据接口排除 + filterChainDefinitionMap.put("/lawsTechnologyEvaluation/lawsTechnologyEvaluationEO/processCall", "anon"); + // 法规技术评估-条款信息评估结果表 工作流处理数据接口排除 + filterChainDefinitionMap.put("/lawsTechnologyEvaluation/lawsTechnologyEvaluationItemResultEO/processCall", "anon"); filterChainDefinitionMap.put("/sys/user/querySysUserListByIdList", "anon"); // 工作流根据用户idList获取用户信息接口 // 添加自己的过滤器并且取名为jwt diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/controller/ParamsCollectManifestEOController.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/controller/ParamsCollectManifestEOController.java index aed81c064..682af6d01 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/controller/ParamsCollectManifestEOController.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/controller/ParamsCollectManifestEOController.java @@ -5,20 +5,17 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.jero.common.api.vo.Result; import com.jero.common.aspect.annotation.AutoLog; -import com.jero.common.aspect.annotation.PermissionData; import com.jero.common.system.base.controller.JeroController; import com.jero.common.system.query.QueryGenerator; import com.jero.modules.cert.collect.entity.ParamsCollectManifestEO; import com.jero.modules.cert.collect.service.IParamsCollectManifestEOService; import com.jero.modules.cert.collect.vo.ParamsCollectManifestVO; -import com.jero.modules.cert.template.entity.ParamsInfoPublishEO; import com.jero.modules.system.entity.SysUser; import com.jero.modules.system.service.ISysUserService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang.StringUtils; -import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -77,19 +74,20 @@ public class ParamsCollectManifestEOController extends JeroController queryList(ParamsCollectManifestEO paramsCollectManifestEO, @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, @RequestParam(name="pageSize", defaultValue="100") Integer pageSize, - @RequestParam(name = "cut") String cut) { - if (StringUtils.isNotEmpty(paramsCollectManifestEO.getNioNumber())) { - paramsCollectManifestEO.setNioNumber(paramsCollectManifestEO.getNioNumber().replace("%","\\%")); - } - if (StringUtils.isNotEmpty(paramsCollectManifestEO.getParamsName())) { - paramsCollectManifestEO.setParamsName(paramsCollectManifestEO.getParamsName().replace("%","\\%")); - } - if (StringUtils.isNotEmpty(paramsCollectManifestEO.getDre())) { - paramsCollectManifestEO.setDre(paramsCollectManifestEO.getDre().replace("%","\\%")); - } + @RequestParam(name = "cut") String cut, + HttpServletRequest req) { +// if (StringUtils.isNotEmpty(paramsCollectManifestEO.getNioNumber())) { +// paramsCollectManifestEO.setNioNumber(paramsCollectManifestEO.getNioNumber().replace("%","\\%")); +// } +// if (StringUtils.isNotEmpty(paramsCollectManifestEO.getParamsName())) { +// paramsCollectManifestEO.setParamsName(paramsCollectManifestEO.getParamsName().replace("%","\\%")); +// } +// if (StringUtils.isNotEmpty(paramsCollectManifestEO.getDre())) { +// paramsCollectManifestEO.setDre(paramsCollectManifestEO.getDre().replace("%","\\%")); +// } IPage page = new Page(pageNo, pageSize); - IPage list = paramsCollectManifestEOService.queryList(page, paramsCollectManifestEO, cut); + IPage list = paramsCollectManifestEOService.queryList(page, paramsCollectManifestEO, cut, req); return Result.OK(list); } @@ -279,6 +277,25 @@ public class ParamsCollectManifestEOController extends JeroController updateDutyTerritory(ParamsCollectManifestVO paramsCollectManifestVO) { + boolean isSuccess = paramsCollectManifestEOService.updateDutyTerritory(paramsCollectManifestVO); + if (isSuccess) { + return Result.OK("修改责任领域成功!"); + } else { + return Result.error("修改责任领域失败!"); + } + } + /** * 分配工程接口人 * diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/controller/ParamsCollectManifestHistoryEOController.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/controller/ParamsCollectManifestHistoryEOController.java index ba090fa7d..2bcab4ab6 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/controller/ParamsCollectManifestHistoryEOController.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/controller/ParamsCollectManifestHistoryEOController.java @@ -6,6 +6,7 @@ import com.jero.common.api.vo.Result; import com.jero.common.aspect.annotation.AutoLog; import com.jero.common.system.base.controller.JeroController; import com.jero.modules.cert.collect.entity.ParamsCollectManifestEO; +import com.jero.modules.cert.collect.entity.ParamsCollectManifestHistoryEO; import com.jero.modules.cert.collect.entity.ParamsConfigHistoryEO; import com.jero.modules.cert.collect.service.IParamsCollectManifestEOService; import com.jero.modules.cert.collect.service.IParamsCollectManifestHistoryEOService; @@ -13,13 +14,13 @@ import com.jero.modules.cert.collect.service.IParamsConfigHistoryEOService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; +import javax.servlet.http.HttpServletRequest; import java.util.List; import java.util.Map; @@ -66,22 +67,23 @@ public class ParamsCollectManifestHistoryEOController extends JeroController queryList(ParamsCollectManifestEO paramsCollectManifestEO, + public Result queryList(ParamsCollectManifestHistoryEO paramsCollectManifestHistoryEO, @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, @RequestParam(name="pageSize", defaultValue="500") Integer pageSize, - @RequestParam(name = "cut") String cut) { - if (StringUtils.isNotEmpty(paramsCollectManifestEO.getNioNumber())) { - paramsCollectManifestEO.setNioNumber(paramsCollectManifestEO.getNioNumber().replace("%","\\%")); - } - if (StringUtils.isNotEmpty(paramsCollectManifestEO.getParamsName())) { - paramsCollectManifestEO.setParamsName(paramsCollectManifestEO.getParamsName().replace("%","\\%")); - } - if (StringUtils.isNotEmpty(paramsCollectManifestEO.getDre())) { - paramsCollectManifestEO.setDre(paramsCollectManifestEO.getDre().replace("%","\\%")); - } + @RequestParam(name = "cut") String cut, + HttpServletRequest req) { +// if (StringUtils.isNotEmpty(paramsCollectManifestHistoryEO.getNioNumber())) { +// paramsCollectManifestHistoryEO.setNioNumber(paramsCollectManifestHistoryEO.getNioNumber().replace("%","\\%")); +// } +// if (StringUtils.isNotEmpty(paramsCollectManifestHistoryEO.getParamsName())) { +// paramsCollectManifestHistoryEO.setParamsName(paramsCollectManifestHistoryEO.getParamsName().replace("%","\\%")); +// } +// if (StringUtils.isNotEmpty(paramsCollectManifestHistoryEO.getDre())) { +// paramsCollectManifestHistoryEO.setDre(paramsCollectManifestHistoryEO.getDre().replace("%","\\%")); +// } IPage page = new Page(pageNo, pageSize); - IPage list = paramsCollectManifestHistoryEOService.queryList(page, paramsCollectManifestEO, cut); + IPage list = paramsCollectManifestHistoryEOService.queryList(page, paramsCollectManifestHistoryEO, cut, req); return Result.OK(list); } diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/entity/ParamsCollectManifestBaseEO.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/entity/ParamsCollectManifestBaseEO.java index 5346caf15..8e42caf35 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/entity/ParamsCollectManifestBaseEO.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/entity/ParamsCollectManifestBaseEO.java @@ -137,4 +137,9 @@ public class ParamsCollectManifestBaseEO implements Serializable { @Excel(name = "参数清单id", width = 15) @ApiModelProperty(value = "参数清单id") private String paramsManifestId; + + /**标题默认值*/ + @Excel(name = "默认值", width = 15) + @ApiModelProperty(value = "标题默认值") + private String titleDefaultValue; } diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/mapper/ParamsCollectManifestEOMapper.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/mapper/ParamsCollectManifestEOMapper.java index 9c04eeaa3..1e8304570 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/mapper/ParamsCollectManifestEOMapper.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/mapper/ParamsCollectManifestEOMapper.java @@ -1,11 +1,11 @@ package com.jero.modules.cert.collect.mapper; -import java.util.List; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import org.apache.ibatis.annotations.Param; -import com.jero.modules.cert.collect.entity.ParamsCollectManifestEO; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.jero.modules.cert.collect.entity.ParamsCollectManifestEO; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * @Description: 参数收集清单 @@ -17,5 +17,8 @@ public interface ParamsCollectManifestEOMapper extends BaseMapper listInfo(@Param("paramsCollectManifestEO") ParamsCollectManifestEO paramsCollectManifestEO); + // 查询控件类型为 标题的 参数项 + List listInfoOfTitle(@Param("paramsManifestId") String paramsManifestId); + IPage pageInfo(@Param("page") IPage page, @Param("paramsCollectManifestEO") ParamsCollectManifestEO paramsCollectManifestEO); } diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsCollectManifestEOMapper.xml b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsCollectManifestEOMapper.xml index 5709b8d47..873d1399a 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsCollectManifestEOMapper.xml +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsCollectManifestEOMapper.xml @@ -29,6 +29,7 @@ + @@ -79,10 +80,18 @@ order by del_flag desc, add_flag desc, change_flag desc, nio_number asc + + diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsCollectManifestHistoryEOMapper.xml b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsCollectManifestHistoryEOMapper.xml index 6857bebfa..07a93e805 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsCollectManifestHistoryEOMapper.xml +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsCollectManifestHistoryEOMapper.xml @@ -26,6 +26,7 @@ + @@ -48,7 +49,9 @@ AND params_manifest_id = #{paramsCollectManifestEO.paramsManifestId} - + + AND state = #{paramsCollectManifestEO.state} + @@ -64,6 +67,7 @@ select * from params_collect_manifest_history + and control_type != '11' order by nio_number asc \ No newline at end of file diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/IParamsCollectManifestEOService.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/IParamsCollectManifestEOService.java index fce085305..b86067b96 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/IParamsCollectManifestEOService.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/IParamsCollectManifestEOService.java @@ -4,8 +4,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.service.IService; import com.jero.modules.cert.collect.entity.ParamsCollectManifestEO; import com.jero.modules.cert.collect.vo.ParamsCollectManifestVO; -import com.jero.modules.cert.template.entity.ParamsInfoPublishEO; +import javax.servlet.http.HttpServletRequest; import java.util.List; import java.util.Map; @@ -64,7 +64,7 @@ public interface IParamsCollectManifestEOService extends IService queryWrapper = QueryGenerator.initQueryWrapper(paramsCollectManifestEO, req.getParameterMap()); + queryWrapper.lambda().notIn(ParamsCollectManifestEO::getControlType, ControlTypeEnum.Title.getValue()) + .orderByDesc(ParamsCollectManifestEO::getDelFlag) + .orderByDesc(ParamsCollectManifestEO::getAddFlag) + .orderByDesc(ParamsCollectManifestEO::getChangeFlag) + .orderByAsc(ParamsCollectManifestEO::getNioNumber); + String paramsManifestId = paramsCollectManifestEO.getParamsManifestId(); String userTypes = paramsCollectManifestEO.getUserTypes(); @@ -268,16 +277,21 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl list = pageInfo.getRecords(); // 查询固定列 List paramsConfigEOList = paramsConfigEOService.queryList(paramsManifestId); // 查询配置列 List paramsConfigIdList = paramsConfigEOList.stream().map(ParamsConfigEO::getId).collect(Collectors.toList()); @@ -356,6 +370,13 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl dutyTerritoryMap = new HashMap<>(); + dutyTerritoryMap.put("id", collectManifestEO.getId()); + dutyTerritoryMap.put("state", collectManifestEO.getState()); + dutyTerritoryMap.put("dataValue", collectManifestEO.getDutyTerritory()); + manifestMap.put("dutyTerritory", dutyTerritoryMap); + // 处理工程接口人 Map sdtMap = new HashMap<>(); sdtMap.put("id", collectManifestEO.getId()); @@ -641,6 +662,9 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl> getLoginUserTypes(ParamsCollectManifestVO paramsCollectManifestVO, String cut) { + if (StringUtils.isEmpty(paramsCollectManifestVO.getProjectId()) || StringUtils.isEmpty(paramsCollectManifestVO.getParamsManifestId())) { + throw new JeroBootException("参数不能为空!"); + } + String projectId = paramsCollectManifestVO.getProjectId(); String paramsManifestId = paramsCollectManifestVO.getParamsManifestId(); @@ -1055,6 +1083,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl queryWrapper = new LambdaQueryWrapper<>(); queryWrapper.eq(ParamsCollectManifestEO::getParamsManifestId, paramsManifestId) + .notIn(ParamsCollectManifestEO::getControlType, ControlTypeEnum.Title.getValue()) .orderByDesc(ParamsCollectManifestEO::getUpdateTime); // 按修改时间降序 List list = list(queryWrapper); int collectFinishNumber = (int) list.stream().filter(e->CollectManifestStateEnum.SYNC_REPORT.getValue().equals(e.getState())).count(); @@ -1173,6 +1202,37 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl nioNumberList = paramsCollectManifestEOList.stream().map(ParamsCollectManifestEO::getNioNumber).collect(Collectors.toList()); + // 单独添加 控件类型为标题的参数项 + if (!isSync) { // 未上报 + List paramsCollectManifestEOListOfTitle = paramsCollectManifestEOMapper.listInfoOfTitle(paramsManifestId); + if(CollectionUtil.isNotEmpty(paramsCollectManifestEOListOfTitle)) { + for(ParamsCollectManifestEO item : paramsCollectManifestEOListOfTitle) { + ParamsReportDetailEO addReportDetailEO = new ParamsReportDetailEO(); + BeanUtils.copyProperties(item, addReportDetailEO); + String reportDetailId = UUID.randomUUID().toString().replace("-",""); + addReportDetailEO.setId(reportDetailId); + addReportDetailEO.setParamsManifestId(reportId); + addReportDetailEO.setSyncTime(syncTime); + addReportDetailEOList.add(addReportDetailEO); + } + } + + List nioNumberListOfTitle = paramsCollectManifestEOListOfTitle.stream().map(ParamsCollectManifestEO::getNioNumber).collect(Collectors.toList()); + nioNumberList.addAll(nioNumberListOfTitle); + } + + // 复制认证类别参数 List certCategoryParamsInfoPublishEOS = certCategoryParamsInfoPublishEOService.queryListByVersionAndNio(paramsManifestEO.getParamsTemplateId(), paramsManifestEO.getParamsTemplatePublishVersion(), nioNumberList); for (CertCategoryParamsInfoPublishEO ccpi : certCategoryParamsInfoPublishEOS) { ReportCertCategoryParamsInfoEO addCcpi = new ReportCertCategoryParamsInfoEO(); BeanUtils.copyProperties(ccpi, addCcpi); addCcpi.setId(UUID.randomUUID().toString().replace("-","")); + addCcpi.setParamsManifestId(reportId); // 绑定上报库 addReportCertCategoryParamsInfoEOList.add(addCcpi); } diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestHistoryEOServiceImpl.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestHistoryEOServiceImpl.java index 9deb0dc6a..d15de9823 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestHistoryEOServiceImpl.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsCollectManifestHistoryEOServiceImpl.java @@ -2,11 +2,13 @@ package com.jero.modules.cert.collect.service.impl; import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.util.ObjectUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.google.common.collect.Lists; import com.jero.common.constant.enums.CutEnum; import com.jero.common.constant.enums.YesOrNoEnum; +import com.jero.common.system.query.QueryGenerator; import com.jero.generater.modules.online.cgform.entity.OnlCgformField; import com.jero.generater.modules.online.cgform.service.impl.OnlCgformFieldServiceImpl; import com.jero.modules.cert.collect.entity.*; @@ -27,6 +29,7 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import javax.servlet.http.HttpServletRequest; import java.lang.reflect.Field; import java.text.SimpleDateFormat; import java.util.*; @@ -74,10 +77,15 @@ public class ParamsCollectManifestHistoryEOServiceImpl extends ServiceImpl queryWrapper = QueryGenerator.initQueryWrapper(paramsCollectManifestHistoryEO, req.getParameterMap()); + queryWrapper.lambda().notIn(ParamsCollectManifestHistoryEO::getControlType, ControlTypeEnum.Title.getValue()) + .orderByAsc(ParamsCollectManifestHistoryEO::getNioNumber); - IPage pageInfo = paramsCollectManifestHistoryEOMapper.pageInfo(page, paramsCollectManifestEO); // 查询固定列 + String paramsManifestId = paramsCollectManifestHistoryEO.getParamsManifestId(); + + IPage pageInfo = page(page, queryWrapper); // 查询固定列 +// IPage pageInfo = paramsCollectManifestHistoryEOMapper.pageInfo(page, paramsCollectManifestEO); // 查询固定列 List list = pageInfo.getRecords(); // 查询固定列 List paramsConfigEOList = paramsConfigHistoryEOService.queryList(paramsManifestId); // 查询配置列 List paramsConfigIdList = paramsConfigEOList.stream().map(ParamsConfigEO::getId).collect(Collectors.toList()); diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsManifestEOServiceImpl.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsManifestEOServiceImpl.java index 49a3b33ab..51fe947a7 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsManifestEOServiceImpl.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/collect/service/impl/ParamsManifestEOServiceImpl.java @@ -23,6 +23,7 @@ import com.jero.modules.cert.collect.vo.ParamsManifestHistoryVO; import com.jero.modules.cert.report.service.IParamsReportEOService; import com.jero.modules.cert.template.entity.ParamsInfoPublishEO; import com.jero.modules.cert.template.entity.ParamsTemplateEO; +import com.jero.modules.cert.template.enums.ControlTypeEnum; import com.jero.modules.cert.template.service.IParamsInfoPublishEOService; import com.jero.modules.cert.template.service.IParamsTemplateEOService; import com.jero.modules.project.entity.ProjectRelatedPersonnel; @@ -126,14 +127,16 @@ public class ParamsManifestEOServiceImpl extends ServiceImpl getById(@RequestParam(name = "id") String id) { + ParamsReportConfigEO paramsReportConfigEO = paramsReportConfigEOService.getById(id); + return Result.OK(paramsReportConfigEO); + } + } diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/entity/ReportCertCategoryParamsInfoEO.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/entity/ReportCertCategoryParamsInfoEO.java index 8ca30076c..80937575f 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/entity/ReportCertCategoryParamsInfoEO.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/entity/ReportCertCategoryParamsInfoEO.java @@ -29,4 +29,8 @@ public class ReportCertCategoryParamsInfoEO extends CertCategoryParamsInfoEO imp @ApiModelProperty(value = "发布时版本") private Integer version; + /**上报库id*/ + @ApiModelProperty(value = "上报库id") + private String paramsManifestId; + } diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/mapper/xml/ParamsReportDetailEOMapper.xml b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/mapper/xml/ParamsReportDetailEOMapper.xml index b539d2703..06d76a401 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/mapper/xml/ParamsReportDetailEOMapper.xml +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/mapper/xml/ParamsReportDetailEOMapper.xml @@ -27,6 +27,7 @@ + @@ -103,10 +104,12 @@ prd.id as id, prd.nio_number as nio_number, prd.params_name as params_name, + prd.control_type as control_type, + prd.title_default_value as title_default_value, rccpi.params_number as cert_number, rccpi.params_name as cert_params_name from params_report_detail prd - left join report_cert_category_params_info rccpi on prd.nio_number = rccpi.nio_number + left join report_cert_category_params_info rccpi on (prd.params_manifest_id = rccpi.params_manifest_id and prd.nio_number = rccpi.nio_number) and prd.id in diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/mapper/xml/ReportCertCategoryParamsInfoEOMapper.xml b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/mapper/xml/ReportCertCategoryParamsInfoEOMapper.xml index cc2317fb5..d73208e9f 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/mapper/xml/ReportCertCategoryParamsInfoEOMapper.xml +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/mapper/xml/ReportCertCategoryParamsInfoEOMapper.xml @@ -15,5 +15,6 @@ + \ No newline at end of file diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/impl/ParamsReportDetailEOServiceImpl.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/impl/ParamsReportDetailEOServiceImpl.java index 60754ba17..1881e36a6 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/impl/ParamsReportDetailEOServiceImpl.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/report/service/impl/ParamsReportDetailEOServiceImpl.java @@ -411,6 +411,17 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl record1 : dataList) { String paramsCollectManifestId = (String) record1.get("id"); + String controlType = (String) record1.get("control_type"); + String titleDefaultValue = (String) record1.get("title_default_value"); if (CollectionUtil.isNotEmpty(paramsConfigEOList)) { List fileList = new ArrayList<>(); @@ -830,70 +845,78 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImplconfigIdList.contains(e.getId())).collect(Collectors.toList()); // 过滤出要导出的配置列 paramsConfigEOList.forEach(paramsConfigEO -> { // 参数配置 - String paramsConfigId = paramsConfigEO.getId(); - ParamsReportConfigDataEO paramsConfigDataEO = paramsReportConfigDataEOService.queryByConfigIdAndCollectManifestId(paramsConfigId, paramsCollectManifestId); // 参数配置数据 - StringBuilder configDataBuilder = new StringBuilder(); // 重新组合配置数据 - if (StringUtils.isNotEmpty(paramsConfigDataEO.getTextData())) { - configDataBuilder.append(paramsConfigDataEO.getTextData()).append("&"); - } - if (StringUtils.isNotEmpty(paramsConfigDataEO.getPullData())) { - configDataBuilder.append(paramsConfigDataEO.getPullData()).append("&"); - } - if (StringUtils.isNotEmpty(paramsConfigDataEO.getFileConnectId())) { - List ossFileList = ossFileService.getFileInfosByConnectId(paramsConfigDataEO.getFileConnectId()); - if (CollectionUtil.isNotEmpty(ossFileList)) { - configDataBuilder.append(ossFileList.get(0).getFileName()).append("&"); - - fileList.addAll(ossFileList); + if (ControlTypeEnum.Title.getValue().equals(controlType)) { + record1.put(paramsConfigEO.getId(), titleDefaultValue); + } else { + String paramsConfigId = paramsConfigEO.getId(); + ParamsReportConfigDataEO paramsConfigDataEO = paramsReportConfigDataEOService.queryByConfigIdAndCollectManifestId(paramsConfigId, paramsCollectManifestId); // 参数配置数据 + StringBuilder configDataBuilder = new StringBuilder(); // 重新组合配置数据 + if (StringUtils.isNotEmpty(paramsConfigDataEO.getTextData())) { + configDataBuilder.append(paramsConfigDataEO.getTextData()).append("&"); } - } + if (StringUtils.isNotEmpty(paramsConfigDataEO.getPullData())) { + configDataBuilder.append(paramsConfigDataEO.getPullData()).append("&"); + } + if (StringUtils.isNotEmpty(paramsConfigDataEO.getFileConnectId())) { + List ossFileList = ossFileService.getFileInfosByConnectId(paramsConfigDataEO.getFileConnectId()); + if (CollectionUtil.isNotEmpty(ossFileList)) { + configDataBuilder.append(ossFileList.get(0).getFileName()).append("&"); - String configData = configDataBuilder.toString(); - if (configData.contains("&")) { - configData = configData.substring(0, configData.lastIndexOf("&")); - } + fileList.addAll(ossFileList); + } + } - record1.put(paramsConfigEO.getId(), configData); + String configData = configDataBuilder.toString(); + if (configData.contains("&")) { + configData = configData.substring(0, configData.lastIndexOf("&")); + } + + record1.put(paramsConfigEO.getId(), configData); + } }); } else if ("2".equals(paramsReportDetailVO.getCombineFlag())) { // 合并 String configData = ""; - List paramsReportConfigDataEOS = paramsReportConfigDataEOService.queryByConfigIdListAndCollectManifestId(configIdList, paramsCollectManifestId); + if (ControlTypeEnum.Title.getValue().equals(controlType)) { + record1.put("params_value", titleDefaultValue); + } else { + List paramsReportConfigDataEOS = paramsReportConfigDataEOService.queryByConfigIdListAndCollectManifestId(configIdList, paramsCollectManifestId); - String textDatas = paramsReportConfigDataEOS.stream().filter(e->StringUtils.isNotEmpty(e.getTextData())) - .map(ParamsReportConfigDataEO::getTextData).distinct().collect(Collectors.joining(paramsReportDetailVO.getSeparator())); + String textDatas = paramsReportConfigDataEOS.stream().filter(e -> StringUtils.isNotEmpty(e.getTextData())) + .map(ParamsReportConfigDataEO::getTextData).distinct().collect(Collectors.joining(paramsReportDetailVO.getSeparator())); - String pullDatas = paramsReportConfigDataEOS.stream().filter(e->StringUtils.isNotEmpty(e.getPullData())) - .map(ParamsReportConfigDataEO::getPullData).distinct().collect(Collectors.joining(paramsReportDetailVO.getSeparator())); + String pullDatas = paramsReportConfigDataEOS.stream().filter(e -> StringUtils.isNotEmpty(e.getPullData())) + .map(ParamsReportConfigDataEO::getPullData).distinct().collect(Collectors.joining(paramsReportDetailVO.getSeparator())); - List fileNameList = new ArrayList<>(); - paramsReportConfigDataEOS.forEach(paramsReportConfigDataEO -> { - if (StringUtils.isNotEmpty(paramsReportConfigDataEO.getFileConnectId())) { - List ossFileList = ossFileService.getFileInfosByConnectId(paramsReportConfigDataEO.getFileConnectId()); - if (CollectionUtil.isNotEmpty(ossFileList)) { - fileNameList.add(ossFileList.get(0).getFileName()); + List fileNameList = new ArrayList<>(); + paramsReportConfigDataEOS.forEach(paramsReportConfigDataEO -> { + if (StringUtils.isNotEmpty(paramsReportConfigDataEO.getFileConnectId())) { + List ossFileList = ossFileService.getFileInfosByConnectId(paramsReportConfigDataEO.getFileConnectId()); + if (CollectionUtil.isNotEmpty(ossFileList)) { + fileNameList.add(ossFileList.get(0).getFileName()); - fileList.addAll(ossFileList); + fileList.addAll(ossFileList); + } } + }); + + StringBuilder configDataBuilder = new StringBuilder(); // 重新组合配置数据 + if (StringUtils.isNotEmpty(textDatas)) { + configDataBuilder.append(textDatas).append("&"); } - }); + if (StringUtils.isNotEmpty(pullDatas)) { + configDataBuilder.append(pullDatas).append("&"); + } + if (CollectionUtil.isNotEmpty(fileNameList)) { + configDataBuilder.append(StringUtils.join(fileNameList, paramsReportDetailVO.getSeparator())).append("&"); + } + configData = configDataBuilder.toString(); + if (configData.contains("&")) { + configData = configData.substring(0, configData.lastIndexOf("&")); + } + record1.put("params_value", configData); - StringBuilder configDataBuilder = new StringBuilder(); // 重新组合配置数据 - if (StringUtils.isNotEmpty(textDatas)) { - configDataBuilder.append(textDatas).append("&"); } - if (StringUtils.isNotEmpty(pullDatas)) { - configDataBuilder.append(pullDatas).append("&"); - } - if (CollectionUtil.isNotEmpty(fileNameList)) { - configDataBuilder.append(StringUtils.join(fileNameList, ",")).append("&"); - } - configData = configDataBuilder.toString(); - if (configData.contains("&")) { - configData = configData.substring(0, configData.lastIndexOf("&")); - } - record1.put("params_value", configData); - } record1.put("fileList", fileList); } @@ -902,6 +925,8 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl queryForExportCustom(ParamsReportDetailVO paramsReportDetailVO) { + paramsReportDetailVO.setSeparator("&"); // 设置分隔符 + List idList = new ArrayList<>(); if (StringUtils.isNotEmpty(paramsReportDetailVO.getIds())) { idList = Arrays.asList(paramsReportDetailVO.getIds().split(",")); diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/entity/ParamsInfoEO.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/entity/ParamsInfoEO.java index bac0f3502..1df1f9a2e 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/entity/ParamsInfoEO.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/entity/ParamsInfoEO.java @@ -77,10 +77,10 @@ public class ParamsInfoEO implements Serializable { private String paramsName; /**技术领域*/ - @Excel(name = "*技术领域", width = 15) +// @Excel(name = "*技术领域", width = 15) // @Dict(dicCode = "technology_territory") @ApiModelProperty(value = "技术领域") - private String technologyTerritory; + private String technologyTerritory; // 2022-07-12 需求去掉技术领域 /**参数批次*/ @Excel(name = "*参数批次", width = 15, dicCode = "params_batch") @@ -106,7 +106,7 @@ public class ParamsInfoEO implements Serializable { private String certCategory; /**控件类型*/ - @Excel(name = "*控件类型", width = 15, replace = {"文本_1","下拉单选_2","下拉多选_3","附件_4","文本+下拉单选_5","文本+下拉多选_6","文本+附件_7","下拉单选+附件_8","下拉多选+附件_9","文本+下拉单选+附件_10"}) + @Excel(name = "*控件类型", width = 15, replace = {"文本_1","下拉单选_2","下拉多选_3","附件_4","文本+下拉单选_5","文本+下拉多选_6","文本+附件_7","下拉单选+附件_8","下拉多选+附件_9","文本+下拉单选+附件_10","标题_11"}) @ApiModelProperty(value = "控件类型") private String controlType; @@ -120,7 +120,12 @@ public class ParamsInfoEO implements Serializable { @ApiModelProperty(value = "控件备选值") private String controlValues; - /**附件模板*/ + /**标题默认值*/ + @Excel(name = "默认值", width = 15) + @ApiModelProperty(value = "标题默认值") + private String titleDefaultValue; + + /**附件模板*/ @ApiModelProperty(value = "附件模板") private String fileTemplateConnectId; diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/enums/ControlTypeEnum.java b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/enums/ControlTypeEnum.java index 3beeb783d..9304ce180 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/enums/ControlTypeEnum.java +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/enums/ControlTypeEnum.java @@ -20,7 +20,8 @@ public enum ControlTypeEnum { TEXT_FILE("文本+附件","Text+File","7"), PULL_SINGLE_FILE("下拉单选+附件","Pull single+File","8"), PULL_MORE_FILE("下拉多选+附件","Pull more+File","9"), - TEXT_PULL_SINGLE_FILE("文本+下拉单选+附件","Text+Pull single+File","10"); + TEXT_PULL_SINGLE_FILE("文本+下拉单选+附件","Text+Pull single+File","10"), + Title("标题","Title","11"); String name; String enName; diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/mapper/xml/ParamsInfoEOMapper.xml b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/mapper/xml/ParamsInfoEOMapper.xml index 9b653f43e..7416091d5 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/mapper/xml/ParamsInfoEOMapper.xml +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/mapper/xml/ParamsInfoEOMapper.xml @@ -21,6 +21,7 @@ + @@ -43,6 +44,7 @@ + @@ -74,6 +76,7 @@ + @@ -105,6 +108,7 @@ pi.control_verify as control_verify, pi.file_template_connect_id as file_template_connect_id, pi.params_template_id as params_template_id, + pi.title_default_value as title_default_value, ccpi.id as ccpi_id, ccpi.params_number as ccpi_params_number, ccpi.params_name as ccpi_params_name, diff --git a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/mapper/xml/ParamsInfoPublishEOMapper.xml b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/mapper/xml/ParamsInfoPublishEOMapper.xml index a41f24b12..4b3361698 100644 --- a/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/mapper/xml/ParamsInfoPublishEOMapper.xml +++ b/jero-boot/jero-boot-module-certification/src/main/java/com/jero/modules/cert/template/mapper/xml/ParamsInfoPublishEOMapper.xml @@ -22,6 +22,7 @@ + + + + diff --git a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/service/impl/SyncDataServiceImpl.java b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/service/impl/SyncDataServiceImpl.java index bb0397e54..7af3627da 100644 --- a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/service/impl/SyncDataServiceImpl.java +++ b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/service/impl/SyncDataServiceImpl.java @@ -1,7 +1,6 @@ package com.jero.modules.system.service.impl; import cn.hutool.core.collection.CollectionUtil; -import cn.hutool.core.util.ObjectUtil; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.jero.common.constant.CommonConstant; @@ -25,7 +24,6 @@ import org.springframework.transaction.annotation.Transactional; import java.io.IOException; import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; -import java.text.SimpleDateFormat; import java.util.*; import java.util.stream.Collectors; @@ -202,25 +200,25 @@ public class SyncDataServiceImpl implements ISyncDataService{ List sysUserList = sysUserService.getPPEmployeeList(); // log.info("查询到的用户信息结果集为:"+JSONObject.toJSONString(userEOList)); for(SysUser user:sysUserList){ - localUserMap.put(user.getId(),user); + localUserMap.put(user.getThirdId(),user); } // log.info("将用户信息集合转换为的用户MAP为:"+JSONObject.toJSONString(localUserMap)); log.info("开始更新数据库信息"); for(PPEmployee ppEmployee:ppEmployeeList){ try { - PPEmployeeMap.put(ppEmployee.getId(), ppEmployee); + PPEmployeeMap.put(ppEmployee.getWorker_user_id(), ppEmployee); //1.判断当前账号是否已添加到用户中 - if (!localUserMap.containsKey(ppEmployee.getId())) { + if (!localUserMap.containsKey(ppEmployee.getWorker_user_id())) { //删除数据库中与该账户相同的数据 - if(StringUtils.isNotBlank(ppEmployee.getId())) { + if(StringUtils.isNotBlank(ppEmployee.getWorker_user_id())) { // sysUserService.removeById(ppEmployee.getId()); // 这个为什么是逻辑删除 log.info("需要新增的用户信息为:" + JSONObject.toJSONString(ppEmployee)); SysUser newUser = sysUserService.addPPUserInfo(ppEmployee); - localUserMap.put(ppEmployee.getId(), newUser); + localUserMap.put(ppEmployee.getWorker_user_id(), newUser); } } else { - SysUser userEO = localUserMap.get(ppEmployee.getId()); + SysUser userEO = localUserMap.get(ppEmployee.getWorker_user_id()); log.info("需要更新的用户信息为:" + JSONObject.toJSONString(userEO) + " " + JSONObject.toJSONString(ppEmployee)); if(userEO != null) { sysUserService.updatePPUserInfo(userEO, ppEmployee); diff --git a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/service/impl/SysCategoryServiceImpl.java b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/service/impl/SysCategoryServiceImpl.java index 2232b6ade..db4eeac8c 100644 --- a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/service/impl/SysCategoryServiceImpl.java +++ b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/service/impl/SysCategoryServiceImpl.java @@ -273,6 +273,8 @@ public class SysCategoryServiceImpl extends ServiceImpl impl @Override public List getPPEmployeeList() { - QueryWrapper sysUserQueryWrapper = new QueryWrapper<>(); - sysUserQueryWrapper.lambda().eq(SysUser::getThirdType, PPSyncEnum.PP.getValue()); - return list(sysUserQueryWrapper); + return this.baseMapper.getPPEmployeeList(PPSyncEnum.PP.getValue()); } @Override @@ -491,11 +487,11 @@ public class SysUserServiceImpl extends ServiceImpl impl SysUser sysUser = new SysUser(); // 基本信息 sysUser.setId(ppEmployee.getId()); - sysUser.setUsername(ppEmployee.getUser_name()); + sysUser.setUsername(ppEmployee.getWorker_user_id()); sysUser.setRealname(ppEmployee.getFormatted_name()); sysUser.setStatus("Active".equals(ppEmployee.getEmployee_status())? CommonConstant.USER_UNFREEZE : CommonConstant.USER_FREEZE); sysUser.setDelFlag("1".equals(ppEmployee.getDelete_flag())? CommonConstant.DEL_FLAG_0 : CommonConstant.DEL_FLAG_1); - sysUser.setThirdId(ppEmployee.getUser_name()); + sysUser.setThirdId(ppEmployee.getWorker_user_id()); sysUser.setActivitiSync(CommonConstant.ACT_SYNC_1); sysUser.setWorkNo(ppEmployee.getEmployee_id()); sysUser.setWorkerType("Employee".equals(ppEmployee.getWorker_type())? CommonConstant.WORKER_TYPE_1 : CommonConstant.WORKER_TYPE_2); @@ -535,11 +531,11 @@ public class SysUserServiceImpl extends ServiceImpl impl public void updatePPUserInfo(SysUser sysUser, PPEmployee ppEmployee) { // 基本信息 - sysUser.setUsername(ppEmployee.getUser_name()); + sysUser.setUsername(ppEmployee.getWorker_user_id()); sysUser.setRealname(ppEmployee.getFormatted_name()); sysUser.setStatus("Active".equals(ppEmployee.getEmployee_status())? CommonConstant.USER_UNFREEZE : CommonConstant.USER_FREEZE); sysUser.setDelFlag("1".equals(ppEmployee.getDelete_flag())? CommonConstant.DEL_FLAG_0 : CommonConstant.DEL_FLAG_1); - sysUser.setThirdId(ppEmployee.getUser_name()); + sysUser.setThirdId(ppEmployee.getWorker_user_id()); sysUser.setWorkNo(ppEmployee.getEmployee_id()); sysUser.setWorkerType("Employee".equals(ppEmployee.getWorker_type())? CommonConstant.WORKER_TYPE_1 : CommonConstant.WORKER_TYPE_2); sysUser.setCreateTime(ppEmployee.getCreation_time()); diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/service/impl/BussDocumentLibraryEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/service/impl/BussDocumentLibraryEOServiceImpl.java index c13922769..9a6fb8341 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/service/impl/BussDocumentLibraryEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/service/impl/BussDocumentLibraryEOServiceImpl.java @@ -5780,11 +5780,13 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl record1 = (Map) record; + String technology_territory = (String)record1.get("technology_territory"); for (Map.Entry entry : record1.entrySet()) { //下拉选处理数据字典 dictItem(sysDictItems, entry, cut, fieldList,null); treeDictItem(categoryList, entry, treeFieldList, cut,null); } + record1.put("technology_territory_id",technology_territory); } return infoPage; } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsOpinionGather/controller/LawsOpinionAssessmentResultEOController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsOpinionGather/controller/LawsOpinionAssessmentResultEOController.java index a47f57b8f..8c14f5d6c 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsOpinionGather/controller/LawsOpinionAssessmentResultEOController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsOpinionGather/controller/LawsOpinionAssessmentResultEOController.java @@ -3,6 +3,7 @@ package com.jero.modules.lawsOpinionGather.controller; import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -19,7 +20,6 @@ import com.jero.common.system.base.controller.JeroController; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; -import org.springframework.web.servlet.ModelAndView; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import com.jero.common.aspect.annotation.AutoLog; @@ -153,10 +153,23 @@ public class LawsOpinionAssessmentResultEOController extends JeroController params) { + this.lawsOpinionAssessmentResultEOService.exportXls(response,request, lawsOpinionAssessmentResultEO,params); + } /** * 通过excel导入数据 diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsOpinionGather/entity/LawsOpinionAssessmentResultEO.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsOpinionGather/entity/LawsOpinionAssessmentResultEO.java index a7712bfbf..446d76baa 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsOpinionGather/entity/LawsOpinionAssessmentResultEO.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsOpinionGather/entity/LawsOpinionAssessmentResultEO.java @@ -4,6 +4,7 @@ import java.io.Serializable; import java.util.Date; import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; @@ -82,6 +83,8 @@ public class LawsOpinionAssessmentResultEO implements Serializable { @Excel(name = "附件", width = 15) @ApiModelProperty(value = "附件") private String accessoryFile; + @TableField(exist = false) + private String accessoryFileName; /**提出时间*/ @Excel(name = "提出时间", width = 15, format = "yyyy-MM-dd") diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsOpinionGather/entity/LawsOpinionGatherEO.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsOpinionGather/entity/LawsOpinionGatherEO.java index 35461f2e7..5e5a18fcf 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsOpinionGather/entity/LawsOpinionGatherEO.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsOpinionGather/entity/LawsOpinionGatherEO.java @@ -77,7 +77,7 @@ public class LawsOpinionGatherEO implements Serializable { private String technologyTerritory; @TableField(exist = false) /**技术领域展示字段*/ - private String technologyTerritoryShow; + private String technologyTerritoryName; /**收集结果*/ @Excel(name = "收集结果", width = 15) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsOpinionGather/service/ILawsOpinionAssessmentResultEOService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsOpinionGather/service/ILawsOpinionAssessmentResultEOService.java index f5f7a15c2..5fdc85844 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsOpinionGather/service/ILawsOpinionAssessmentResultEOService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsOpinionGather/service/ILawsOpinionAssessmentResultEOService.java @@ -5,7 +5,9 @@ import com.jero.modules.lawsOpinionGather.entity.LawsOpinionAssessmentResultEO; import com.baomidou.mybatisplus.extension.service.IService; import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; import java.util.List; +import java.util.Map; /** * @Description: 法规意见收集-评估结果表 @@ -67,4 +69,6 @@ public interface ILawsOpinionAssessmentResultEOService extends IService params); } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsOpinionGather/service/impl/LawsOpinionAssessmentResultEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsOpinionGather/service/impl/LawsOpinionAssessmentResultEOServiceImpl.java index bb99b46a6..3679cf031 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsOpinionGather/service/impl/LawsOpinionAssessmentResultEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsOpinionGather/service/impl/LawsOpinionAssessmentResultEOServiceImpl.java @@ -1,23 +1,44 @@ package com.jero.modules.lawsOpinionGather.service.impl; +import cn.hutool.core.util.ZipUtil; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; +import com.aliyuncs.utils.IOUtils; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.jero.common.constant.enums.CutEnum; +import com.jero.common.exception.JeroBootException; import com.jero.common.system.query.QueryGenerator; import com.jero.common.system.vo.LoginUser; +import com.jero.common.util.oss.CosBootUtil; import com.jero.modules.lawsOpinionGather.entity.LawsOpinionAssessmentResultEO; +import com.jero.modules.lawsOpinionGather.entity.LawsOpinionGatherEO; import com.jero.modules.lawsOpinionGather.mapper.LawsOpinionAssessmentResultEOMapper; import com.jero.modules.lawsOpinionGather.service.ILawsOpinionAssessmentResultEOService; +import com.jero.modules.oss.entity.OSSFile; +import com.jero.modules.oss.service.IOSSFileService; +import com.jero.modules.system.util.PDFUtils; import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.StringUtils; +import org.apache.poi.hssf.usermodel.HSSFSheet; +import org.apache.poi.hssf.usermodel.HSSFWorkbook; +import org.apache.poi.ss.usermodel.*; import org.apache.shiro.SecurityUtils; +import org.aspectj.util.FileUtil; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; -import java.util.ArrayList; -import java.util.List; -import java.util.Date; +import java.io.*; +import java.text.SimpleDateFormat; +import java.util.*; +import java.util.stream.Collectors; + import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; /** * @Description: 法规意见收集-评估结果表 @@ -28,6 +49,12 @@ import javax.servlet.http.HttpServletRequest; @Service public class LawsOpinionAssessmentResultEOServiceImpl extends ServiceImpl implements ILawsOpinionAssessmentResultEOService { + @Value(value = "${jero.path.upload}") + private String uploadpath; + + @Autowired + private IOSSFileService iOSSFileService; + /** * 保存 * @@ -125,4 +152,205 @@ public class LawsOpinionAssessmentResultEOServiceImpl extends ServiceImpl params) { + + Integer pageNo = Integer.parseInt(params.get("pageNo").toString()); + Integer pageSize = Integer.parseInt(params.get("pageSize").toString()); + String exportAll = (String)params.get("exportAll"); + String ids = (String)params.get("ids"); + String cut = (String)params.get("cut"); + String exportType = (String)params.get("exportType"); + List exportData = new ArrayList<>(); + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(lawsOpinionAssessmentResultEO, request.getParameterMap()); + if(StringUtils.isNotEmpty(ids)){ + List idList = Arrays.asList(ids.split(",")); + queryWrapper.lambda().in(LawsOpinionAssessmentResultEO::getId,idList); + } + if(StringUtils.equals(exportAll,"yes")){ + exportData = this.baseMapper.selectList(queryWrapper); + }else { + Page page = new Page(pageNo, pageSize); + IPage pageList = this.page(page, queryWrapper); + exportData = pageList.getRecords(); + } + + this.disposeData(exportData,cut); + + String title = ""; + String fileName = ""; + if(StringUtils.equals(cut, CutEnum.CN.getValue())){ + title = "相关章节,问题/建议,理由,附件,评估人,提出时间"; + fileName = "评估结果 " + ".xlsx"; + }else if(StringUtils.equals(cut,CutEnum.EN.getValue())){ + title = "Related section,IssueOrSuggest,Reason,Accessory,Evaluator,Submit Date"; + fileName = "Evaluation results " + ".xlsx"; + } + + OutputStream os = null; + HSSFWorkbook workbook = new HSSFWorkbook(); + + String path = uploadpath + "/tempZip/evaluationResults/" + System.currentTimeMillis(); + + try { + response.setHeader("Content-Disposition", + "attachment; filename=" + fileName); + response.setContentType("application/force-download"); + + HSSFSheet sheet = workbook.createSheet("sheet1"); + + CellStyle titleCellStyle = workbook.createCellStyle(); + titleCellStyle.setAlignment(HorizontalAlignment.CENTER);//垂直居中 + titleCellStyle.setVerticalAlignment(VerticalAlignment.CENTER);//水平居中 + titleCellStyle.setWrapText(true);//自动换行 + + Row firstRow = sheet.createRow(0); + + //创建表头 + String[] titleArr = title.split(","); + for (int i=0; i<=5; i++){ + sheet.setColumnWidth(i,4000); + Cell cell = firstRow.createCell(i); + cell.setCellStyle(titleCellStyle); + cell.setCellValue(titleArr[i]); + } + + //设置导出数据 + if(CollectionUtils.isNotEmpty(exportData)) { + for (int dataIndex = 0; dataIndex < exportData.size(); dataIndex++) { + Row dataRow = sheet.createRow(dataIndex + 1); + dataRow.createCell(0).setCellValue(exportData.get(dataIndex).getRelatedSection()); + dataRow.createCell(1).setCellValue(exportData.get(dataIndex).getIssueOrSuggest()); + dataRow.createCell(2).setCellValue(exportData.get(dataIndex).getReason()); + dataRow.createCell(3).setCellValue(exportData.get(dataIndex).getAccessoryFileName()); + dataRow.createCell(4).setCellValue(exportData.get(dataIndex).getCreateBy()); + String submitTimeStr = disposeDate(exportData.get(dataIndex).getSubmitTime()); + dataRow.createCell(5).setCellValue(submitTimeStr); + } + } + + if ("excel".equals(exportType)) { + os = response.getOutputStream(); + workbook.write(os); + os.flush(); + }else { + + File fileTemp = new File(path); + if (fileTemp.exists()) { + fileTemp.delete(); + } + fileTemp.mkdirs(); + //excel + OutputStream excelOS = new FileOutputStream(path + File.separator + fileName); + workbook.write(excelOS); + excelOS.flush(); + + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); + LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + + for (LawsOpinionAssessmentResultEO data : exportData) { + String accessoryFile = data.getAccessoryFile(); + + List fileInfosList = iOSSFileService.getFileInfos(accessoryFile); + if (fileInfosList.size() != 0) { + for (OSSFile ossFile : fileInfosList) { + String url = ossFile.getUrl(); + //判断文件是否存在 + if(StringUtils.isNotBlank(url)){ + //判断文件是否存在 + boolean b = CosBootUtil.doesObjectExist(url); + if(b){ + InputStream download = CosBootUtil.download(url); + if(url.endsWith(".pdf") || url.endsWith(".PDF")){ + String currentTime = sdf.format(new Date()); + String waterContent = loginUser.getUsername() + " " + currentTime; + File newFile = PDFUtils.PDFWatermark(download,uploadpath,ossFile.getFileName(),waterContent); + download = new FileInputStream(newFile.getPath()); + } + copyFile(download, path + File.separator + ossFile.getFileName()); + } + } + } + } + } + ZipUtil.zip(path, path + ".zip"); + //文件 + FileInputStream fis = new FileInputStream(path + ".zip"); + os = response.getOutputStream(); + + int len = 0; + while ((len = fis.read()) != -1) { + os.write(len); + } + os.flush(); + fis.close(); + excelOS.close(); + } + + }catch (IOException ex){ + if(CutEnum.CN.getValue().equals(cut)){ + throw new JeroBootException("下载文件失败"); + }else{ + throw new JeroBootException("Failed to download file"); + } + }finally { + IOUtils.closeQuietly(os); + File file = new File(path); + FileUtil.deleteContents(file); + File fileTemp = new File(path + ".zip"); + FileUtil.deleteContents(fileTemp); + } + } + + public static void copyFile(InputStream in, String newFile) throws IOException { + File file2 = new File(newFile); + if (!file2.exists()) { + file2.createNewFile(); + } + try (FileOutputStream ou = new FileOutputStream(newFile);) { + byte[] bs = new byte[1024]; + int count = 0; + while ((count = in.read(bs, 0, bs.length)) != -1) { + ou.write(bs, 0, count); + } + ou.flush(); + } catch (IOException e) { + e.printStackTrace(); + throw new IOException("复制文件失败!"); + } finally { + in.close(); + } + } + + /** + * 处理数据 + * @param datas + * @param cut + */ + public void disposeData(List datas,String cut){ + if(CollectionUtils.isNotEmpty(datas)){ + for (LawsOpinionAssessmentResultEO data : datas) { + if(StringUtils.isNotEmpty(data.getAccessoryFile())){ + List accessoryFileList = iOSSFileService.getFileInfos(data.getAccessoryFile()); + String accessoryFileName = accessoryFileList.stream().map(OSSFile::getFileName).collect(Collectors.joining(",")); + data.setAccessoryFileName(accessoryFileName); + } + } + } + } + + public String disposeDate(Date date){ + String result = ""; + try { + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); + if(date != null){ + result = sdf.format(date); + } + }catch (Exception ex){ + ex.printStackTrace(); + log.error("处理日期失败:" +ex.getMessage()); + } + return result; + } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsOpinionGather/service/impl/LawsOpinionGatherEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsOpinionGather/service/impl/LawsOpinionGatherEOServiceImpl.java index ef6aa374f..3107550fb 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsOpinionGather/service/impl/LawsOpinionGatherEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsOpinionGather/service/impl/LawsOpinionGatherEOServiceImpl.java @@ -151,7 +151,7 @@ public class LawsOpinionGatherEOServiceImpl extends ServiceImpl opinionArchiveFileList = iOSSFileService.getFileInfosByConnectId(StringUtils.join(lawsOpinionGather.getOpinionArchiveId(), ",")); diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsOpinionGather/service/impl/LawsProcessHistoryEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsOpinionGather/service/impl/LawsProcessHistoryEOServiceImpl.java index a8e64f79f..ec91475dc 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsOpinionGather/service/impl/LawsProcessHistoryEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsOpinionGather/service/impl/LawsProcessHistoryEOServiceImpl.java @@ -11,10 +11,12 @@ import com.jero.modules.lawsOpinionGather.enums.LawsOpinionGatherNodeEnum; import com.jero.modules.lawsOpinionGather.enums.OperatorRoleCodeEnum; import com.jero.modules.lawsOpinionGather.mapper.LawsProcessHistoryEOMapper; import com.jero.modules.lawsOpinionGather.service.ILawsProcessHistoryEOService; +import com.jero.modules.lawsTechnologyEvaluation.enums.LawsTechnologyEvaluationNodeEnum; import com.jero.modules.project.enums.OperatorTypeEnum; import com.jero.modules.project.enums.RequestSourceEnum; import com.jero.modules.system.entity.SysUser; import com.jero.modules.system.service.ISysUserService; +import com.jero.modules.wkflow.enums.FlowTypeEnum; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -120,9 +122,12 @@ public class LawsProcessHistoryEOServiceImpl extends ServiceImpl { + @Autowired + private ILawsTechnologyEvaluationComplianceResultEOService lawsTechnologyEvaluationComplianceResultEOService; + + /** + * 分页列表查询 + * + * @param lawsTechnologyEvaluationComplianceResultEO + * @param pageNo + * @param pageSize + * @param req + * @return + */ + @AutoLog(value = "法规技术评估-评估人反馈-符合性结果表-分页列表查询") + @ApiOperation(value="法规技术评估-评估人反馈-符合性结果表-分页列表查询", notes="法规技术评估-评估人反馈-符合性结果表-分页列表查询") + @GetMapping(value = "/page") + public Result queryPageList(LawsTechnologyEvaluationComplianceResultEO lawsTechnologyEvaluationComplianceResultEO, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(lawsTechnologyEvaluationComplianceResultEO, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = lawsTechnologyEvaluationComplianceResultEOService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 列表查询 + * + * @return + */ + @AutoLog(value = "法规技术评估-评估人反馈-符合性结果表-列表查询") + @ApiOperation(value="法规技术评估-评估人反馈-符合性结果表-列表查询", notes="法规技术评估-评估人反馈-符合性结果表-列表查询") + @GetMapping(value = "/list") + public Result> queryList(LawsTechnologyEvaluationComplianceResultEO lawsTechnologyEvaluationComplianceResultEO, + HttpServletRequest req, + @RequestParam(name="cut", defaultValue="cn") String cut) { + List list = lawsTechnologyEvaluationComplianceResultEOService.queryList(lawsTechnologyEvaluationComplianceResultEO,req,cut); + return Result.OK(list); + } + + /** + * 添加 + * + * @param lawsTechnologyEvaluationComplianceResultEO + * @return + */ + @AutoLog(value = "法规技术评估-评估人反馈-符合性结果表-添加") + @ApiOperation(value="法规技术评估-评估人反馈-符合性结果表-添加", notes="法规技术评估-评估人反馈-符合性结果表-添加") + @PostMapping(value = "/add") + public Result add(@Validated @RequestBody LawsTechnologyEvaluationComplianceResultEO lawsTechnologyEvaluationComplianceResultEO) { + lawsTechnologyEvaluationComplianceResultEOService.add(lawsTechnologyEvaluationComplianceResultEO); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param lawsTechnologyEvaluationComplianceResultEO + * @return + */ + @AutoLog(value = "法规技术评估-评估人反馈-符合性结果表-编辑") + @ApiOperation(value="法规技术评估-评估人反馈-符合性结果表-编辑", notes="法规技术评估-评估人反馈-符合性结果表-编辑") + @PutMapping(value = "/edit") + public Result edit(@Validated @RequestBody LawsTechnologyEvaluationComplianceResultEO lawsTechnologyEvaluationComplianceResultEO) { + lawsTechnologyEvaluationComplianceResultEOService.editById(lawsTechnologyEvaluationComplianceResultEO); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "法规技术评估-评估人反馈-符合性结果表-通过id删除") + @ApiOperation(value="法规技术评估-评估人反馈-符合性结果表-通过id删除", notes="法规技术评估-评估人反馈-符合性结果表-通过id删除") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + lawsTechnologyEvaluationComplianceResultEOService.deleteById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "法规技术评估-评估人反馈-符合性结果表-批量删除") + @ApiOperation(value="法规技术评估-评估人反馈-符合性结果表-批量删除", notes="法规技术评估-评估人反馈-符合性结果表-批量删除") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.lawsTechnologyEvaluationComplianceResultEOService.deleteByIds(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + @AutoLog(value = "法规技术评估-评估人反馈-符合性结果表-通过id查询") + @ApiOperation(value="法规技术评估-评估人反馈-符合性结果表-通过id查询", notes="法规技术评估-评估人反馈-符合性结果表-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name="id",required=true) String id) { + LawsTechnologyEvaluationComplianceResultEO lawsTechnologyEvaluationComplianceResultEO = lawsTechnologyEvaluationComplianceResultEOService.queryById(id); + if(lawsTechnologyEvaluationComplianceResultEO==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(lawsTechnologyEvaluationComplianceResultEO); + } + + /** + * 导出excel + * + * @param request + * @param lawsTechnologyEvaluationComplianceResultEO + */ + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, LawsTechnologyEvaluationComplianceResultEO lawsTechnologyEvaluationComplianceResultEO) { + return super.exportXls(request, lawsTechnologyEvaluationComplianceResultEO, LawsTechnologyEvaluationComplianceResultEO.class, "法规技术评估-评估人反馈-符合性结果表"); + } + + /** + * 导出zip压缩包,带文件。 + * @param response + * @param request + * @param lawsTechnologyEvaluationComplianceResultEO + * @param params + */ + @RequestMapping(value = "/exportZip") + public void exportZip(HttpServletResponse response,HttpServletRequest request, + LawsTechnologyEvaluationComplianceResultEO lawsTechnologyEvaluationComplianceResultEO, + @RequestParam Map params) { + this.lawsTechnologyEvaluationComplianceResultEOService.exportZip(response,request, lawsTechnologyEvaluationComplianceResultEO,params); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, LawsTechnologyEvaluationComplianceResultEO.class); + } + +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/controller/LawsTechnologyEvaluationEOController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/controller/LawsTechnologyEvaluationEOController.java index 2c8380afc..fb3f82b0e 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/controller/LawsTechnologyEvaluationEOController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/controller/LawsTechnologyEvaluationEOController.java @@ -2,8 +2,11 @@ package com.jero.modules.lawsTechnologyEvaluation.controller; import java.util.Arrays; import java.util.List; +import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; + +import com.alibaba.fastjson.JSONObject; import com.jero.common.api.vo.Result; import com.jero.common.system.query.QueryGenerator; import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationEO; @@ -13,9 +16,11 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import lombok.extern.slf4j.Slf4j; import com.jero.common.system.base.controller.JeroController; +import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; import org.springframework.web.servlet.ModelAndView; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -35,7 +40,7 @@ import com.jero.common.aspect.annotation.AutoLog; public class LawsTechnologyEvaluationEOController extends JeroController { @Autowired private ILawsTechnologyEvaluationEOService lawsTechnologyEvaluationEOService; - + /** * 分页列表查询 * @@ -51,10 +56,12 @@ public class LawsTechnologyEvaluationEOController extends JeroController queryPageList(LawsTechnologyEvaluationEO lawsTechnologyEvaluationEO, @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + @RequestParam(name="cut", defaultValue="cn") String cut, HttpServletRequest req) { QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(lawsTechnologyEvaluationEO, req.getParameterMap()); Page page = new Page(pageNo, pageSize); IPage pageList = lawsTechnologyEvaluationEOService.page(page, queryWrapper); + this.lawsTechnologyEvaluationEOService.disposeData(pageList.getRecords(),cut); return Result.OK(pageList); } @@ -167,4 +174,40 @@ public class LawsTechnologyEvaluationEOController extends JeroController processCall(@RequestBody JSONObject jsonObject){ + return this.lawsTechnologyEvaluationEOService.processCall(jsonObject); + } + + @ApiOperation(value="法规意见收集表中添加选择条款调用文档库数据--分页", notes="法规意见收集表中选择条款调用文档库数据--分页") + @PostMapping(value = "/queryPageDummy") + @ResponseBody + public net.sf.json.JSONObject queryPageDummy(@RequestBody Map parameter) { + IPage infoPage = this.lawsTechnologyEvaluationEOService.getPageDummy(parameter); + Result ok = Result.OK(infoPage); + net.sf.json.JSONObject jsonResult = net.sf.json.JSONObject.fromObject(ok); + return jsonResult; + } + + @AutoLog(value = "条款导入模板下载") + @ApiOperation(value = "条款导入模板下载") + @GetMapping(value = "/exportItemTemplate") + public void exportItemTemplate(@RequestParam(name = "cut") String cut, HttpServletResponse response, HttpServletRequest request) throws Exception { + this.lawsTechnologyEvaluationEOService.exportItemTemplate(cut,response,request); + } + + @AutoLog(value = "条款导入") + @ApiOperation(value = "条款导入") + @PostMapping(value = "/importItemExcel") + public Result importItemExcel(MultipartFile file, @RequestParam(name = "cut") String cut, HttpServletRequest request) throws Exception { + List> result = this.lawsTechnologyEvaluationEOService.importItemExcel(file,cut,request); + return Result.OK(result); + } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/controller/LawsTechnologyEvaluationFlowDetailEOController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/controller/LawsTechnologyEvaluationFlowDetailEOController.java new file mode 100644 index 000000000..3605e81cc --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/controller/LawsTechnologyEvaluationFlowDetailEOController.java @@ -0,0 +1,186 @@ +package com.jero.modules.lawsTechnologyEvaluation.controller; + +import java.util.Arrays; +import java.util.List; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.alibaba.fastjson.JSONObject; +import com.jero.common.api.vo.Result; +import com.jero.common.system.query.QueryGenerator; +import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationFlowDetailEO; +import com.jero.modules.lawsTechnologyEvaluation.service.ILawsTechnologyEvaluationFlowDetailEOService; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import lombok.extern.slf4j.Slf4j; +import com.jero.common.system.base.controller.JeroController; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.servlet.ModelAndView; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import com.jero.common.aspect.annotation.AutoLog; + + + /** + * @Description: 法规技术评估表-流程明细 + * @Author: jero-boot + * @Date: 2022-07-11 + * @Version: V1.0 + */ +@Api(tags="法规技术评估表-流程明细") +@RestController +@RequestMapping("/lawsTechnologyEvaluation/lawsTechnologyEvaluationFlowDetailEO") +@Slf4j +public class LawsTechnologyEvaluationFlowDetailEOController extends JeroController { + @Autowired + private ILawsTechnologyEvaluationFlowDetailEOService lawsTechnologyEvaluationFlowDetailEOService; + + /** + * 分页列表查询 + * + * @param lawsTechnologyEvaluationFlowDetailEO + * @param pageNo + * @param pageSize + * @param req + * @return + */ + @AutoLog(value = "法规技术评估表-流程明细-分页列表查询") + @ApiOperation(value="法规技术评估表-流程明细-分页列表查询", notes="法规技术评估表-流程明细-分页列表查询") + @GetMapping(value = "/page") + public Result queryPageList(LawsTechnologyEvaluationFlowDetailEO lawsTechnologyEvaluationFlowDetailEO, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + @RequestParam(name="cut", defaultValue="cn") String cut, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(lawsTechnologyEvaluationFlowDetailEO, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = lawsTechnologyEvaluationFlowDetailEOService.page(page, queryWrapper); + this.lawsTechnologyEvaluationFlowDetailEOService.disposeData(pageList.getRecords(),cut); + return Result.OK(pageList); + } + + /** + * 列表查询 + * + * @return + */ + @AutoLog(value = "法规技术评估表-流程明细-列表查询") + @ApiOperation(value="法规技术评估表-流程明细-列表查询", notes="法规技术评估表-流程明细-列表查询") + @GetMapping(value = "/list") + public Result> queryList() { + List list = lawsTechnologyEvaluationFlowDetailEOService.queryList(); + return Result.OK(list); + } + + /** + * 添加 + * + * @param lawsTechnologyEvaluationFlowDetailEO + * @return + */ + @AutoLog(value = "法规技术评估表-流程明细-添加") + @ApiOperation(value="法规技术评估表-流程明细-添加", notes="法规技术评估表-流程明细-添加") + @PostMapping(value = "/add") + public Result add(@Validated @RequestBody LawsTechnologyEvaluationFlowDetailEO lawsTechnologyEvaluationFlowDetailEO) { + lawsTechnologyEvaluationFlowDetailEOService.add(lawsTechnologyEvaluationFlowDetailEO); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param lawsTechnologyEvaluationFlowDetailEO + * @return + */ + @AutoLog(value = "法规技术评估表-流程明细-编辑") + @ApiOperation(value="法规技术评估表-流程明细-编辑", notes="法规技术评估表-流程明细-编辑") + @PutMapping(value = "/edit") + public Result edit(@Validated @RequestBody LawsTechnologyEvaluationFlowDetailEO lawsTechnologyEvaluationFlowDetailEO) { + lawsTechnologyEvaluationFlowDetailEOService.editById(lawsTechnologyEvaluationFlowDetailEO); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "法规技术评估表-流程明细-通过id删除") + @ApiOperation(value="法规技术评估表-流程明细-通过id删除", notes="法规技术评估表-流程明细-通过id删除") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + lawsTechnologyEvaluationFlowDetailEOService.deleteById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "法规技术评估表-流程明细-批量删除") + @ApiOperation(value="法规技术评估表-流程明细-批量删除", notes="法规技术评估表-流程明细-批量删除") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.lawsTechnologyEvaluationFlowDetailEOService.deleteByIds(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + @AutoLog(value = "法规技术评估表-流程明细-通过id查询") + @ApiOperation(value="法规技术评估表-流程明细-通过id查询", notes="法规技术评估表-流程明细-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name="id",required=true) String id) { + LawsTechnologyEvaluationFlowDetailEO lawsTechnologyEvaluationFlowDetailEO = lawsTechnologyEvaluationFlowDetailEOService.queryById(id); + if(lawsTechnologyEvaluationFlowDetailEO==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(lawsTechnologyEvaluationFlowDetailEO); + } + + /** + * 导出excel + * + * @param request + * @param lawsTechnologyEvaluationFlowDetailEO + */ + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, LawsTechnologyEvaluationFlowDetailEO lawsTechnologyEvaluationFlowDetailEO) { + return super.exportXls(request, lawsTechnologyEvaluationFlowDetailEO, LawsTechnologyEvaluationFlowDetailEO.class, "法规技术评估表-流程明细"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, LawsTechnologyEvaluationFlowDetailEO.class); + } + + /** + * 流程调用接口 + * @param jsonObject + * @return + */ + @AutoLog(value = "法规技术评估-流程明细表-流程调用") + @ApiOperation(value="法规技术评估-流程明细表-流程调用", notes="法规技术评估-流程明细表-流程调用") + @PostMapping(value = "/processCall") + public Result processCall(@RequestBody JSONObject jsonObject){ + return this.lawsTechnologyEvaluationFlowDetailEOService.processCall(jsonObject); + } + +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/controller/LawsTechnologyEvaluationItemResultEOController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/controller/LawsTechnologyEvaluationItemResultEOController.java new file mode 100644 index 000000000..1a435230f --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/controller/LawsTechnologyEvaluationItemResultEOController.java @@ -0,0 +1,215 @@ +package com.jero.modules.lawsTechnologyEvaluation.controller; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.alibaba.fastjson.JSONObject; +import com.jero.common.api.vo.Result; +import com.jero.common.system.query.QueryGenerator; +import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationItemResultEO; +import com.jero.modules.lawsTechnologyEvaluation.service.ILawsTechnologyEvaluationItemResultEOService; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import lombok.extern.slf4j.Slf4j; +import com.jero.common.system.base.controller.JeroController; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.servlet.ModelAndView; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import com.jero.common.aspect.annotation.AutoLog; + + + /** + * @Description: 法规技术评估-条款信息评估结果表 + * @Author: jero-boot + * @Date: 2022-07-11 + * @Version: V1.0 + */ +@Api(tags="法规技术评估-条款信息评估结果表") +@RestController +@RequestMapping("/lawsTechnologyEvaluation/lawsTechnologyEvaluationItemResultEO") +@Slf4j +public class LawsTechnologyEvaluationItemResultEOController extends JeroController { + @Autowired + private ILawsTechnologyEvaluationItemResultEOService lawsTechnologyEvaluationItemResultEOService; + + /** + * 分页列表查询 + * + * @param lawsTechnologyEvaluationItemResultEO + * @param pageNo + * @param pageSize + * @param req + * @return + */ + @AutoLog(value = "法规技术评估-条款信息评估结果表-分页列表查询") + @ApiOperation(value="法规技术评估-条款信息评估结果表-分页列表查询", notes="法规技术评估-条款信息评估结果表-分页列表查询") + @GetMapping(value = "/page") + public Result queryPageList(LawsTechnologyEvaluationItemResultEO lawsTechnologyEvaluationItemResultEO, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(lawsTechnologyEvaluationItemResultEO, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = lawsTechnologyEvaluationItemResultEOService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 列表查询 + * + * @return + */ + @AutoLog(value = "法规技术评估-条款信息评估结果表-列表查询") + @ApiOperation(value="法规技术评估-条款信息评估结果表-列表查询", notes="法规技术评估-条款信息评估结果表-列表查询") + @GetMapping(value = "/list") + public Result> queryList(LawsTechnologyEvaluationItemResultEO lawsTechnologyEvaluationItemResultEO, + HttpServletRequest req, + String cut) { + List list = lawsTechnologyEvaluationItemResultEOService.queryList(lawsTechnologyEvaluationItemResultEO,req,cut); + this.lawsTechnologyEvaluationItemResultEOService.disposeData(list,cut); + return Result.OK(list); + } + + /** + * 添加 + * + * @param lawsTechnologyEvaluationItemResultEO + * @return + */ + @AutoLog(value = "法规技术评估-条款信息评估结果表-添加") + @ApiOperation(value="法规技术评估-条款信息评估结果表-添加", notes="法规技术评估-条款信息评估结果表-添加") + @PostMapping(value = "/add") + public Result add(@Validated @RequestBody LawsTechnologyEvaluationItemResultEO lawsTechnologyEvaluationItemResultEO) { + lawsTechnologyEvaluationItemResultEOService.add(lawsTechnologyEvaluationItemResultEO); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param lawsTechnologyEvaluationItemResultEO + * @return + */ + @AutoLog(value = "法规技术评估-条款信息评估结果表-编辑") + @ApiOperation(value="法规技术评估-条款信息评估结果表-编辑", notes="法规技术评估-条款信息评估结果表-编辑") + @PutMapping(value = "/edit") + public Result edit(@Validated @RequestBody LawsTechnologyEvaluationItemResultEO lawsTechnologyEvaluationItemResultEO) { + lawsTechnologyEvaluationItemResultEOService.editById(lawsTechnologyEvaluationItemResultEO); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "法规技术评估-条款信息评估结果表-通过id删除") + @ApiOperation(value="法规技术评估-条款信息评估结果表-通过id删除", notes="法规技术评估-条款信息评估结果表-通过id删除") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + lawsTechnologyEvaluationItemResultEOService.deleteById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "法规技术评估-条款信息评估结果表-批量删除") + @ApiOperation(value="法规技术评估-条款信息评估结果表-批量删除", notes="法规技术评估-条款信息评估结果表-批量删除") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.lawsTechnologyEvaluationItemResultEOService.deleteByIds(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + @AutoLog(value = "法规技术评估-条款信息评估结果表-通过id查询") + @ApiOperation(value="法规技术评估-条款信息评估结果表-通过id查询", notes="法规技术评估-条款信息评估结果表-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name="id",required=true) String id) { + LawsTechnologyEvaluationItemResultEO lawsTechnologyEvaluationItemResultEO = lawsTechnologyEvaluationItemResultEOService.queryById(id); + if(lawsTechnologyEvaluationItemResultEO==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(lawsTechnologyEvaluationItemResultEO); + } + + /** + * 导出excel + * + * @param request + * @param lawsTechnologyEvaluationItemResultEO + */ + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, LawsTechnologyEvaluationItemResultEO lawsTechnologyEvaluationItemResultEO) { + return super.exportXls(request, lawsTechnologyEvaluationItemResultEO, LawsTechnologyEvaluationItemResultEO.class, "法规技术评估-条款信息评估结果表"); + } + + /** + * 导出zip压缩包,带文件。 + * @param response + * @param request + * @param lawsTechnologyEvaluationItemResultEO + * @param params + */ + @RequestMapping(value = "/exportZip") + public void exportZip(HttpServletResponse response,HttpServletRequest request, + LawsTechnologyEvaluationItemResultEO lawsTechnologyEvaluationItemResultEO, + @RequestParam Map params) { + this.lawsTechnologyEvaluationItemResultEOService.exportZip(response,request, lawsTechnologyEvaluationItemResultEO,params); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, LawsTechnologyEvaluationItemResultEO.class); + } + + /** + * 流程调用接口 + * @param jsonObject + * @return + */ + @AutoLog(value = "法规技术评估-条款信息评估结果表-流程调用") + @ApiOperation(value="法规技术评估-条款信息评估结果表-流程调用", notes="法规技术评估-条款信息评估结果表-流程调用") + @PostMapping(value = "/processCall") + public Result processCall(@RequestBody JSONObject jsonObject){ + return this.lawsTechnologyEvaluationItemResultEOService.processCall(jsonObject); + } + + /** + * 编辑 + * + * @param jsonObject + * @return + */ + @AutoLog(value = "法规技术评估-条款信息评估结果表-批量更新") + @ApiOperation(value="法规技术评估-条款信息评估结果表-批量更新", notes="法规技术评估-条款信息评估结果表-批量更新") + @PostMapping(value = "/batchUpdate") + public Result batchUpdate(@RequestBody JSONObject jsonObject) { + this.lawsTechnologyEvaluationItemResultEOService.batchUpdate(jsonObject); + return Result.OK("编辑成功!"); + } +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/controller/LawsTechnologyEvaluationResultEOController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/controller/LawsTechnologyEvaluationResultEOController.java new file mode 100644 index 000000000..61d19b865 --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/controller/LawsTechnologyEvaluationResultEOController.java @@ -0,0 +1,202 @@ +package com.jero.modules.lawsTechnologyEvaluation.controller; + +import java.util.Arrays; +import java.util.List; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.alibaba.fastjson.JSONObject; +import com.jero.common.api.vo.Result; +import com.jero.common.system.query.QueryGenerator; +import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationResultEO; +import com.jero.modules.lawsTechnologyEvaluation.service.ILawsTechnologyEvaluationResultEOService; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import lombok.extern.slf4j.Slf4j; +import com.jero.common.system.base.controller.JeroController; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.servlet.ModelAndView; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import com.jero.common.aspect.annotation.AutoLog; + + + /** + * @Description: 法规技术评估-评估结果表 + * @Author: jero-boot + * @Date: 2022-07-11 + * @Version: V1.0 + */ +@Api(tags="法规技术评估-评估结果表") +@RestController +@RequestMapping("/lawsTechnologyEvaluation/lawsTechnologyEvaluationResultEO") +@Slf4j +public class LawsTechnologyEvaluationResultEOController extends JeroController { + @Autowired + private ILawsTechnologyEvaluationResultEOService lawsTechnologyEvaluationResultEOService; + + /** + * 分页列表查询 + * + * @param lawsTechnologyEvaluationResultEO + * @param pageNo + * @param pageSize + * @param req + * @return + */ + @AutoLog(value = "法规技术评估-评估结果表-分页列表查询") + @ApiOperation(value="法规技术评估-评估结果表-分页列表查询", notes="法规技术评估-评估结果表-分页列表查询") + @GetMapping(value = "/page") + public Result queryPageList(LawsTechnologyEvaluationResultEO lawsTechnologyEvaluationResultEO, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(lawsTechnologyEvaluationResultEO, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = lawsTechnologyEvaluationResultEOService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 列表查询 + * + * @return + */ + @AutoLog(value = "法规技术评估-评估结果表-列表查询") + @ApiOperation(value="法规技术评估-评估结果表-列表查询", notes="法规技术评估-评估结果表-列表查询") + @GetMapping(value = "/list") + public Result> queryList(LawsTechnologyEvaluationResultEO lawsTechnologyEvaluationResultEO, + HttpServletRequest req) { + List list = lawsTechnologyEvaluationResultEOService.queryList(lawsTechnologyEvaluationResultEO,req); + return Result.OK(list); + } + + /** + * 添加 + * + * @param lawsTechnologyEvaluationResultEO + * @return + */ + @AutoLog(value = "法规技术评估-评估结果表-添加") + @ApiOperation(value="法规技术评估-评估结果表-添加", notes="法规技术评估-评估结果表-添加") + @PostMapping(value = "/add") + public Result add(@Validated @RequestBody LawsTechnologyEvaluationResultEO lawsTechnologyEvaluationResultEO) { + lawsTechnologyEvaluationResultEOService.add(lawsTechnologyEvaluationResultEO); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param lawsTechnologyEvaluationResultEO + * @return + */ + @AutoLog(value = "法规技术评估-评估结果表-编辑") + @ApiOperation(value="法规技术评估-评估结果表-编辑", notes="法规技术评估-评估结果表-编辑") + @PutMapping(value = "/edit") + public Result edit(@Validated @RequestBody LawsTechnologyEvaluationResultEO lawsTechnologyEvaluationResultEO) { + lawsTechnologyEvaluationResultEOService.editById(lawsTechnologyEvaluationResultEO); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "法规技术评估-评估结果表-通过id删除") + @ApiOperation(value="法规技术评估-评估结果表-通过id删除", notes="法规技术评估-评估结果表-通过id删除") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + lawsTechnologyEvaluationResultEOService.deleteById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "法规技术评估-评估结果表-批量删除") + @ApiOperation(value="法规技术评估-评估结果表-批量删除", notes="法规技术评估-评估结果表-批量删除") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.lawsTechnologyEvaluationResultEOService.deleteByIds(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + @AutoLog(value = "法规技术评估-评估结果表-通过id查询") + @ApiOperation(value="法规技术评估-评估结果表-通过id查询", notes="法规技术评估-评估结果表-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name="id",required=true) String id) { + LawsTechnologyEvaluationResultEO lawsTechnologyEvaluationResultEO = lawsTechnologyEvaluationResultEOService.queryById(id); + if(lawsTechnologyEvaluationResultEO==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(lawsTechnologyEvaluationResultEO); + } + + /** + * 导出excel + * + * @param request + * @param lawsTechnologyEvaluationResultEO + */ + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, LawsTechnologyEvaluationResultEO lawsTechnologyEvaluationResultEO) { + return super.exportXls(request, lawsTechnologyEvaluationResultEO, LawsTechnologyEvaluationResultEO.class, "法规技术评估-评估结果表"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, LawsTechnologyEvaluationResultEO.class); + } + + + /** + * 添加 + * + * @param json + * @return + */ + @AutoLog(value = "法规技术评估-评估结果表-批量添加") + @ApiOperation(value="法规技术评估-评估结果表-批量添加", notes="法规技术评估-评估结果表-批量添加") + @PostMapping(value = "/evaluatorSaveResult") + public Result evaluatorSaveResult(@RequestBody JSONObject json) { + lawsTechnologyEvaluationResultEOService.evaluatorSaveResult(json); + return Result.OK("添加成功!"); + } + + /** + * 根据流程实例id、法规技术评估id 查询评估结果与符合性结果接口 + * @param lawsTechnologyEvaluationResultEO + * @param req + * @return + */ + @AutoLog(value = "法规技术评估流程-查询评估结果与符合性结果接口") + @ApiOperation(value="法规技术评估流程-查询评估结果与符合性结果接口", notes="法规技术评估流程-查询评估结果与符合性结果接口") + @GetMapping(value = "/queryEvaluationResultAndComplianceResult") + public Result queryEvaluationResultAndComplianceResult(LawsTechnologyEvaluationResultEO lawsTechnologyEvaluationResultEO, + HttpServletRequest req) { + JSONObject json = lawsTechnologyEvaluationResultEOService.queryEvaluationResultAndComplianceResult(lawsTechnologyEvaluationResultEO,req); + return Result.OK(json); + } +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/entity/LawsTechnologyEvaluationComplianceResultEO.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/entity/LawsTechnologyEvaluationComplianceResultEO.java new file mode 100644 index 000000000..2b3e8c3ad --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/entity/LawsTechnologyEvaluationComplianceResultEO.java @@ -0,0 +1,83 @@ +package com.jero.modules.lawsTechnologyEvaluation.entity; + +import java.io.Serializable; +import java.util.List; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import org.jeecgframework.poi.excel.annotation.Excel; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + + +/** + * @Description: 法规技术评估-评估人反馈-符合性结果表 + * @Author: jero-boot + * @Date: 2022-07-11 + * @Version: V1.0 + */ +@Data +@TableName("laws_technology_evaluation_compliance_result") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="laws_technology_evaluation_compliance_result对象", description="法规技术评估-评估人反馈-符合性结果表") +public class LawsTechnologyEvaluationComplianceResultEO implements Serializable { + private static final long serialVersionUID = 1L; + + /**主键*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "主键") + private java.lang.String id; + @TableField(exist = false) + private java.lang.String ids; + + /**创建人*/ + @ApiModelProperty(value = "创建人") + private java.lang.String createBy; + + /**创建日期*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "创建日期") + private java.util.Date createTime; + + /**更新人*/ + @ApiModelProperty(value = "更新人") + private java.lang.String updateBy; + + /**更新日期*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "更新日期") + private java.util.Date updateTime; + + /**所属部门*/ + @ApiModelProperty(value = "所属部门") + private java.lang.String sysOrgCode; + + /**法规技术评估表id*/ + @Excel(name = "法规技术评估表id", width = 15) + @ApiModelProperty(value = "法规技术评估表id") + private java.lang.String lawsTechnologyEvaluationId; + + /**符合性结果*/ + @Excel(name = "符合性结果", width = 15) + @ApiModelProperty(value = "符合性结果") + private java.lang.String complianceResult; + @TableField(exist = false) + private java.lang.String complianceResultName; + + /**流程实例id*/ + @Excel(name = "流程实例id", width = 15) + @ApiModelProperty(value = "流程实例id") + private java.lang.String actiProcInstId; + + @TableField(exist = false) + private List lawsTechnologyEvaluationResultEOList; +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/entity/LawsTechnologyEvaluationEO.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/entity/LawsTechnologyEvaluationEO.java index bb3718991..37a7d210f 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/entity/LawsTechnologyEvaluationEO.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/entity/LawsTechnologyEvaluationEO.java @@ -6,6 +6,7 @@ import java.math.BigDecimal; import java.util.Date; import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; @@ -82,16 +83,22 @@ public class LawsTechnologyEvaluationEO implements Serializable { @Excel(name = "技术领域", width = 15) @ApiModelProperty(value = "技术领域") private String technologyTerritory; + @TableField(exist = false) + private String technologyTerritoryName; /**评估方式*/ @Excel(name = "评估方式", width = 15) @ApiModelProperty(value = "评估方式") private String evaluationMethods; + @TableField(exist = false) + private String evaluationMethodsName; /**流程状态*/ @Excel(name = "流程状态", width = 15) @ApiModelProperty(value = "流程状态") private String flowStatus; + @TableField(exist = false) + private String flowStatusName; /**发起日期*/ @Excel(name = "发起日期", width = 15, format = "yyyy-MM-dd") diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/entity/LawsTechnologyEvaluationFlowDetailEO.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/entity/LawsTechnologyEvaluationFlowDetailEO.java new file mode 100644 index 000000000..954586eaa --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/entity/LawsTechnologyEvaluationFlowDetailEO.java @@ -0,0 +1,93 @@ +package com.jero.modules.lawsTechnologyEvaluation.entity; + +import java.io.Serializable; +import java.io.UnsupportedEncodingException; +import java.math.BigDecimal; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import org.jeecgframework.poi.excel.annotation.Excel; +import com.jero.common.aspect.annotation.Dict; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; + + +/** + * @Description: 法规技术评估表-流程明细 + * @Author: jero-boot + * @Date: 2022-07-11 + * @Version: V1.0 + */ +@Data +@TableName("laws_technology_evaluation_flow_detail") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="laws_technology_evaluation_flow_detail对象", description="法规技术评估表-流程明细") +public class LawsTechnologyEvaluationFlowDetailEO implements Serializable { + private static final long serialVersionUID = 1L; + + /**主键*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "主键") + private java.lang.String id; + + /**创建人*/ + @ApiModelProperty(value = "创建人") + private java.lang.String createBy; + + /**创建日期*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "创建日期") + private java.util.Date createTime; + + /**更新人*/ + @ApiModelProperty(value = "更新人") + private java.lang.String updateBy; + + /**更新日期*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "更新日期") + private java.util.Date updateTime; + + /**所属部门*/ + @ApiModelProperty(value = "所属部门") + private java.lang.String sysOrgCode; + + /**法规技术评估表id*/ + @Excel(name = "法规技术评估表id", width = 15) + @ApiModelProperty(value = "法规技术评估表id") + private java.lang.String lawsTechnologyEvaluationId; + + /**流程实例id*/ + @Excel(name = "流程实例id", width = 15) + @ApiModelProperty(value = "流程实例id") + private java.lang.String actiProcInstId; + + /**流程编号*/ + @Excel(name = "流程编号", width = 15) + @ApiModelProperty(value = "流程编号") + private java.lang.String prcNum; + + /**流程名称*/ + @Excel(name = "流程名称", width = 15) + @ApiModelProperty(value = "流程名称") + private java.lang.String prcName; + + /**评估人id*/ + @Excel(name = "评估人id", width = 15) + @ApiModelProperty(value = "评估人id") + private java.lang.String evaluatorId; + + @TableField(exist = false) + private String evaluatorName; + +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/entity/LawsTechnologyEvaluationItemResultEO.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/entity/LawsTechnologyEvaluationItemResultEO.java new file mode 100644 index 000000000..c807864a6 --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/entity/LawsTechnologyEvaluationItemResultEO.java @@ -0,0 +1,139 @@ +package com.jero.modules.lawsTechnologyEvaluation.entity; + +import java.io.Serializable; +import java.io.UnsupportedEncodingException; +import java.math.BigDecimal; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import org.jeecgframework.poi.excel.annotation.Excel; +import com.jero.common.aspect.annotation.Dict; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; + + +/** + * @Description: 法规技术评估-条款信息评估结果表 + * @Author: jero-boot + * @Date: 2022-07-11 + * @Version: V1.0 + */ +@Data +@TableName("laws_technology_evaluation_item_result") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="laws_technology_evaluation_item_result对象", description="法规技术评估-条款信息评估结果表") +public class LawsTechnologyEvaluationItemResultEO implements Serializable { + private static final long serialVersionUID = 1L; + + /**主键*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "主键") + private java.lang.String id; + + /**创建人*/ + @ApiModelProperty(value = "创建人") + private java.lang.String createBy; + + /**创建日期*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "创建日期") + private java.util.Date createTime; + + /**更新人*/ + @ApiModelProperty(value = "更新人") + private java.lang.String updateBy; + + /**更新日期*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "更新日期") + private java.util.Date updateTime; + + /**所属部门*/ + @ApiModelProperty(value = "所属部门") + private java.lang.String sysOrgCode; + + /**条款id*/ + @Excel(name = "条款id", width = 15) + @ApiModelProperty(value = "条款id") + private java.lang.String itemId; + + /**条款号*/ + @Excel(name = "条款号", width = 15) + @ApiModelProperty(value = "条款号") + private java.lang.String itemNum; + + /**条款名称*/ + @Excel(name = "条款名称", width = 15) + @ApiModelProperty(value = "条款名称") + private java.lang.String itemName; + + /**条款内容*/ + @Excel(name = "条款内容", width = 15) + @ApiModelProperty(value = "条款内容") + private java.lang.String itemContent; + + /**评估方式*/ + @Excel(name = "评估方式", width = 15) + @ApiModelProperty(value = "评估方式") + private java.lang.String evaluationMethods; + @TableField(exist = false) + private java.lang.String evaluationMethodsName; + + /**技术文件名称*/ + @Excel(name = "技术文件名称", width = 15) + @ApiModelProperty(value = "技术文件名称") + private java.lang.String technicalFileName; + + /**章节*/ + @Excel(name = "章节", width = 15) + @ApiModelProperty(value = "章节") + private java.lang.String section; + + /**意见*/ + @Excel(name = "意见", width = 15) + @ApiModelProperty(value = "意见") + private java.lang.String opinion; + + /**附件*/ + @Excel(name = "附件", width = 15) + @ApiModelProperty(value = "附件") + private java.lang.String accessoryFile; + @TableField(exist = false) + private java.lang.String accessoryFileName; + + /**符合性结果*/ + @Excel(name = "符合性结果", width = 15) + @ApiModelProperty(value = "符合性结果") + private java.lang.String complianceResult; + @TableField(exist = false) + private java.lang.String complianceResultName; + + /**评估人id*/ + @Excel(name = "评估人id", width = 15) + @ApiModelProperty(value = "评估人id") + private java.lang.String evaluatorId; + + /**流程实例id*/ + @Excel(name = "流程实例id", width = 15) + @ApiModelProperty(value = "流程实例id") + private java.lang.String actiProcInstId; + + /**发起人反馈*/ + @Excel(name = "发起人反馈", width = 15) + @ApiModelProperty(value = "发起人反馈") + private java.lang.String sponsorFeedback; + + /**法规技术评估表id*/ + @ApiModelProperty(value = "法规技术评估表id") + private java.lang.String lawsTechnologyEvaluationId; +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/entity/LawsTechnologyEvaluationResultEO.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/entity/LawsTechnologyEvaluationResultEO.java new file mode 100644 index 000000000..af4611933 --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/entity/LawsTechnologyEvaluationResultEO.java @@ -0,0 +1,102 @@ +package com.jero.modules.lawsTechnologyEvaluation.entity; + +import java.io.Serializable; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import org.jeecgframework.poi.excel.annotation.Excel; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +/** + * @Description: 法规技术评估-评估结果表 + * @Author: jero-boot + * @Date: 2022-07-11 + * @Version: V1.0 + */ +@Data +@TableName("laws_technology_evaluation_result") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="laws_technology_evaluation_result对象", description="法规技术评估-评估结果表") +public class LawsTechnologyEvaluationResultEO implements Serializable { + private static final long serialVersionUID = 1L; + + /**主键*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "主键") + private java.lang.String id; + + /**创建人*/ + @ApiModelProperty(value = "创建人") + private java.lang.String createBy; + + /**创建日期*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "创建日期") + private java.util.Date createTime; + + /**更新人*/ + @ApiModelProperty(value = "更新人") + private java.lang.String updateBy; + + /**更新日期*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "更新日期") + private java.util.Date updateTime; + + /**所属部门*/ + @ApiModelProperty(value = "所属部门") + private java.lang.String sysOrgCode; + + /**法规技术评估表id*/ + @Excel(name = "法规技术评估表id", width = 15) + @ApiModelProperty(value = "法规技术评估表id") + private java.lang.String lawsTechnologyEvaluationId; + + /**相关章节*/ + @Excel(name = "相关章节", width = 15) + @ApiModelProperty(value = "相关章节") + private java.lang.String relatedSection; + + /**问题/建议*/ + @Excel(name = "问题/建议", width = 15) + @ApiModelProperty(value = "问题/建议") + private java.lang.String issueOrSuggest; + + /**理由*/ + @Excel(name = "理由", width = 15) + @ApiModelProperty(value = "理由") + private java.lang.String reason; + + /**附件*/ + @Excel(name = "附件", width = 15) + @ApiModelProperty(value = "附件") + private java.lang.String accessoryFile; + @TableField(exist = false) + private java.lang.String accessoryFileName; + + /**提出时间*/ + @Excel(name = "提出时间", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "提出时间") + private java.util.Date submitTime; + + /**流程实例id*/ + @Excel(name = "流程实例id", width = 15) + @ApiModelProperty(value = "流程实例id") + private java.lang.String actiProcInstId; + + @ApiModelProperty(value = "符合性结果id") + private java.lang.String complianceResultId; + +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/enums/ComplianceResultEnum.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/enums/ComplianceResultEnum.java new file mode 100644 index 000000000..04942f12b --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/enums/ComplianceResultEnum.java @@ -0,0 +1,61 @@ +package com.jero.modules.lawsTechnologyEvaluation.enums; + +import com.alibaba.druid.util.StringUtils; +import com.jero.common.constant.enums.CutEnum; + +/** + * 符合性结果枚举类 + */ +public enum ComplianceResultEnum { + CONFORMITY("符合","Compliance","Compliance"), + INCONFORMITY("不符合","Non-Compliance","Non-Compliance"), + ; + + String name; + String enName; + String value; + + private ComplianceResultEnum(String name,String enName, String value) { + this.name = name; + this.enName = enName; + this.value = value; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + public String getEnName() { + return enName; + } + + public void setEnName(String enName) { + this.enName = enName; + } + + public static String getTextByValue(String value, String cut) { + ComplianceResultEnum[] values = values(); + for (ComplianceResultEnum complianceResultEnum : values) { + if (complianceResultEnum.value.equals(value)) { + if(StringUtils.equals(cut, CutEnum.CN.getValue())){ + return complianceResultEnum.name; + }else { + return complianceResultEnum.enName; + } + } + } + return null; + } +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/enums/EvaluationTypeEnum.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/enums/EvaluationTypeEnum.java new file mode 100644 index 000000000..06d9043c6 --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/enums/EvaluationTypeEnum.java @@ -0,0 +1,51 @@ +package com.jero.modules.lawsTechnologyEvaluation.enums; + +import com.alibaba.druid.util.StringUtils; +import com.jero.common.constant.enums.CutEnum; + +/** + * 评估类型枚举类 + */ +public enum EvaluationTypeEnum { + FEED_BACK("反馈评估","Feedback evaluation"), + ITEM("条款评估","Item evaluation"), + ; + + String name; + String value; + + private EvaluationTypeEnum(String name, String value) { + this.name = name; + this.value = value; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + public static String getTextByValue(String value,String cut) { + EvaluationTypeEnum[] values = values(); + for (EvaluationTypeEnum certificationProgressEnum : values) { + if (certificationProgressEnum.value.equals(value)) { + if(StringUtils.equals(cut, CutEnum.CN.getValue())){ + return certificationProgressEnum.name; + }else { + return certificationProgressEnum.value; + } + } + } + return null; + } +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/enums/LawsTechnologyEvaluationNodeEnum.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/enums/LawsTechnologyEvaluationNodeEnum.java new file mode 100644 index 000000000..3cc205f1c --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/enums/LawsTechnologyEvaluationNodeEnum.java @@ -0,0 +1,63 @@ +package com.jero.modules.lawsTechnologyEvaluation.enums; + +import com.alibaba.druid.util.StringUtils; +import com.jero.common.constant.enums.CutEnum; + +/** + * 法规技术评估 节点枚举类 + */ +public enum LawsTechnologyEvaluationNodeEnum { + + ENGINEER_INITIATED("fggcsfq","法规工程师发起","Engineer initiated"), + APPRAISERS_EVALUATION("pgrqr","评估人评估","Appraiser's evaluation"), + SPONSOR_REVIEW("fqrsc","发起人审查","Sponsor review"), + ; + + String key; + String cnName; + String enName; + + private LawsTechnologyEvaluationNodeEnum(String key, String cnName, String enName) { + this.key = key; + this.cnName = cnName; + this.enName = enName; + } + + public String getKey() { + return key; + } + + public void setKey(String key) { + this.key = key; + } + + public String getCnName() { + return cnName; + } + + public void setCnName(String cnName) { + this.cnName = cnName; + } + + public String getEnName() { + return enName; + } + + public void setEnName(String enName) { + this.enName = enName; + } + + public static String getTextByValue(String key,String cut) { + LawsTechnologyEvaluationNodeEnum[] values = values(); + for (LawsTechnologyEvaluationNodeEnum lawsOpinionGatherNodeEnum : values) { + if (lawsOpinionGatherNodeEnum.key.equals(key)) { + if(StringUtils.equals(cut, CutEnum.CN.getValue())){ + return lawsOpinionGatherNodeEnum.cnName; + }else if(StringUtils.equals(cut,CutEnum.EN.getValue())){ + return lawsOpinionGatherNodeEnum.enName; + } + } + } + return null; + } +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/job/LawsTechnologyEvaluationJob.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/job/LawsTechnologyEvaluationJob.java new file mode 100644 index 000000000..63f308573 --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/job/LawsTechnologyEvaluationJob.java @@ -0,0 +1,80 @@ +package com.jero.modules.lawsTechnologyEvaluation.job; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.jero.common.api.vo.Result; +import com.jero.modules.lawsOpinionGather.enums.GatherResultEnum; +import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationEO; +import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationFlowDetailEO; +import com.jero.modules.lawsTechnologyEvaluation.service.ILawsTechnologyEvaluationEOService; +import com.jero.modules.lawsTechnologyEvaluation.service.ILawsTechnologyEvaluationFlowDetailEOService; +import com.jero.modules.wkflow.feginClient.WorkFlowFeignClient; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.CollectionUtils; +import org.jeecg.modules.jmreport.common.constant.CommonConstant; +import org.quartz.Job; +import org.quartz.JobExecutionContext; +import org.quartz.JobExecutionException; +import org.springframework.beans.factory.annotation.Autowired; + +import java.util.Date; +import java.util.List; +import java.util.stream.Collectors; + +/** + * 法规技术评估 - 定时器 + * 作用:当前日期大于等于截止日志的时候,把该数据的流程状态,更新为已完成,同时把当前这条数据的所有待办任务提交 + */ +@Slf4j +public class LawsTechnologyEvaluationJob implements Job { + + @Autowired + private ILawsTechnologyEvaluationEOService lawsTechnologyEvaluationEOService; + @Autowired + private ILawsTechnologyEvaluationFlowDetailEOService lawsTechnologyEvaluationFlowDetailEOService; + @Autowired + private WorkFlowFeignClient workFlowFeignClient; + + @Override + public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException { + log.info("法规技术评估流程,定时任务开启 ====================================================="); + + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().eq(LawsTechnologyEvaluationEO::getFlowStatus, GatherResultEnum.UNDERWAY.getValue()); + List lawsTechnologyEvaluationEOList = this.lawsTechnologyEvaluationEOService.list(queryWrapper); + + if (CollectionUtils.isNotEmpty(lawsTechnologyEvaluationEOList)) { + Date currentDate = new Date(); + //过滤截止日期小于当前日期的法规技术评估数据 + List updateLawsTechnologyEvaluationEOList = lawsTechnologyEvaluationEOList.stream().filter(e -> { + boolean flag = false; + if(currentDate.after(e.getEndTime())){ + flag = true; + } + return flag; + }).collect(Collectors.toList()); + + if(CollectionUtils.isNotEmpty(updateLawsTechnologyEvaluationEOList)){ + List lawsTechnologyEvaluationIdList = updateLawsTechnologyEvaluationEOList.stream().map(LawsTechnologyEvaluationEO::getId).distinct().collect(Collectors.toList()); + + //获取这些法规技术评估数据的下级流程明细数据。 + QueryWrapper flowDetailEOQueryWrapper = new QueryWrapper<>(); + flowDetailEOQueryWrapper.lambda().in(LawsTechnologyEvaluationFlowDetailEO::getLawsTechnologyEvaluationId,lawsTechnologyEvaluationIdList); + List lawsTechnologyEvaluationFlowDetailEOList = lawsTechnologyEvaluationFlowDetailEOService.list(flowDetailEOQueryWrapper); + + if(CollectionUtils.isNotEmpty(lawsTechnologyEvaluationFlowDetailEOList)){ + String actiProcInstIds = lawsTechnologyEvaluationFlowDetailEOList.stream().map(LawsTechnologyEvaluationFlowDetailEO::getActiProcInstId).distinct().collect(Collectors.joining(",")); + Result result = this.workFlowFeignClient.completeLawsTechnologyEvaluationTaskByPids(actiProcInstIds); + if(result.getCode().equals(CommonConstant.SC_OK_200)){ + updateLawsTechnologyEvaluationEOList.forEach(lawsTechnologyEvaluationEO -> { + lawsTechnologyEvaluationEO.setFlowStatus(GatherResultEnum.COMPLETED.getValue()); + }); + this.lawsTechnologyEvaluationEOService.updateBatchById(updateLawsTechnologyEvaluationEOList); + } + } + + } + } + + log.info("法规技术评估流程,定时任务结束 ====================================================="); + } +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/mapper/LawsTechnologyEvaluationComplianceResultEOMapper.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/mapper/LawsTechnologyEvaluationComplianceResultEOMapper.java new file mode 100644 index 000000000..4306057ae --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/mapper/LawsTechnologyEvaluationComplianceResultEOMapper.java @@ -0,0 +1,17 @@ +package com.jero.modules.lawsTechnologyEvaluation.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationComplianceResultEO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 法规技术评估-评估人反馈-符合性结果表 + * @Author: jero-boot + * @Date: 2022-07-11 + * @Version: V1.0 + */ +public interface LawsTechnologyEvaluationComplianceResultEOMapper extends BaseMapper { + +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/mapper/LawsTechnologyEvaluationFlowDetailEOMapper.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/mapper/LawsTechnologyEvaluationFlowDetailEOMapper.java new file mode 100644 index 000000000..da6be153c --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/mapper/LawsTechnologyEvaluationFlowDetailEOMapper.java @@ -0,0 +1,17 @@ +package com.jero.modules.lawsTechnologyEvaluation.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationFlowDetailEO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 法规技术评估表-流程明细 + * @Author: jero-boot + * @Date: 2022-07-11 + * @Version: V1.0 + */ +public interface LawsTechnologyEvaluationFlowDetailEOMapper extends BaseMapper { + +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/mapper/LawsTechnologyEvaluationItemResultEOMapper.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/mapper/LawsTechnologyEvaluationItemResultEOMapper.java new file mode 100644 index 000000000..9e46327ff --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/mapper/LawsTechnologyEvaluationItemResultEOMapper.java @@ -0,0 +1,17 @@ +package com.jero.modules.lawsTechnologyEvaluation.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationItemResultEO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 法规技术评估-条款信息评估结果表 + * @Author: jero-boot + * @Date: 2022-07-11 + * @Version: V1.0 + */ +public interface LawsTechnologyEvaluationItemResultEOMapper extends BaseMapper { + +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/mapper/LawsTechnologyEvaluationResultEOMapper.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/mapper/LawsTechnologyEvaluationResultEOMapper.java new file mode 100644 index 000000000..871666f41 --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/mapper/LawsTechnologyEvaluationResultEOMapper.java @@ -0,0 +1,17 @@ +package com.jero.modules.lawsTechnologyEvaluation.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationResultEO; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 法规技术评估-评估结果表 + * @Author: jero-boot + * @Date: 2022-07-11 + * @Version: V1.0 + */ +public interface LawsTechnologyEvaluationResultEOMapper extends BaseMapper { + +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/mapper/xml/LawsTechnologyEvaluationComplianceResultEOMapper.xml b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/mapper/xml/LawsTechnologyEvaluationComplianceResultEOMapper.xml new file mode 100644 index 000000000..bb7b021b5 --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/mapper/xml/LawsTechnologyEvaluationComplianceResultEOMapper.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/mapper/xml/LawsTechnologyEvaluationFlowDetailEOMapper.xml b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/mapper/xml/LawsTechnologyEvaluationFlowDetailEOMapper.xml new file mode 100644 index 000000000..72cc2a9f6 --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/mapper/xml/LawsTechnologyEvaluationFlowDetailEOMapper.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/mapper/xml/LawsTechnologyEvaluationItemResultEOMapper.xml b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/mapper/xml/LawsTechnologyEvaluationItemResultEOMapper.xml new file mode 100644 index 000000000..36a1ce561 --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/mapper/xml/LawsTechnologyEvaluationItemResultEOMapper.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/mapper/xml/LawsTechnologyEvaluationResultEOMapper.xml b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/mapper/xml/LawsTechnologyEvaluationResultEOMapper.xml new file mode 100644 index 000000000..f25dba1c3 --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/mapper/xml/LawsTechnologyEvaluationResultEOMapper.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/ILawsTechnologyEvaluationComplianceResultEOService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/ILawsTechnologyEvaluationComplianceResultEOService.java new file mode 100644 index 000000000..6d3895958 --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/ILawsTechnologyEvaluationComplianceResultEOService.java @@ -0,0 +1,72 @@ +package com.jero.modules.lawsTechnologyEvaluation.service; + +import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationComplianceResultEO; +import com.baomidou.mybatisplus.extension.service.IService; +import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationResultEO; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + +/** + * @Description: 法规技术评估-评估人反馈-符合性结果表 + * @Author: jero-boot + * @Date: 2022-07-11 + * @Version: V1.0 + */ +public interface ILawsTechnologyEvaluationComplianceResultEOService extends IService { + + /** + * 保存 + * + * @param lawsTechnologyEvaluationComplianceResultEO + * @return + */ + void add(LawsTechnologyEvaluationComplianceResultEO lawsTechnologyEvaluationComplianceResultEO); + + /** + * 更新 + * + * @param lawsTechnologyEvaluationComplianceResultEO + * @return + */ + void editById(LawsTechnologyEvaluationComplianceResultEO lawsTechnologyEvaluationComplianceResultEO); + + /** + * 通过id删除 + * + * @param id + * @return + */ + void deleteById(String id); + + /** + * 批量删除 + * + * @param ids + * @return + */ + void deleteByIds(List ids); + + /** + * 通过id查询 + * + * @param id + * @return + */ + LawsTechnologyEvaluationComplianceResultEO queryById(String id); + + /** + * 列表查询 + * + * @return + */ + List queryList(LawsTechnologyEvaluationComplianceResultEO lawsTechnologyEvaluationComplianceResultEO, + HttpServletRequest req, + String cut); + + void exportZip(HttpServletResponse response, HttpServletRequest request, + LawsTechnologyEvaluationComplianceResultEO lawsTechnologyEvaluationComplianceResultEO, + Map params); +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/ILawsTechnologyEvaluationEOService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/ILawsTechnologyEvaluationEOService.java index 65a302e4c..5c4cd6ce8 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/ILawsTechnologyEvaluationEOService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/ILawsTechnologyEvaluationEOService.java @@ -1,8 +1,16 @@ package com.jero.modules.lawsTechnologyEvaluation.service; +import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.jero.common.api.vo.Result; import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationEO; import com.baomidou.mybatisplus.extension.service.IService; +import org.springframework.web.multipart.MultipartFile; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; import java.util.List; +import java.util.Map; /** * @Description: 法规技术评估 @@ -58,4 +66,24 @@ public interface ILawsTechnologyEvaluationEOService extends IService queryList(); + + /** + * 流程调用 + * @param jsonObject + * @return + */ + Result processCall(JSONObject jsonObject); + + /** + * 处理数据 + * @param records + * @param cut + */ + void disposeData(List records, String cut); + + IPage getPageDummy(Map parameter); + + void exportItemTemplate(String cut, HttpServletResponse response, HttpServletRequest request); + + List> importItemExcel(MultipartFile file, String cut, HttpServletRequest request)throws Exception; } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/ILawsTechnologyEvaluationFlowDetailEOService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/ILawsTechnologyEvaluationFlowDetailEOService.java new file mode 100644 index 000000000..f190d574d --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/ILawsTechnologyEvaluationFlowDetailEOService.java @@ -0,0 +1,77 @@ +package com.jero.modules.lawsTechnologyEvaluation.service; + +import com.alibaba.fastjson.JSONObject; +import com.jero.common.api.vo.Result; +import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationFlowDetailEO; +import com.baomidou.mybatisplus.extension.service.IService; +import java.util.List; + +/** + * @Description: 法规技术评估表-流程明细 + * @Author: jero-boot + * @Date: 2022-07-11 + * @Version: V1.0 + */ +public interface ILawsTechnologyEvaluationFlowDetailEOService extends IService { + + /** + * 保存 + * + * @param lawsTechnologyEvaluationFlowDetailEO + * @return + */ + void add(LawsTechnologyEvaluationFlowDetailEO lawsTechnologyEvaluationFlowDetailEO); + + /** + * 更新 + * + * @param lawsTechnologyEvaluationFlowDetailEO + * @return + */ + void editById(LawsTechnologyEvaluationFlowDetailEO lawsTechnologyEvaluationFlowDetailEO); + + /** + * 通过id删除 + * + * @param id + * @return + */ + void deleteById(String id); + + /** + * 批量删除 + * + * @param ids + * @return + */ + void deleteByIds(List ids); + + /** + * 通过id查询 + * + * @param id + * @return + */ + LawsTechnologyEvaluationFlowDetailEO queryById(String id); + + /** + * 列表查询 + * + * @return + */ + List queryList(); + + /** + * 流程调用 + * @param jsonObject + * @return + */ + Result processCall(JSONObject jsonObject); + + /** + * 处理数据 + * @param datas + * @param cut + */ + void disposeData(List datas, String cut); +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/ILawsTechnologyEvaluationItemResultEOService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/ILawsTechnologyEvaluationItemResultEOService.java new file mode 100644 index 000000000..7dcfb9104 --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/ILawsTechnologyEvaluationItemResultEOService.java @@ -0,0 +1,88 @@ +package com.jero.modules.lawsTechnologyEvaluation.service; + +import com.alibaba.fastjson.JSONObject; +import com.jero.common.api.vo.Result; +import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationItemResultEO; +import com.baomidou.mybatisplus.extension.service.IService; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + +/** + * @Description: 法规技术评估-条款信息评估结果表 + * @Author: jero-boot + * @Date: 2022-07-11 + * @Version: V1.0 + */ +public interface ILawsTechnologyEvaluationItemResultEOService extends IService { + + /** + * 保存 + * + * @param lawsTechnologyEvaluationItemResultEO + * @return + */ + void add(LawsTechnologyEvaluationItemResultEO lawsTechnologyEvaluationItemResultEO); + + /** + * 更新 + * + * @param lawsTechnologyEvaluationItemResultEO + * @return + */ + void editById(LawsTechnologyEvaluationItemResultEO lawsTechnologyEvaluationItemResultEO); + + /** + * 通过id删除 + * + * @param id + * @return + */ + void deleteById(String id); + + /** + * 批量删除 + * + * @param ids + * @return + */ + void deleteByIds(List ids); + + /** + * 通过id查询 + * + * @param id + * @return + */ + LawsTechnologyEvaluationItemResultEO queryById(String id); + + /** + * 列表查询 + * + * @return + */ + List queryList(LawsTechnologyEvaluationItemResultEO lawsTechnologyEvaluationItemResultEO, + HttpServletRequest req, + String cut); + + /** + * 流程调用 + * @param jsonObject + * @return + */ + Result processCall(JSONObject jsonObject); + + /** + * 批量更新 + * @param jsonObject + */ + void batchUpdate(JSONObject jsonObject); + + void disposeData(List datas, String cut); + + void exportZip(HttpServletResponse response, HttpServletRequest request, LawsTechnologyEvaluationItemResultEO lawsTechnologyEvaluationItemResultEO, Map params); + + +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/ILawsTechnologyEvaluationResultEOService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/ILawsTechnologyEvaluationResultEOService.java new file mode 100644 index 000000000..d7d1d0f89 --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/ILawsTechnologyEvaluationResultEOService.java @@ -0,0 +1,81 @@ +package com.jero.modules.lawsTechnologyEvaluation.service; + +import com.alibaba.fastjson.JSONObject; +import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationResultEO; +import com.baomidou.mybatisplus.extension.service.IService; + +import javax.servlet.http.HttpServletRequest; +import java.util.List; + +/** + * @Description: 法规技术评估-评估结果表 + * @Author: jero-boot + * @Date: 2022-07-11 + * @Version: V1.0 + */ +public interface ILawsTechnologyEvaluationResultEOService extends IService { + + /** + * 保存 + * + * @param lawsTechnologyEvaluationResultEO + * @return + */ + void add(LawsTechnologyEvaluationResultEO lawsTechnologyEvaluationResultEO); + + /** + * 更新 + * + * @param lawsTechnologyEvaluationResultEO + * @return + */ + void editById(LawsTechnologyEvaluationResultEO lawsTechnologyEvaluationResultEO); + + /** + * 通过id删除 + * + * @param id + * @return + */ + void deleteById(String id); + + /** + * 批量删除 + * + * @param ids + * @return + */ + void deleteByIds(List ids); + + /** + * 通过id查询 + * + * @param id + * @return + */ + LawsTechnologyEvaluationResultEO queryById(String id); + + /** + * 列表查询 + * + * @return + */ + List queryList(LawsTechnologyEvaluationResultEO lawsTechnologyEvaluationResultEO, + HttpServletRequest req); + + /** + * 评估人保存/提交 + * @param json + */ + void evaluatorSaveResult(JSONObject json); + + /** + * 根据流程实例id、法规技术评估id 查询评估结果与符合性结果接口 + * @param lawsTechnologyEvaluationResultEO + * @param req + * @return + */ + JSONObject queryEvaluationResultAndComplianceResult(LawsTechnologyEvaluationResultEO lawsTechnologyEvaluationResultEO, HttpServletRequest req); + + void disposeData(List datas, String cut); +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/impl/LawsTechnologyEvaluationComplianceResultEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/impl/LawsTechnologyEvaluationComplianceResultEOServiceImpl.java new file mode 100644 index 000000000..59b68e181 --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/impl/LawsTechnologyEvaluationComplianceResultEOServiceImpl.java @@ -0,0 +1,329 @@ +package com.jero.modules.lawsTechnologyEvaluation.service.impl; + +import cn.hutool.core.util.ZipUtil; +import com.alibaba.druid.util.StringUtils; +import com.aliyuncs.utils.IOUtils; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.jero.common.constant.enums.CutEnum; +import com.jero.common.exception.JeroBootException; +import com.jero.common.system.query.QueryGenerator; +import com.jero.common.system.vo.LoginUser; +import com.jero.common.util.FileUtils; +import com.jero.common.util.oss.CosBootUtil; +import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationComplianceResultEO; +import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationItemResultEO; +import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationResultEO; +import com.jero.modules.lawsTechnologyEvaluation.enums.ComplianceResultEnum; +import com.jero.modules.lawsTechnologyEvaluation.mapper.LawsTechnologyEvaluationComplianceResultEOMapper; +import com.jero.modules.lawsTechnologyEvaluation.service.ILawsTechnologyEvaluationComplianceResultEOService; +import com.jero.modules.lawsTechnologyEvaluation.service.ILawsTechnologyEvaluationResultEOService; +import com.jero.modules.oss.entity.OSSFile; +import com.jero.modules.oss.service.IOSSFileService; +import com.jero.modules.system.util.PDFUtils; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.poi.hssf.usermodel.HSSFSheet; +import org.apache.poi.hssf.usermodel.HSSFWorkbook; +import org.apache.poi.ss.usermodel.*; +import org.apache.shiro.SecurityUtils; +import org.aspectj.util.FileUtil; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Service; + +import java.io.*; +import java.text.SimpleDateFormat; +import java.util.Arrays; +import java.util.List; +import java.util.Date; +import java.util.Map; +import java.util.stream.Collectors; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +/** + * @Description: 法规技术评估-评估人反馈-符合性结果表 + * @Author: jero-boot + * @Date: 2022-07-11 + * @Version: V1.0 + */ +@Service +@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class) +public class LawsTechnologyEvaluationComplianceResultEOServiceImpl extends ServiceImpl implements ILawsTechnologyEvaluationComplianceResultEOService { + @Value(value = "${jero.path.upload}") + private String uploadpath; + @Autowired + private ILawsTechnologyEvaluationResultEOService evaluationResultEOService; + @Autowired + private IOSSFileService iOSSFileService; + + /** + * 保存 + * + * @param lawsTechnologyEvaluationComplianceResultEO + * @return + */ + @Override + public void add(LawsTechnologyEvaluationComplianceResultEO lawsTechnologyEvaluationComplianceResultEO) { + Date now = new Date(); + lawsTechnologyEvaluationComplianceResultEO.setCreateTime(now); + lawsTechnologyEvaluationComplianceResultEO.setUpdateTime(now); + save(lawsTechnologyEvaluationComplianceResultEO); + } + + /** + * 更新 + * + * @param lawsTechnologyEvaluationComplianceResultEO + * @return + */ + @Override + public void editById(LawsTechnologyEvaluationComplianceResultEO lawsTechnologyEvaluationComplianceResultEO) { + Date now = new Date(); + lawsTechnologyEvaluationComplianceResultEO.setUpdateTime(now); + saveOrUpdate(lawsTechnologyEvaluationComplianceResultEO); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @Override + public void deleteById(String id) { + removeById(id); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @Override + public void deleteByIds(List ids) { + removeByIds(ids); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + @Override + public LawsTechnologyEvaluationComplianceResultEO queryById(String id) { + return getById(id); + } + + /** + * 列表查询 + * + * @return + */ + @Override + public List queryList(LawsTechnologyEvaluationComplianceResultEO lawsTechnologyEvaluationComplianceResultEO, + HttpServletRequest req, + String cut) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(lawsTechnologyEvaluationComplianceResultEO, req.getParameterMap()); + if(org.apache.commons.lang3.StringUtils.isNotEmpty(lawsTechnologyEvaluationComplianceResultEO.getIds())){ + queryWrapper.lambda().in(LawsTechnologyEvaluationComplianceResultEO::getId,lawsTechnologyEvaluationComplianceResultEO.getIds().split(",")); + } + List complianceResultEOList = this.baseMapper.selectList(queryWrapper); + + if(CollectionUtils.isNotEmpty(complianceResultEOList)){ + this.disposeData(complianceResultEOList,cut); + List complianceResultIdList = complianceResultEOList.stream().map(LawsTechnologyEvaluationComplianceResultEO::getId).distinct().collect(Collectors.toList()); + QueryWrapper evaluationResultEOQueryWrapper = new QueryWrapper<>(); + evaluationResultEOQueryWrapper.lambda().in(LawsTechnologyEvaluationResultEO::getComplianceResultId,complianceResultIdList); + List evaluationResultEOList = this.evaluationResultEOService.list(evaluationResultEOQueryWrapper); + this.evaluationResultEOService.disposeData(evaluationResultEOList,cut); + + if(CollectionUtils.isNotEmpty(evaluationResultEOList)){ + for (LawsTechnologyEvaluationComplianceResultEO complianceResultEO : complianceResultEOList) { + List lawsTechnologyEvaluationResultEOList = evaluationResultEOList.stream().filter(evaluationResultEO ->{ + boolean flag = false; + if(StringUtils.equals(complianceResultEO.getId(),evaluationResultEO.getComplianceResultId())){ + flag = true; + } + return flag; + }).collect(Collectors.toList()); + + complianceResultEO.setLawsTechnologyEvaluationResultEOList(lawsTechnologyEvaluationResultEOList); + } + } + + } + return complianceResultEOList; + } + + + @Override + public void exportZip(HttpServletResponse response, HttpServletRequest request, + LawsTechnologyEvaluationComplianceResultEO lawsTechnologyEvaluationComplianceResultEO, + Map params) { + String ids = (String)params.get("ids"); + String cut = (String)params.get("cut"); + + if(!StringUtils.isEmpty(ids)){ + lawsTechnologyEvaluationComplianceResultEO.setIds(ids); + } + List exportData = this.queryList(lawsTechnologyEvaluationComplianceResultEO, request, cut); + this.disposeData(exportData,cut); + + String title = ""; + String bottomTitle = ""; + String fileName = ""; + String sheetName = ""; + if(org.apache.commons.lang3.StringUtils.equals(cut, CutEnum.CN.getValue())){ + title = "相关章节,问题说明,附件"; + bottomTitle = "符合性结果:"; + fileName = "评估结果 " + ".xlsx"; + sheetName = "反馈结果"; + }else if(org.apache.commons.lang3.StringUtils.equals(cut,CutEnum.EN.getValue())){ + title = "Related section,Problem description,Accessory"; + bottomTitle = "Compliance results:"; + fileName = "Evaluation results " + ".xlsx"; + sheetName = "Feedback result"; + } + + OutputStream os = null; + HSSFWorkbook workbook = new HSSFWorkbook(); + + String path = uploadpath + "/tempZip/itemEvaluationResults/" + System.currentTimeMillis(); + + try { + response.setHeader("Content-Disposition", + "attachment; filename=" + fileName); + response.setContentType("application/force-download"); + + //设置导出数据 + if(CollectionUtils.isNotEmpty(exportData)) { + //创建表头 + String[] titleArr = title.split(","); + + for (int i = 0; i < exportData.size(); i++){ + //使用评估人的名字命名sheet页 + HSSFSheet sheet = workbook.createSheet(exportData.get(i).getCreateBy() + " " + sheetName); + + CellStyle titleCellStyle = workbook.createCellStyle(); + titleCellStyle.setAlignment(HorizontalAlignment.CENTER);//垂直居中 + titleCellStyle.setVerticalAlignment(VerticalAlignment.CENTER);//水平居中 + titleCellStyle.setWrapText(true);//自动换行 + + Row firstRow = sheet.createRow(0); + for (int j=0; j<3; j++){ + sheet.setColumnWidth(j,10000); + Cell cell = firstRow.createCell(j); + cell.setCellStyle(titleCellStyle); + cell.setCellValue(titleArr[j]); + } + + //获取这个评估人填写的评估结果 + List lawsTechnologyEvaluationResultEOList = exportData.get(i).getLawsTechnologyEvaluationResultEOList(); + int evaluationResultListSize = lawsTechnologyEvaluationResultEOList.size(); + if(CollectionUtils.isNotEmpty(lawsTechnologyEvaluationResultEOList)){ + for (int dataIndex = 0; dataIndex < lawsTechnologyEvaluationResultEOList.size(); dataIndex++) { + Row dataRow = sheet.createRow(dataIndex + 1); + dataRow.createCell(0).setCellValue(lawsTechnologyEvaluationResultEOList.get(dataIndex).getRelatedSection()); + dataRow.createCell(1).setCellValue(lawsTechnologyEvaluationResultEOList.get(dataIndex).getIssueOrSuggest()); + dataRow.createCell(2).setCellValue(lawsTechnologyEvaluationResultEOList.get(dataIndex).getAccessoryFileName()); + } + } + + //把符合性结果设置进excel表格中。 + Row bottomRow = sheet.createRow(evaluationResultListSize + 1); + Cell bottomRowFirstCell = bottomRow.createCell(0); + bottomRowFirstCell.setCellStyle(titleCellStyle); + bottomRowFirstCell.setCellValue(bottomTitle + " " + exportData.get(i).getComplianceResultName()); + } + } + + File fileTemp = new File(path); + if (fileTemp.exists()) { + fileTemp.delete(); + } + fileTemp.mkdirs(); + //excel + OutputStream excelOS = new FileOutputStream(path + File.separator + fileName); + workbook.write(excelOS); + excelOS.flush(); + + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); + LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + + for (LawsTechnologyEvaluationComplianceResultEO data : exportData) { + List evaluationResultEOList = data.getLawsTechnologyEvaluationResultEOList(); + if(CollectionUtils.isNotEmpty(evaluationResultEOList)){ + for (LawsTechnologyEvaluationResultEO lawsTechnologyEvaluationResultEO : evaluationResultEOList) { + String accessoryFile = lawsTechnologyEvaluationResultEO.getAccessoryFile(); + + List fileInfosList = iOSSFileService.getFileInfos(accessoryFile); + if (fileInfosList.size() != 0) { + for (OSSFile ossFile : fileInfosList) { + String url = ossFile.getUrl(); + //判断文件是否存在 + if(org.apache.commons.lang3.StringUtils.isNotBlank(url)){ + //判断文件是否存在 + boolean b = CosBootUtil.doesObjectExist(url); + if(b){ + InputStream download = CosBootUtil.download(url); + if(url.endsWith(".pdf") || url.endsWith(".PDF")){ + String currentTime = sdf.format(new Date()); + String waterContent = loginUser.getUsername() + " " + currentTime; + File newFile = PDFUtils.PDFWatermark(download,uploadpath,ossFile.getFileName(),waterContent); + download = new FileInputStream(newFile.getPath()); + } + //复制文件 + FileUtils.copyFile(download, path + File.separator + ossFile.getFileName()); + } + } + } + } + } + } + } + ZipUtil.zip(path, path + ".zip"); + //文件 + FileInputStream fis = new FileInputStream(path + ".zip"); + os = response.getOutputStream(); + + int len = 0; + while ((len = fis.read()) != -1) { + os.write(len); + } + os.flush(); + fis.close(); + excelOS.close(); + + }catch (IOException ex){ + if(CutEnum.CN.getValue().equals(cut)){ + throw new JeroBootException("下载文件失败"); + }else{ + throw new JeroBootException("Failed to download file"); + } + }finally { + IOUtils.closeQuietly(os); + File file = new File(path); + FileUtil.deleteContents(file); + File fileTemp = new File(path + ".zip"); + FileUtil.deleteContents(fileTemp); + } + } + + public void disposeData(List datas,String cut){ + if(CollectionUtils.isNotEmpty(datas)){ + for (LawsTechnologyEvaluationComplianceResultEO data : datas) { + if(!StringUtils.isEmpty(data.getComplianceResult())){ + data.setComplianceResultName(ComplianceResultEnum.getTextByValue(data.getComplianceResult(),cut)); + } + } + } + + } +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/impl/LawsTechnologyEvaluationEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/impl/LawsTechnologyEvaluationEOServiceImpl.java index 5d7100f1d..333d1ad29 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/impl/LawsTechnologyEvaluationEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/impl/LawsTechnologyEvaluationEOServiceImpl.java @@ -1,12 +1,55 @@ package com.jero.modules.lawsTechnologyEvaluation.service.impl; +import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.jero.common.api.vo.Result; +import com.jero.common.constant.enums.CutEnum; +import com.jero.common.constant.enums.ModuleEnum; +import com.jero.common.exception.JeroBootException; +import com.jero.generater.modules.online.cgform.entity.OnlCgformField; +import com.jero.generater.modules.online.cgform.service.impl.OnlCgformFieldServiceImpl; +import com.jero.modules.document.enums.FieldTypeEnum; +import com.jero.modules.document.mapper.BussDocumentLibraryEOMapper; +import com.jero.modules.document.service.impl.BussDocumentLibraryEOServiceImpl; +import com.jero.modules.lawsOpinionGather.enums.GatherResultEnum; import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationEO; import com.jero.modules.lawsTechnologyEvaluation.mapper.LawsTechnologyEvaluationEOMapper; import com.jero.modules.lawsTechnologyEvaluation.service.ILawsTechnologyEvaluationEOService; +import com.jero.modules.project.enums.OperatorTypeEnum; +import com.jero.modules.project.enums.RequestSourceEnum; +import com.jero.modules.split.entity.SarFileSplitInfoEO; +import com.jero.modules.split.service.ISarFileSplitInfoService; +import com.jero.modules.system.entity.SysCategory; +import com.jero.modules.system.entity.SysDictItem; +import com.jero.modules.system.service.impl.SysCategoryServiceImpl; +import com.jero.modules.system.service.impl.SysDictItemServiceImpl; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.io.IOUtils; +import org.apache.commons.lang3.StringUtils; +import org.apache.poi.hssf.usermodel.HSSFCellStyle; +import org.apache.poi.hssf.usermodel.HSSFRichTextString; +import org.apache.poi.hssf.usermodel.HSSFSheet; +import org.apache.poi.hssf.usermodel.HSSFWorkbook; +import org.apache.poi.ss.usermodel.*; +import org.apache.poi.ss.util.CellRangeAddress; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; -import java.util.List; -import java.util.Date; + +import java.io.File; +import java.io.OutputStream; +import java.util.*; +import java.util.stream.Collectors; + import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.web.multipart.MultipartFile; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; /** * @Description: 法规技术评估 @@ -15,8 +58,24 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; * @Version: V1.0 */ @Service +@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class) public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl implements ILawsTechnologyEvaluationEOService { + @Autowired + private SysCategoryServiceImpl sysCategoryService; + @Autowired + private OnlCgformFieldServiceImpl onlCgformFieldService; + @Autowired + private BussDocumentLibraryEOServiceImpl bussDocumentLibraryEOService; + @Autowired + private BussDocumentLibraryEOMapper bussDocumentLibraryEOMapper; + @Autowired + private SysDictItemServiceImpl sysDictItemServiceImpl; + @Autowired + private ISarFileSplitInfoService sarFileSplitInfoService; + @Value(value = "${jero.path.upload}") + private String uploadpath; + /** * 保存 * @@ -86,4 +145,278 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl queryList() { return list(); } + + @Override + public Result processCall(JSONObject jsonObject) { + String requestSource = jsonObject.getString("requestSource"); + if(StringUtils.isEmpty(requestSource)){ + throw new JeroBootException("请求来源不能为空!"); + } + if(!StringUtils.equals(requestSource, RequestSourceEnum.WORK_FLOW.getValue())){ + throw new JeroBootException("来源有误,没有权限调用该接口!"); + } + + String operatorType = jsonObject.getString("operatorType"); + if(StringUtils.isEmpty(operatorType)){ + throw new JeroBootException("操作类型不能为空!"); + } + if(StringUtils.equals(operatorType, OperatorTypeEnum.ADD.getValue())){ + LawsTechnologyEvaluationEO lawsTechnologyEvaluationEO = JSONObject.parseObject(JSONObject.toJSONString(jsonObject.get("lawsTechnologyEvaluationEO")),LawsTechnologyEvaluationEO.class); + this.save(lawsTechnologyEvaluationEO); + }else if(StringUtils.equals(operatorType,OperatorTypeEnum.UPDATE_STATUS.getValue())){ + LawsTechnologyEvaluationEO lawsTechnologyEvaluationEO = JSONObject.parseObject(JSONObject.toJSONString(jsonObject.get("lawsTechnologyEvaluationEO")),LawsTechnologyEvaluationEO.class); + this.updateById(lawsTechnologyEvaluationEO); + } + + return new Result<>().success("调用成功!"); + } + + @Override + public void disposeData(List datas, String cut) { + if(CollectionUtils.isNotEmpty(datas)){ + List categoryList = sysCategoryService.list(); + for (LawsTechnologyEvaluationEO data : datas) { + if(StringUtils.isNotEmpty(data.getEvaluationMethods())){ + List evaluationMethodsList = Arrays.asList(data.getEvaluationMethods().split(",")); + String name = getTreeName(cut, categoryList, evaluationMethodsList); + data.setEvaluationMethodsName(name); + } + if(StringUtils.isNotEmpty(data.getFlowStatus())){ + data.setFlowStatusName(GatherResultEnum.getTextByValue(data.getFlowStatus(),cut)); + } + if(StringUtils.isNotEmpty(data.getTechnologyTerritory())){ + List technologyTerritory = Arrays.asList(data.getTechnologyTerritory().split(",")); + String name = getTreeName(cut, categoryList, technologyTerritory); + data.setTechnologyTerritoryName(name); + } + } + } + } + + @Override + public IPage getPageDummy(Map parameter) { + String cut = (String) parameter.get("cut");//中英文切换标识 + //文档库字段 + List fieldList = onlCgformFieldService.getFieldList(ModuleEnum.DOCUMENT_LIBRARY.getValue()); + + //需要查询的字段 + List fieldListQuery = new ArrayList<>(); + fieldListQuery.add("serial_number"); + fieldListQuery.add("title"); + fieldListQuery.add("title_en"); + fieldListQuery.add("state"); + fieldListQuery.add("region"); + fieldListQuery.add("technology_territory"); + fieldListQuery.add("xin1_che1_xing2_shi2_shi1_ri4_qi1"); + fieldListQuery.add("implement_time"); + fieldListQuery.add("corresponding_standard"); + + List fieldListNew = new ArrayList<>(); + fieldListNew.add("id"); + + //过滤出文件字段 + List fileFieldList = fieldList.stream() + .filter(e -> FieldTypeEnum.FILE.getValue().equals(e.getFieldShowType())) + .collect(Collectors.toList()); + for (OnlCgformField onlCgformField : fileFieldList) { + fieldListQuery.add(onlCgformField.getDbFieldName()); + } + + //转时间格式 + for (String field : fieldListQuery) { + String fieldTemp = null; + if ("xin1_che1_xing2_shi2_shi1_ri4_qi1".equals(field) || "implement_time".equals(field)) { + String fieldNew = "date_format(" + field + ", '%Y-%m-%d')"; + fieldTemp = "case when " + fieldNew + " is null then \"\" else " + fieldNew + " end " + field; + fieldListNew.add(fieldTemp); + } else { + fieldTemp = "case when " + field + " is null then \"\" else " + field + " end " + field; + fieldListNew.add(fieldTemp); + } + } + + List fileFieldStrList = fieldList.stream() + .filter(e -> FieldTypeEnum.FILE.getValue().equals(e.getFieldShowType())).map(OnlCgformField::getDbFieldName) + .collect(Collectors.toList()); + + //封装查询条件 + String condition = this.bussDocumentLibraryEOService.getConditionStr(parameter); + int pageNo = Integer.parseInt(parameter.get("pageNo").toString()); + int pageSize = Integer.parseInt(parameter.get("pageSize").toString()); + IPage page = new Page(pageNo, pageSize); + + IPage infoPage = this.bussDocumentLibraryEOMapper.getInfoPage(page, " " + com.jero.modules.system.util.StringUtils.join(fieldListNew, ","), condition); + + //树形数据字典 + List categoryList = this.sysCategoryService.list(); + //过滤出树形字段 + List treeFieldList = fieldList.stream() + .filter(e -> FieldTypeEnum.TREE.getValue().equals(e.getFieldShowType())) + .collect(Collectors.toList()); + + + List records = infoPage.getRecords(); + //数据字典 + List sysDictItems = this.sysDictItemServiceImpl.selectItemsAll(); + //下拉选处理数据字典 + for (Map record : records) { + Map record1 = (Map) record; + String technology_territory = (String)record1.get("technology_territory"); + + List connectIdList = new ArrayList<>(); + + for (Map.Entry entry : record1.entrySet()) { + //下拉选处理数据字典 + this.bussDocumentLibraryEOService.dictItem(sysDictItems, entry, cut, fieldList,null); + this.bussDocumentLibraryEOService.treeDictItem(categoryList, entry, treeFieldList, cut,null); + if(fileFieldStrList.contains(entry.getKey())){ + if(entry.getValue()!=null){ + connectIdList.add(entry.getValue().toString()); + } + } + } + record1.put("technology_territory_id",technology_territory); + + if(CollectionUtils.isNotEmpty(connectIdList)){ + //根据id查询当前文档库数据是否有拆分数据。 + QueryWrapper splitInfoEOQueryWrapper = new QueryWrapper<>(); + splitInfoEOQueryWrapper.lambda().in(SarFileSplitInfoEO::getConnectId,connectIdList); + List sarFileSplitInfoList = new ArrayList<>(); + + List sarFileSplitInfoListTemp = sarFileSplitInfoService.list(splitInfoEOQueryWrapper); + if (CollectionUtils.isNotEmpty(sarFileSplitInfoListTemp)){ + sarFileSplitInfoListTemp.forEach(splitInfo -> { + //查询出已回传的数据 + String flag = ""; // 1 已回传 0未回传。 + if(StringUtils.isNotEmpty(splitInfo.getFileId())){ + flag = "1"; + sarFileSplitInfoList.add(splitInfo); + }else { + flag = "0"; + } + splitInfo.setFlag(flag); + }); + record1.put("sarFileSplitInfoList",sarFileSplitInfoList); + } + } + } + return infoPage; + } + + @Override + public void exportItemTemplate(String cut, HttpServletResponse response, HttpServletRequest request) { + OutputStream os = null; + HSSFWorkbook workbook = new HSSFWorkbook(); + String fileOriName = ""; + String filePath = uploadpath + File.separator + fileOriName; + try { + String title = ""; + if (CutEnum.CN.getValue().equals(cut)) { + title = "条款号,条款名称,条款内容"; + fileOriName = "条款信息导入模板.xls"; + } else { + title = "Item num,Item name,Item Contents"; + fileOriName = "Item information is imported into the template.xls"; + } + + //创建临时文件夹 + File nowFile = new File(filePath); + if (nowFile.exists()) { + nowFile.delete(); + } + nowFile.mkdirs(); + + HSSFSheet sheet = workbook.createSheet("sheet1"); + + CellStyle titleCellStyle = workbook.createCellStyle(); + titleCellStyle.setAlignment(HorizontalAlignment.CENTER);//垂直居中 + titleCellStyle.setVerticalAlignment(VerticalAlignment.CENTER);//水平居中 + titleCellStyle.setWrapText(true);//自动换行 + + //表头 + Row row = sheet.createRow(0);//开始创建标题行 + String[] headerArr = title.split(","); + for (int m = 0; m < headerArr.length; m++) { + sheet.setColumnWidth(m,10000); + Cell cell = row.createCell(m); + cell.setCellStyle(titleCellStyle); + cell.setCellValue(headerArr[m]); + } + + response.setHeader("Content-Disposition", + "attachment; filename=\"" + fileOriName + ".xls"); + response.setContentType("application/force-download"); + response.flushBuffer(); + os = response.getOutputStream(); + workbook.write(os); + } catch (Exception e) { + e.printStackTrace(); + throw new JeroBootException("下载文件失败,请重试"); + } finally { + IOUtils.closeQuietly(os); + } + + } + + @Override + public List> importItemExcel(MultipartFile file, String cut, HttpServletRequest request)throws Exception { + //校验文件格式 + int pos = file.getOriginalFilename().lastIndexOf("."); + String fileSuffixStr = file.getOriginalFilename().substring(pos+1).toLowerCase(); + if(!StringUtils.equals(fileSuffixStr,"xls")){ + if(StringUtils.equals(cut,CutEnum.CN.getValue())){ + throw new JeroBootException("请上传xls文件"); + }else if(StringUtils.equals(cut,CutEnum.EN.getValue())){ + throw new JeroBootException("Please upload a xls file"); + } + } + String fileName = file.getOriginalFilename(); + + List> result = new ArrayList<>(); + + File excelFile = File.createTempFile(fileName, fileSuffixStr); + file.transferTo(excelFile); + Workbook workbook = WorkbookFactory.create(excelFile); + if (workbook != null) { + Sheet sheet = workbook.getSheetAt(0); + if (sheet != null) { + int rowNos = sheet.getPhysicalNumberOfRows();// 得到excel的总记录条数 + for (int i = 0; i < rowNos ; i++) { + Row row = sheet.getRow(i + 1); + if(row != null){ + String itemNum = row.getCell(0, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK).toString(); + String itemName = row.getCell(1, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK).toString(); + String itemContents = row.getCell(2, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK).toString(); + Map itemInfoMap = new HashMap<>(); + String itemId = UUID.randomUUID().toString().replace("-", ""); + itemInfoMap.put("itemId",itemId); + itemInfoMap.put("itemNum",itemNum); + itemInfoMap.put("itemName",itemName); + itemInfoMap.put("itemContent",itemContents); + result.add(itemInfoMap); + } + } + } + } + return result; + } + + private String getTreeName(String cut, List categoryList, List technologyTerritoryList) { + StringBuilder sb = new StringBuilder(); + for (String technologyTerritory : technologyTerritoryList) { + List collect = categoryList.stream().filter(e -> technologyTerritory.equals(e.getId())).collect(Collectors.toList()); + if(collect.size() != 0){ + if (CutEnum.CN.getValue().equals(cut)) { + sb.append(collect.get(0).getName() + ","); + } else { + sb.append(collect.get(0).getEnName()+ ","); + } + } + } + String technologyTerritoryName = ""; + if (StringUtils.isNotBlank(sb)) { + technologyTerritoryName = sb.substring(0, sb.length() - 1); + } + return technologyTerritoryName; + } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/impl/LawsTechnologyEvaluationFlowDetailEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/impl/LawsTechnologyEvaluationFlowDetailEOServiceImpl.java new file mode 100644 index 000000000..beb0f70de --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/impl/LawsTechnologyEvaluationFlowDetailEOServiceImpl.java @@ -0,0 +1,184 @@ +package com.jero.modules.lawsTechnologyEvaluation.service.impl; + +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.jero.common.api.vo.Result; +import com.jero.common.exception.JeroBootException; +import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationFlowDetailEO; +import com.jero.modules.lawsTechnologyEvaluation.mapper.LawsTechnologyEvaluationFlowDetailEOMapper; +import com.jero.modules.lawsTechnologyEvaluation.service.ILawsTechnologyEvaluationFlowDetailEOService; +import com.jero.modules.project.enums.OperatorTypeEnum; +import com.jero.modules.project.enums.RequestSourceEnum; +import com.jero.modules.system.entity.SysUser; +import com.jero.modules.system.service.ISysUserService; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.List; +import java.util.Date; +import java.util.stream.Collectors; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; + +/** + * @Description: 法规技术评估表-流程明细 + * @Author: jero-boot + * @Date: 2022-07-11 + * @Version: V1.0 + */ +@Service +@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class) +public class LawsTechnologyEvaluationFlowDetailEOServiceImpl extends ServiceImpl implements ILawsTechnologyEvaluationFlowDetailEOService { + + @Autowired + private ISysUserService sysUserService; + + /** + * 保存 + * + * @param lawsTechnologyEvaluationFlowDetailEO + * @return + */ + @Override + public void add(LawsTechnologyEvaluationFlowDetailEO lawsTechnologyEvaluationFlowDetailEO) { + Date now = new Date(); + lawsTechnologyEvaluationFlowDetailEO.setCreateTime(now); + lawsTechnologyEvaluationFlowDetailEO.setUpdateTime(now); + save(lawsTechnologyEvaluationFlowDetailEO); + } + + /** + * 更新 + * + * @param lawsTechnologyEvaluationFlowDetailEO + * @return + */ + @Override + public void editById(LawsTechnologyEvaluationFlowDetailEO lawsTechnologyEvaluationFlowDetailEO) { + Date now = new Date(); + lawsTechnologyEvaluationFlowDetailEO.setUpdateTime(now); + saveOrUpdate(lawsTechnologyEvaluationFlowDetailEO); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @Override + public void deleteById(String id) { + removeById(id); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @Override + public void deleteByIds(List ids) { + removeByIds(ids); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + @Override + public LawsTechnologyEvaluationFlowDetailEO queryById(String id) { + return getById(id); + } + + /** + * 列表查询 + * + * @return + */ + @Override + public List queryList() { + return list(); + } + + @Override + public Result processCall(JSONObject jsonObject) { + String requestSource = jsonObject.getString("requestSource"); + if(StringUtils.isEmpty(requestSource)){ + throw new JeroBootException("请求来源不能为空!"); + } + if(!StringUtils.equals(requestSource, RequestSourceEnum.WORK_FLOW.getValue())){ + throw new JeroBootException("来源有误,没有权限调用该接口!"); + } + + String operatorType = jsonObject.getString("operatorType"); + if(StringUtils.isEmpty(operatorType)){ + throw new JeroBootException("操作类型不能为空!"); + } + if(StringUtils.equals(operatorType, OperatorTypeEnum.ADD.getValue())){ + JSONArray lawsTechnologyEvaluationListArray = jsonObject.getJSONArray("lawsTechnologyEvaluationList"); + List detailList = new ArrayList<>(); + LawsTechnologyEvaluationFlowDetailEO detailEO = null; + for (Object lawsTechnologyEvaluation : lawsTechnologyEvaluationListArray) { + detailEO = JSONObject.parseObject(JSONObject.toJSONString(lawsTechnologyEvaluation),LawsTechnologyEvaluationFlowDetailEO.class); + detailList.add(detailEO); + } + if(CollectionUtils.isNotEmpty(detailList)){ + this.saveBatch(detailList); + } + }else if(StringUtils.equals(operatorType, OperatorTypeEnum.QUERY.getValue())){ + String lawsTechnologyEvaluationId = jsonObject.getString("lawsTechnologyEvaluationId"); + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().eq(LawsTechnologyEvaluationFlowDetailEO::getLawsTechnologyEvaluationId,lawsTechnologyEvaluationId); + List lawsTechnologyEvaluationFlowDetailEOS = this.baseMapper.selectList(queryWrapper); + Result> objectResult = new Result<>(); + objectResult.setResult(lawsTechnologyEvaluationFlowDetailEOS); + objectResult.setSuccess(true); + return objectResult; + } + + return new Result<>().success("调用成功!"); + } + + @Override + public void disposeData(List datas, String cut) { + if(CollectionUtils.isNotEmpty(datas)){ + List userIdList = new ArrayList<>(); + for (LawsTechnologyEvaluationFlowDetailEO data : datas) { + String evaluatorId = data.getEvaluatorId(); + if(StringUtils.isNotEmpty(evaluatorId)){ + userIdList.add(evaluatorId); + } + } + List sysUserList = new ArrayList<>(); + if(CollectionUtils.isNotEmpty(userIdList)){ + sysUserList = sysUserService.querySysUserListByIdList(userIdList); + } + + for (LawsTechnologyEvaluationFlowDetailEO data : datas) { + if(CollectionUtils.isNotEmpty(sysUserList)){ + String evaluatorId = data.getEvaluatorId(); + if(StringUtils.isNotEmpty(evaluatorId)){ + String evaluatorName = sysUserList.stream().filter(sysUser -> { + boolean flag = false; + if (StringUtils.equals(sysUser.getId(), data.getEvaluatorId())) { + flag = true; + } + return flag; + }).map(SysUser::getUsername).distinct().collect(Collectors.joining(",")); + data.setEvaluatorName(evaluatorName); + } + } + } + + } + } +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/impl/LawsTechnologyEvaluationItemResultEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/impl/LawsTechnologyEvaluationItemResultEOServiceImpl.java new file mode 100644 index 000000000..1369b2036 --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/impl/LawsTechnologyEvaluationItemResultEOServiceImpl.java @@ -0,0 +1,380 @@ +package com.jero.modules.lawsTechnologyEvaluation.service.impl; + +import cn.hutool.core.util.ZipUtil; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.aliyuncs.utils.IOUtils; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.jero.common.api.vo.Result; +import com.jero.common.constant.enums.CutEnum; +import com.jero.common.exception.JeroBootException; +import com.jero.common.system.query.QueryGenerator; +import com.jero.common.system.vo.LoginUser; +import com.jero.common.util.FileUtils; +import com.jero.common.util.oss.CosBootUtil; +import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationItemResultEO; +import com.jero.modules.lawsTechnologyEvaluation.enums.ComplianceResultEnum; +import com.jero.modules.lawsTechnologyEvaluation.mapper.LawsTechnologyEvaluationItemResultEOMapper; +import com.jero.modules.lawsTechnologyEvaluation.service.ILawsTechnologyEvaluationItemResultEOService; +import com.jero.modules.oss.entity.OSSFile; +import com.jero.modules.oss.service.IOSSFileService; +import com.jero.modules.project.enums.OperatorTypeEnum; +import com.jero.modules.project.enums.RequestSourceEnum; +import com.jero.modules.system.entity.SysCategory; +import com.jero.modules.system.service.impl.SysCategoryServiceImpl; +import com.jero.modules.system.util.PDFUtils; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.StringUtils; +import org.apache.poi.hssf.usermodel.HSSFSheet; +import org.apache.poi.hssf.usermodel.HSSFWorkbook; +import org.apache.poi.ss.usermodel.*; +import org.apache.shiro.SecurityUtils; +import org.aspectj.util.FileUtil; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Service; + +import java.io.*; +import java.text.SimpleDateFormat; +import java.util.*; +import java.util.stream.Collectors; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +/** + * @Description: 法规技术评估-条款信息评估结果表 + * @Author: jero-boot + * @Date: 2022-07-11 + * @Version: V1.0 + */ +@Service +@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class) +public class LawsTechnologyEvaluationItemResultEOServiceImpl extends ServiceImpl implements ILawsTechnologyEvaluationItemResultEOService { + + @Value(value = "${jero.path.upload}") + private String uploadpath; + @Autowired + private SysCategoryServiceImpl sysCategoryService; + @Autowired + private IOSSFileService iOSSFileService; + + /** + * 保存 + * + * @param lawsTechnologyEvaluationItemResultEO + * @return + */ + @Override + public void add(LawsTechnologyEvaluationItemResultEO lawsTechnologyEvaluationItemResultEO) { + Date now = new Date(); + lawsTechnologyEvaluationItemResultEO.setCreateTime(now); + lawsTechnologyEvaluationItemResultEO.setUpdateTime(now); + save(lawsTechnologyEvaluationItemResultEO); + } + + /** + * 更新 + * + * @param lawsTechnologyEvaluationItemResultEO + * @return + */ + @Override + public void editById(LawsTechnologyEvaluationItemResultEO lawsTechnologyEvaluationItemResultEO) { + Date now = new Date(); + lawsTechnologyEvaluationItemResultEO.setUpdateTime(now); + saveOrUpdate(lawsTechnologyEvaluationItemResultEO); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @Override + public void deleteById(String id) { + removeById(id); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @Override + public void deleteByIds(List ids) { + removeByIds(ids); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + @Override + public LawsTechnologyEvaluationItemResultEO queryById(String id) { + return getById(id); + } + + /** + * 列表查询 + * + * @return + */ + @Override + public List queryList(LawsTechnologyEvaluationItemResultEO lawsTechnologyEvaluationItemResultEO, + HttpServletRequest req, + String cut) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(lawsTechnologyEvaluationItemResultEO, req.getParameterMap()); + List itemResultEOList = this.baseMapper.selectList(queryWrapper); + return itemResultEOList; + } + + /** + * 流程调用 + * @param jsonObject + * @return + */ + @Override + public Result processCall(JSONObject jsonObject) { + String requestSource = jsonObject.getString("requestSource"); + if(StringUtils.isEmpty(requestSource)){ + throw new JeroBootException("请求来源不能为空!"); + } + if(!StringUtils.equals(requestSource, RequestSourceEnum.WORK_FLOW.getValue())){ + throw new JeroBootException("来源有误,没有权限调用该接口!"); + } + + String operatorType = jsonObject.getString("operatorType"); + if(StringUtils.isEmpty(operatorType)){ + throw new JeroBootException("操作类型不能为空!"); + } + if(StringUtils.equals(operatorType, OperatorTypeEnum.ADD.getValue())){ + JSONArray itemResultEOList = jsonObject.getJSONArray("itemResultEOList"); + List itemResultList = new ArrayList<>(); + LawsTechnologyEvaluationItemResultEO itemResultEO = null; + for (Object itemResult : itemResultEOList) { + itemResultEO = JSONObject.parseObject(JSONObject.toJSONString(itemResult),LawsTechnologyEvaluationItemResultEO.class); + itemResultList.add(itemResultEO); + } + if(CollectionUtils.isNotEmpty(itemResultList)){ + this.saveBatch(itemResultList); + } + } + + return new Result<>().success("调用成功!"); + } + + @Override + public void batchUpdate(JSONObject jsonObject) { + JSONArray itemResultArray = jsonObject.getJSONArray("itemResultList"); + List itemResultEOList = new ArrayList<>(); + LawsTechnologyEvaluationItemResultEO itemResultEO = null; + for (Object itemResult : itemResultArray) { + itemResultEO = JSONObject.parseObject(JSONObject.toJSONString(itemResult),LawsTechnologyEvaluationItemResultEO.class); + itemResultEOList.add(itemResultEO); + } + + if(CollectionUtils.isNotEmpty(itemResultEOList)){ + this.updateBatchById(itemResultEOList); + } + } + + @Override + public void disposeData(List datas, String cut) { + if(CollectionUtils.isNotEmpty(datas)){ + List categoryList = sysCategoryService.list(); + for (LawsTechnologyEvaluationItemResultEO data : datas) { + String evaluationMethods = data.getEvaluationMethods(); + List evaluationMethodsList = Arrays.asList(evaluationMethods.split(",")); + String name = getTreeName(cut, categoryList, evaluationMethodsList); + data.setEvaluationMethodsName(name); + if(StringUtils.isNotEmpty(data.getComplianceResult())){ + data.setComplianceResultName(ComplianceResultEnum.getTextByValue(data.getComplianceResult(),cut)); + } + + if(StringUtils.isNotEmpty(data.getAccessoryFile())){ + List accessoryFileList = iOSSFileService.getFileInfos(data.getAccessoryFile()); + String accessoryFileName = accessoryFileList.stream().map(OSSFile::getFileName).collect(Collectors.joining(",")); + data.setAccessoryFileName(accessoryFileName); + } + } + } + } + + @Override + public void exportZip(HttpServletResponse response, HttpServletRequest request, LawsTechnologyEvaluationItemResultEO lawsTechnologyEvaluationItemResultEO, Map params) { + String ids = (String)params.get("ids"); + String cut = (String)params.get("cut"); + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(lawsTechnologyEvaluationItemResultEO, request.getParameterMap()); + if(StringUtils.isNotEmpty(ids)){ + List idList = Arrays.asList(ids.split(",")); + queryWrapper.lambda().in(LawsTechnologyEvaluationItemResultEO::getId,idList); + } + List exportData = this.baseMapper.selectList(queryWrapper); + this.disposeData(exportData,cut); + + String title = ""; + String fileName = ""; + if(StringUtils.equals(cut, CutEnum.CN.getValue())){ + title = "条款号,条款名称,条款内容,评估人,评估方式,技术文件名称,章节,符合性结果,意见,附件,反馈时间"; + fileName = "条款评估结果 " + ".xlsx"; + }else if(StringUtils.equals(cut,CutEnum.EN.getValue())){ + title = "Item num,Item name,Item Contents,Evaluator,Evaluation methods,Name of technical document,Section,Compliance results,Opinion,Accessory,Feedback time "; + fileName = "Item Evaluation results " + ".xlsx"; + } + + OutputStream os = null; + HSSFWorkbook workbook = new HSSFWorkbook(); + + String path = uploadpath + "/tempZip/itemEvaluationResults/" + System.currentTimeMillis(); + + try { + response.setHeader("Content-Disposition", + "attachment; filename=" + fileName); + response.setContentType("application/force-download"); + + HSSFSheet sheet = workbook.createSheet("sheet1"); + + CellStyle titleCellStyle = workbook.createCellStyle(); + titleCellStyle.setAlignment(HorizontalAlignment.CENTER);//垂直居中 + titleCellStyle.setVerticalAlignment(VerticalAlignment.CENTER);//水平居中 + titleCellStyle.setWrapText(true);//自动换行 + + Row firstRow = sheet.createRow(0); + + //创建表头 + String[] titleArr = title.split(","); + for (int i=0; i<=5; i++){ + sheet.setColumnWidth(i,4000); + Cell cell = firstRow.createCell(i); + cell.setCellStyle(titleCellStyle); + cell.setCellValue(titleArr[i]); + } + + //设置导出数据 + if(CollectionUtils.isNotEmpty(exportData)) { + for (int dataIndex = 0; dataIndex < exportData.size(); dataIndex++) { + Row dataRow = sheet.createRow(dataIndex + 1); + dataRow.createCell(0).setCellValue(exportData.get(dataIndex).getItemNum()); + dataRow.createCell(1).setCellValue(exportData.get(dataIndex).getItemName()); + dataRow.createCell(2).setCellValue(exportData.get(dataIndex).getItemContent()); + dataRow.createCell(3).setCellValue(exportData.get(dataIndex).getCreateBy()); + dataRow.createCell(4).setCellValue(exportData.get(dataIndex).getEvaluationMethodsName()); + dataRow.createCell(5).setCellValue(exportData.get(dataIndex).getTechnicalFileName()); + dataRow.createCell(6).setCellValue(exportData.get(dataIndex).getSection()); + dataRow.createCell(7).setCellValue(exportData.get(dataIndex).getComplianceResultName()); + dataRow.createCell(8).setCellValue(exportData.get(dataIndex).getOpinion()); + dataRow.createCell(9).setCellValue(exportData.get(dataIndex).getAccessoryFileName()); + String feedBackTimeStr = disposeDate(exportData.get(dataIndex).getCreateTime()); + dataRow.createCell(10).setCellValue(feedBackTimeStr); + } + } + + + File fileTemp = new File(path); + if (fileTemp.exists()) { + fileTemp.delete(); + } + fileTemp.mkdirs(); + //excel + OutputStream excelOS = new FileOutputStream(path + File.separator + fileName); + workbook.write(excelOS); + excelOS.flush(); + + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); + LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + + for (LawsTechnologyEvaluationItemResultEO data : exportData) { + String accessoryFile = data.getAccessoryFile(); + + List fileInfosList = iOSSFileService.getFileInfos(accessoryFile); + if (fileInfosList.size() != 0) { + for (OSSFile ossFile : fileInfosList) { + String url = ossFile.getUrl(); + //判断文件是否存在 + if(StringUtils.isNotBlank(url)){ + //判断文件是否存在 + boolean b = CosBootUtil.doesObjectExist(url); + if(b){ + InputStream download = CosBootUtil.download(url); + if(url.endsWith(".pdf") || url.endsWith(".PDF")){ + String currentTime = sdf.format(new Date()); + String waterContent = loginUser.getUsername() + " " + currentTime; + File newFile = PDFUtils.PDFWatermark(download,uploadpath,ossFile.getFileName(),waterContent); + download = new FileInputStream(newFile.getPath()); + } + FileUtils.copyFile(download, path + File.separator + ossFile.getFileName()); + } + } + } + } + } + ZipUtil.zip(path, path + ".zip"); + //文件 + FileInputStream fis = new FileInputStream(path + ".zip"); + os = response.getOutputStream(); + + int len = 0; + while ((len = fis.read()) != -1) { + os.write(len); + } + os.flush(); + fis.close(); + excelOS.close(); + + }catch (IOException ex){ + if(CutEnum.CN.getValue().equals(cut)){ + throw new JeroBootException("下载文件失败"); + }else{ + throw new JeroBootException("Failed to download file"); + } + }finally { + IOUtils.closeQuietly(os); + File file = new File(path); + FileUtil.deleteContents(file); + File fileTemp = new File(path + ".zip"); + FileUtil.deleteContents(fileTemp); + } + } + + public String disposeDate(Date date){ + String result = ""; + try { + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); + if(date != null){ + result = sdf.format(date); + } + }catch (Exception ex){ + ex.printStackTrace(); + log.error("处理日期失败:" +ex.getMessage()); + } + return result; + } + + private String getTreeName(String cut, List categoryList, List evaluationMethodsList) { + StringBuilder sb = new StringBuilder(); + for (String evaluationMethods : evaluationMethodsList) { + List collect = categoryList.stream().filter(e -> evaluationMethods.equals(e.getId())).collect(Collectors.toList()); + if(collect.size() != 0){ + if (CutEnum.CN.getValue().equals(cut)) { + sb.append(collect.get(0).getName() + ","); + } else { + sb.append(collect.get(0).getEnName()+ ","); + } + } + } + String evaluationMethodsName = ""; + if (StringUtils.isNotBlank(sb)) { + evaluationMethodsName = sb.substring(0, sb.length() - 1); + } + return evaluationMethodsName; + } +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/impl/LawsTechnologyEvaluationResultEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/impl/LawsTechnologyEvaluationResultEOServiceImpl.java new file mode 100644 index 000000000..6d35252bd --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsTechnologyEvaluation/service/impl/LawsTechnologyEvaluationResultEOServiceImpl.java @@ -0,0 +1,190 @@ +package com.jero.modules.lawsTechnologyEvaluation.service.impl; + +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.jero.common.system.query.QueryGenerator; +import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationComplianceResultEO; +import com.jero.modules.lawsTechnologyEvaluation.entity.LawsTechnologyEvaluationResultEO; +import com.jero.modules.lawsTechnologyEvaluation.mapper.LawsTechnologyEvaluationResultEOMapper; +import com.jero.modules.lawsTechnologyEvaluation.service.ILawsTechnologyEvaluationComplianceResultEOService; +import com.jero.modules.lawsTechnologyEvaluation.service.ILawsTechnologyEvaluationResultEOService; +import com.jero.modules.oss.entity.OSSFile; +import com.jero.modules.oss.service.IOSSFileService; +import me.zhyd.oauth.utils.StringUtils; +import org.apache.commons.collections4.CollectionUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.List; +import java.util.Date; +import java.util.UUID; +import java.util.stream.Collectors; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; + +import javax.servlet.http.HttpServletRequest; + +/** + * @Description: 法规技术评估-评估结果表 + * @Author: jero-boot + * @Date: 2022-07-11 + * @Version: V1.0 + */ +@Service +@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class) +public class LawsTechnologyEvaluationResultEOServiceImpl extends ServiceImpl implements ILawsTechnologyEvaluationResultEOService { + + @Autowired + private ILawsTechnologyEvaluationComplianceResultEOService complianceResultEOService; + @Autowired + private IOSSFileService iOSSFileService; + + /** + * 保存 + * + * @param lawsTechnologyEvaluationResultEO + * @return + */ + @Override + public void add(LawsTechnologyEvaluationResultEO lawsTechnologyEvaluationResultEO) { + Date now = new Date(); + lawsTechnologyEvaluationResultEO.setCreateTime(now); + lawsTechnologyEvaluationResultEO.setUpdateTime(now); + save(lawsTechnologyEvaluationResultEO); + } + + /** + * 更新 + * + * @param lawsTechnologyEvaluationResultEO + * @return + */ + @Override + public void editById(LawsTechnologyEvaluationResultEO lawsTechnologyEvaluationResultEO) { + Date now = new Date(); + lawsTechnologyEvaluationResultEO.setUpdateTime(now); + saveOrUpdate(lawsTechnologyEvaluationResultEO); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @Override + public void deleteById(String id) { + removeById(id); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @Override + public void deleteByIds(List ids) { + removeByIds(ids); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + @Override + public LawsTechnologyEvaluationResultEO queryById(String id) { + return getById(id); + } + + /** + * 列表查询 + * + * @return + */ + @Override + public List queryList(LawsTechnologyEvaluationResultEO lawsTechnologyEvaluationResultEO, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(lawsTechnologyEvaluationResultEO, req.getParameterMap()); + List evaluationResultEOList = this.baseMapper.selectList(queryWrapper); + return evaluationResultEOList; + } + + @Override + public void evaluatorSaveResult(JSONObject json) { + String actiProcInstId = json.getString("actiProcInstId"); + String lawsTechnologyEvaluationId = json.getString("lawsTechnologyEvaluationId"); + + String complianceResult = json.getString("complianceResult"); + + //删除符合性结果信息 + QueryWrapper removeComplianceResultWrapper = new QueryWrapper<>(); + removeComplianceResultWrapper.lambda().eq(LawsTechnologyEvaluationComplianceResultEO::getActiProcInstId,actiProcInstId); + removeComplianceResultWrapper.lambda().eq(LawsTechnologyEvaluationComplianceResultEO::getLawsTechnologyEvaluationId,lawsTechnologyEvaluationId); + complianceResultEOService.remove(removeComplianceResultWrapper); + + LawsTechnologyEvaluationComplianceResultEO complianceResultEO = new LawsTechnologyEvaluationComplianceResultEO(); + String complianceResultId = UUID.randomUUID().toString().replace("-", ""); + complianceResultEO.setId(complianceResultId); + complianceResultEO.setActiProcInstId(actiProcInstId); + complianceResultEO.setLawsTechnologyEvaluationId(lawsTechnologyEvaluationId); + complianceResultEO.setComplianceResult(complianceResult); + complianceResultEOService.save(complianceResultEO); + + //删除之前提交的评估信息 + QueryWrapper deleteWrapper = new QueryWrapper<>(); + deleteWrapper.lambda().eq(LawsTechnologyEvaluationResultEO::getActiProcInstId,actiProcInstId); + deleteWrapper.lambda().eq(LawsTechnologyEvaluationResultEO::getLawsTechnologyEvaluationId,lawsTechnologyEvaluationId); + this.baseMapper.delete(deleteWrapper); + + JSONArray evaluationResultList = json.getJSONArray("evaluationResultList"); + List evaluationResultEOList = new ArrayList<>(); + LawsTechnologyEvaluationResultEO evaluationResultEO = null; + for (Object evaluationResult : evaluationResultList) { + evaluationResultEO = JSONObject.parseObject(JSONObject.toJSONString(evaluationResult),LawsTechnologyEvaluationResultEO.class); + evaluationResultEO.setActiProcInstId(actiProcInstId); + evaluationResultEO.setLawsTechnologyEvaluationId(lawsTechnologyEvaluationId); + evaluationResultEO.setSubmitTime(new Date()); + evaluationResultEO.setComplianceResultId(complianceResultId); + evaluationResultEOList.add(evaluationResultEO); + } + if(CollectionUtils.isNotEmpty(evaluationResultEOList)){ + this.saveBatch(evaluationResultEOList); + } + } + + @Override + public JSONObject queryEvaluationResultAndComplianceResult(LawsTechnologyEvaluationResultEO lawsTechnologyEvaluationResultEO, HttpServletRequest req) { + JSONObject result = new JSONObject(); + List evaluationResultEOList = this.queryList(lawsTechnologyEvaluationResultEO, req); + result.put("evaluationResultEOList",evaluationResultEOList); + + QueryWrapper complianceResultEOQueryWrapper = new QueryWrapper<>(); + complianceResultEOQueryWrapper.lambda().eq(LawsTechnologyEvaluationComplianceResultEO::getActiProcInstId,lawsTechnologyEvaluationResultEO.getActiProcInstId()); + complianceResultEOQueryWrapper.lambda().eq(LawsTechnologyEvaluationComplianceResultEO::getLawsTechnologyEvaluationId,lawsTechnologyEvaluationResultEO.getLawsTechnologyEvaluationId()); + List complianceResultEOList = complianceResultEOService.list(complianceResultEOQueryWrapper); + if(CollectionUtils.isNotEmpty(complianceResultEOList)){ + result.put("complianceResult",complianceResultEOList.get(0)); + } + return result; + } + + @Override + public void disposeData(List datas, String cut) { + if(CollectionUtils.isNotEmpty(datas)){ + for (LawsTechnologyEvaluationResultEO data : datas) { + if(StringUtils.isNotEmpty(data.getAccessoryFile())){ + List accessoryFileList = iOSSFileService.getFileInfos(data.getAccessoryFile()); + String accessoryFileName = accessoryFileList.stream().map(OSSFile::getFileName).collect(Collectors.joining(",")); + data.setAccessoryFileName(accessoryFileName); + } + } + } + } +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/controller/LawsMonthlyReportTitleTemplateEOController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/controller/LawsMonthlyReportTitleTemplateEOController.java index db6a7d163..4ccc7a42f 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/controller/LawsMonthlyReportTitleTemplateEOController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/controller/LawsMonthlyReportTitleTemplateEOController.java @@ -1,5 +1,7 @@ package com.jero.modules.report.controller; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.jero.common.api.vo.Result; import com.jero.common.aspect.annotation.AutoLog; @@ -23,6 +25,7 @@ import org.springframework.web.servlet.ModelAndView; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -186,13 +189,20 @@ public class LawsMonthlyReportTitleTemplateEOController extends JeroController move(@RequestBody List lawsMonthlyReportTitleTemplateEOS) { + public Result move(@RequestBody JSONObject jsonObject) { + JSONArray lawsMonthlyReportTitleTemplateJson = jsonObject.getJSONArray("lawsMonthlyReportTitleTemplateEOS"); + LawsMonthlyReportTitleTemplateEO lawsMonthlyReportTitleTemplateEO = null; + List lawsMonthlyReportTitleTemplateEOS = new ArrayList<>(); + for (Object o : lawsMonthlyReportTitleTemplateJson) { + lawsMonthlyReportTitleTemplateEO=JSONObject.parseObject(JSONObject.toJSONString(o),LawsMonthlyReportTitleTemplateEO.class); + lawsMonthlyReportTitleTemplateEOS.add(lawsMonthlyReportTitleTemplateEO); + } lawsMonthlyReportTitleTemplateEOService.move(lawsMonthlyReportTitleTemplateEOS); return Result.OK("操作成功!"); } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/controller/LawsMonthlyReportWriteEOController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/controller/LawsMonthlyReportWriteEOController.java index 8c873e5d6..9f965309c 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/controller/LawsMonthlyReportWriteEOController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/controller/LawsMonthlyReportWriteEOController.java @@ -9,6 +9,7 @@ import com.jero.modules.report.service.ILawsMonthlyReportWriteEOService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; +import net.sf.json.JSONObject; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; @@ -18,6 +19,7 @@ import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.servlet.ModelAndView; @@ -27,9 +29,10 @@ import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import java.util.Map; - /** +/** * @Description: 月报填写 * @Author: jero-boot * @Date: 2022-07-02 @@ -184,4 +187,14 @@ public class LawsMonthlyReportWriteEOController extends JeroController parameter) { + IPage infoPage = lawsMonthlyReportWriteEOService.queryPageDocument(parameter); + Result ok = Result.OK(infoPage); + JSONObject jsonResult = JSONObject.fromObject(ok); + return jsonResult; + } + } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/service/ILawsMonthlyReportWriteEOService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/service/ILawsMonthlyReportWriteEOService.java index 503feabb0..9f4e58fec 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/service/ILawsMonthlyReportWriteEOService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/service/ILawsMonthlyReportWriteEOService.java @@ -7,6 +7,7 @@ import org.springframework.http.ResponseEntity; import javax.servlet.http.HttpServletRequest; import java.util.List; +import java.util.Map; /** * @Description: 月报填写 @@ -77,4 +78,6 @@ public interface ILawsMonthlyReportWriteEOService extends IService exportMonthlyReport(LawsMonthlyReportWriteEO lawsMonthlyReportWriteEO); + + IPage queryPageDocument(Map parameter); } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/service/impl/LawsMonthlyReportWriteEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/service/impl/LawsMonthlyReportWriteEOServiceImpl.java index 60deb8c14..1739939b6 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/service/impl/LawsMonthlyReportWriteEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/service/impl/LawsMonthlyReportWriteEOServiceImpl.java @@ -6,7 +6,13 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.jero.common.constant.enums.CutEnum; +import com.jero.common.constant.enums.ModuleEnum; import com.jero.common.system.query.QueryGenerator; +import com.jero.generater.modules.online.cgform.entity.OnlCgformField; +import com.jero.generater.modules.online.cgform.service.impl.OnlCgformFieldServiceImpl; +import com.jero.modules.document.enums.FieldTypeEnum; +import com.jero.modules.document.mapper.BussDocumentLibraryEOMapper; +import com.jero.modules.document.service.impl.BussDocumentLibraryEOServiceImpl; import com.jero.modules.report.entity.LawsMonthlyReportTitleTemplateEO; import com.jero.modules.report.entity.LawsMonthlyReportWriteEO; import com.jero.modules.report.entity.NewOpinionTemplateEO; @@ -20,7 +26,9 @@ import com.jero.modules.report.service.INewOpinionTemplateEOService; import com.jero.modules.report.service.INewStandardTemplateEOService; import com.jero.modules.report.util.WordUtil; import com.jero.modules.system.entity.SysCategory; +import com.jero.modules.system.entity.SysDictItem; import com.jero.modules.system.service.impl.SysCategoryServiceImpl; +import com.jero.modules.system.service.impl.SysDictItemServiceImpl; import com.jero.modules.system.util.StringUtils; import org.apache.poi.xwpf.usermodel.ParagraphAlignment; import org.apache.poi.xwpf.usermodel.XWPFDocument; @@ -37,6 +45,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Date; import java.util.List; +import java.util.Map; import java.util.stream.Collectors; /** @@ -58,6 +67,14 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl parameter) { + String cut = (String) parameter.get("cut");//中英文切换标识 + //文档库字段 + List fieldList = onlCgformFieldService.getFieldList(ModuleEnum.DOCUMENT_LIBRARY.getValue()); + //需要查询的字段 + List fieldListQuery = new ArrayList<>(); + fieldListQuery.add("serial_number"); + fieldListQuery.add("title"); + fieldListQuery.add("title_en"); + fieldListQuery.add("state"); + fieldListQuery.add("region"); + fieldListQuery.add("technology_territory"); + fieldListQuery.add("xin1_che1_xing2_shi2_shi1_ri4_qi1"); + fieldListQuery.add("implement_time"); + fieldListQuery.add("corresponding_standard"); + fieldListQuery.add("shi4_yong4_che1_xing2"); + fieldListQuery.add("shi4_yong4_fan4_wei2"); + + List fieldListNew = new ArrayList<>(); + fieldListNew.add("id"); + + //转时间格式 + for (String field : fieldListQuery) { + String fieldTemp = null; + if ("xin1_che1_xing2_shi2_shi1_ri4_qi1".equals(field) || "implement_time".equals(field)) { + String fieldNew = "date_format(" + field + ", '%Y-%m-%d')"; + fieldTemp = "case when " + fieldNew + " is null then \"\" else " + fieldNew + " end " + field; + fieldListNew.add(fieldTemp); + } else { + fieldTemp = "case when " + field + " is null then \"\" else " + field + " end " + field; + fieldListNew.add(fieldTemp); + } + } + //封装查询条件 + String condition = bussDocumentLibraryEOService.getConditionStr(parameter); + int pageNo = Integer.parseInt(parameter.get("pageNo").toString()); + int pageSize = Integer.parseInt(parameter.get("pageSize").toString()); + IPage page = new Page(pageNo, pageSize); + + IPage infoPage = bussDocumentLibraryEOMapper.getInfoPage(page, " " + StringUtils.join(fieldListNew, ","), condition); + + //树形数据字典 + List categoryList = sysCategoryService.list(); + //过滤出树形字段 + List treeFieldList = fieldList.stream() + .filter(e -> FieldTypeEnum.TREE.getValue().equals(e.getFieldShowType())) + .collect(Collectors.toList()); + + + List records = infoPage.getRecords(); + //数据字典 + List sysDictItems = sysDictItemServiceImpl.selectItemsAll(); + //下拉选处理数据字典 + for (Map record : records) { + Map record1 = (Map) record; + record1.put("state_dict",record1.get("state"));//状态 + record1.put("technology_territory_dict",record1.get("technology_territory"));//相关领域 + record1.put("shi4_yong4_fan4_wei2_dict",record1.get("shi4_yong4_fan4_wei2"));//适用范围 + record1.put("shi4_yong4_che1_xing2_dict",record1.get("shi4_yong4_che1_xing2"));//适用车型 + for (Map.Entry entry : record1.entrySet()) { + //下拉选处理数据字典 + bussDocumentLibraryEOService.dictItem(sysDictItems, entry, cut, fieldList,null); + bussDocumentLibraryEOService.treeDictItem(categoryList, entry, treeFieldList, cut,null); + } + } + return infoPage; + } + } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/split/common/FileUnZip.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/split/common/FileUnZip.java index 6b49c5eca..bd676b932 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/split/common/FileUnZip.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/split/common/FileUnZip.java @@ -198,7 +198,7 @@ public class FileUnZip { File[] filesTemp = fi.listFiles(); for (File fileTemp : filesTemp) { // 对文件进行过滤 - if (fileTemp.getName().equals(filenameTwo) && fileTemp.getPath().contains(filenameOne) && StringUtils.isNotBlank(filenameOne)) { + if (fileTemp.getName().equals(filenameTwo) && fi.getName().equals(filenameOne) && StringUtils.isNotBlank(filenameOne)) { resultlist.add(fileTemp); } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/wkflow/controller/workFlowController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/wkflow/controller/workFlowController.java index bf3b4ca11..b39663dc2 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/wkflow/controller/workFlowController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/wkflow/controller/workFlowController.java @@ -71,6 +71,9 @@ public class workFlowController { }else if(StringUtils.equals(type,FlowTypeEnum.FGYJSJLC.getValue())){ jsonObject.put("id", FlowTypeEnum.FGYJSJLC.getProcessDefinitionKey()); return this.activiti_define_start(jsonObject); + }else if(StringUtils.equals(type,FlowTypeEnum.FGJSPG.getValue())){ + jsonObject.put("processDefinitionKey", FlowTypeEnum.FGJSPG.getProcessDefinitionKey()); + return this.startLawsTechnologyEvaluationProcess(jsonObject); }else{ return null; } @@ -192,4 +195,12 @@ public class workFlowController { conditionAssessmentEOService.addOrUpdate(conditionAssessmentEO); } + /** + * 启动流程-法规技术评估流程 + * @param jsonObject + * @return + */ + public Result startLawsTechnologyEvaluationProcess(@RequestBody JSONObject jsonObject){ + return workFlowFeignClient.startLawsTechnologyEvaluationProcess(jsonObject); + } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/wkflow/entity/TaskCommonQuery.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/wkflow/entity/TaskCommonQuery.java index 27ed1817a..cbecf5705 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/wkflow/entity/TaskCommonQuery.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/wkflow/entity/TaskCommonQuery.java @@ -45,7 +45,9 @@ public class TaskCommonQuery { @ApiModelProperty(value = "流程类型") private String prcType; - private String prcTypes = FlowTypeEnum.RWQRLC.getValue() + "," + FlowTypeEnum.FGYJSJLC.getValue(); + private String prcTypes = FlowTypeEnum.RWQRLC.getValue() + + "," + FlowTypeEnum.FGYJSJLC.getValue() + + "," + FlowTypeEnum.FGJSPG.getValue(); @ApiModelProperty(value = "高级搜索字符串") private String advanceSearchVOStr; diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/wkflow/enums/FlowTypeEnum.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/wkflow/enums/FlowTypeEnum.java index 159c3a27b..d41f6e887 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/wkflow/enums/FlowTypeEnum.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/wkflow/enums/FlowTypeEnum.java @@ -10,6 +10,7 @@ public enum FlowTypeEnum { PREHOMOQRLC("3","prehomo确认流程","PREHOMOQRLC","prehomo确认流程","prehomoqrlc"), YZFHXSCLC("4","验证符合性审查流程","YZFHXSCLC","验证符合性审查流程","yzfhxsclc"), FGYJSJLC("5","法规意见收集流程","FGYJSJLC","法规意见收集流程","fgyjsjlc"), + FGJSPG("6","法规技术评估","FGJSPG","法规技术评估流程","fgjspglc"), ; private String value; diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/wkflow/feginClient/WorkFlowFeignClient.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/wkflow/feginClient/WorkFlowFeignClient.java index f6a1f8a0a..1c48c7d24 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/wkflow/feginClient/WorkFlowFeignClient.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/wkflow/feginClient/WorkFlowFeignClient.java @@ -137,4 +137,15 @@ public interface WorkFlowFeignClient { @RequestMapping(value = "/bat-wkflow/task/completeTaskByPids",method = RequestMethod.GET) Result completeTaskByPids(@RequestParam("actiProcInstIds") String actiProcInstIds); + + /** + * 启动流程-法规技术评估流程 + * @param jsonObject + * @return + */ + @RequestMapping(value = "/bat-wkflow/startLawsTechnologyEvaluationProcess",method = RequestMethod.POST,headers = {"content-type=application/json"}) + Result startLawsTechnologyEvaluationProcess(String jsonObject); + + @RequestMapping(value = "/bat-wkflow/task/completeLawsTechnologyEvaluationTaskByPids",method = RequestMethod.GET) + Result completeLawsTechnologyEvaluationTaskByPids(@RequestParam("actiProcInstIds") String actiProcInstIds); } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/wkflow/feginClient/impl/WorkFlowFeignClientImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/wkflow/feginClient/impl/WorkFlowFeignClientImpl.java index f41e56c44..78da46005 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/wkflow/feginClient/impl/WorkFlowFeignClientImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/wkflow/feginClient/impl/WorkFlowFeignClientImpl.java @@ -157,4 +157,14 @@ public class WorkFlowFeignClientImpl{ public List> queryProcessHistoryByPrcId(@RequestParam("prcId") String prcId,@RequestParam("cut") String cut,@RequestParam("prcType") String prcType, @RequestParam(value="sortWord",required = false)String sortWord, @RequestParam(value="shunxu",required = false) String shunxu){ return workFlowFeignClient.queryProcessHistoryByPrcId(prcId,cut,prcType,sortWord,shunxu); } + + /** + * 启动流程-法规技术评估流程 + * @param jsonObject + * @return + */ + public Result startLawsTechnologyEvaluationProcess(@RequestBody net.sf.json.JSONObject jsonObject){ + Result stringWrapper = workFlowFeignClient.startLawsTechnologyEvaluationProcess(jsonObject.toString()); + return Result.OK(stringWrapper.getResult()); + } } diff --git a/jero-web/src/api/manage.js b/jero-web/src/api/manage.js index a0c2d5fbb..beaf0974f 100644 --- a/jero-web/src/api/manage.js +++ b/jero-web/src/api/manage.js @@ -202,6 +202,10 @@ export function downloadFile(url, fileName, parameter, callback) { } } catch (e) { if (!data || data.size === 0) { + index.showDrawer({ + loading: false, + isTrue: isTrue + }) Vue.prototype['$message'].warning('文件下载失败') return } diff --git a/jero-web/src/common/lang/en-us.js b/jero-web/src/common/lang/en-us.js index 60fdea5ac..d77d934fc 100644 --- a/jero-web/src/common/lang/en-us.js +++ b/jero-web/src/common/lang/en-us.js @@ -388,7 +388,8 @@ module.exports = { StandardDetails: 'Standard Details', whole: 'Whole', DocumentLibrary: 'Document Library', - GeneralExportInformation:'General export Information', + GeneralExportInformation:'General export information', + CustomizeExportInformation:'Customize export information', DocumentComparisonLibrary: 'Document comparison Library', weekly: 'Weekly', SyncLibrary: 'Sync to doc. library', @@ -1054,6 +1055,7 @@ module.exports = { NcontrolType: 'Control Type', NcontrolVerification: 'Control Verify', NcontrolAlternatives: 'Control Values', + DefaultValue: 'Default Value', NattachmentTemplate: 'File Template', Ntext: 'Text', NDropdownradio: 'Pull Single', @@ -1065,6 +1067,7 @@ module.exports = { Dtext: 'Pull single+File', Etext: 'Pull more+File', Ftext: 'Text+Pull single+File', + Gtext: 'Title', Nnothing: 'Null', Nchinese: 'Chinese', NpositiveInteger: 'Integer', @@ -1106,4 +1109,46 @@ module.exports = { PreHomoNotification:'Pre-Homo Notification', ValidationComplianceNotification:'Validation Compliance Notification', RegulationTaskConfirmationNotification:'Regulation Task Confirmation Notification', + evaluationMethod:'Evaluation method', + uploadRelevantMaterials:'Upload relevant materials', + processBackground:'Process background', + selectedStandard:'Selected standard', + standardDecompositionDocument:'Standard decomposition document', + pleaseSelectStandardFirst:'Please select a standard first', + RelevantMaterials:'RelevantMaterials', + evaluatorFeedback:'Evaluator feedback', + nameTechnicalDocument:'Name of technical document', + chapter:'chapter', + problemDescription:'Problem description', + filingExternalOpinions:'Filing of external opinions', + regulatoryTechnicalEvaluationResults:'Regulatory technical evaluation results', + initiateProcessForCurrentStandard:'Initiate process for current standard', + engineerFeedbackResults:'Engineer feedback results', + fileExport:'File export', + feedbackTime:'Feedback time', + regulatoryTechnologyAssessmentProcess:'Regulatory technology assessment process', + feedbackEvaluation:'Feedback evaluation', + clauseEvaluation:'Clause evaluation', + standardDocuments:'Standard documents', + pleaseCompleteTheEvaluationMethodorEvaluator:'Please complete the evaluation method or evaluator in the list', + reviewComments:'Review comments', + PleaseCompleteList:'Please complete the compliance results in the list', + sponsorFeedback:'Sponsor feedback', + processNumber:'Process number', + processName:'Process Name', + feedbackResults:'Feedback results', + theDoesNotSupportPreview:'The current file format does not support Preview', + releaseSituation:'Release situation', + comparisonResults:'Comparison results', + Published:'Published', + initiateComparison:'Initiate comparison', + translationLanguage:'Translation language', + translationResults:'Translation results', + conversionTime:'Conversion time', + category:'Category', + RegulatoryProcessEvaluationResults :'Regulatory Process Evaluation Results', + ViewConformanceResults:'View Conformance Results', + CommentsCollectionResultsForReference:'Comments Collection Results For Reference', + TechnicalEvaluationResultsForReference:'Technical Evaluation Results For Reference', + ComplianceConfirmationRecord:'Compliance Confirmation Record', } \ No newline at end of file diff --git a/jero-web/src/common/lang/zh-cn.js b/jero-web/src/common/lang/zh-cn.js index e1658538f..b7195604f 100644 --- a/jero-web/src/common/lang/zh-cn.js +++ b/jero-web/src/common/lang/zh-cn.js @@ -394,6 +394,7 @@ module.exports = { whole: '全部', DocumentLibrary: '文档库', GeneralExportInformation:'常规导出信息', + CustomizeExportInformation:'自定义导出信息', DocumentComparisonLibrary: '文档对比库', weekly: '周报', SyncLibrary: '同步至文档库', @@ -1021,6 +1022,7 @@ module.exports = { closingDate: '截止日期', viewProcess: '查看流程', evaluationResults: '评估结果', + regulatoryTechnicalEvaluationResults:'法规技术评估结果', Assessor:'评估人', collectionOfRegulatoryOpinions:'法规意见收集', collectionOfRegulatoryOpinionsProcess:'法规意见收集流程', @@ -1063,6 +1065,7 @@ module.exports = { NcontrolType: '控件类型', NcontrolVerification: '控件校验', NcontrolAlternatives: '控件备选值', + DefaultValue: '默认值', NattachmentTemplate: '附件模板', Ntext: '文本', NDropdownradio: '下拉单选', @@ -1074,6 +1077,7 @@ module.exports = { Dtext: '下拉单选+附件', Etext:'下拉多选+附件', Ftext: '文本+下拉单选+附件', + Gtext: '标题', Nnothing: '无', Nchinese: '中文', NpositiveInteger: '整数', @@ -1110,4 +1114,45 @@ module.exports = { PreHomoNotification:'Pre-Homo通知', ValidationComplianceNotification:'验证符合性通知', RegulationTaskConfirmationNotification:'任务确认通知', + evaluationMethod:'评估方式', + uploadRelevantMaterials:'相关资料上传', + RelevantMaterials:'相关资料', + processBackground:'流程背景', + selectedStandard:'所选标准', + standardDecompositionDocument:'带入标准分解单', + pleaseSelectStandardFirst:'请先选择标准', + evaluatorFeedback:'评估人反馈', + nameTechnicalDocument:'技术文件名称', + chapter:'章节', + problemDescription:'问题说明', + filingExternalOpinions:'对外意见归档', + initiateProcessForCurrentStandard:'针对当前标准发起流程', + engineerFeedbackResults:'工程师反馈结果', + fileExport:'文件导出', + feedbackTime:'反馈时间', + regulatoryTechnologyAssessmentProcess:'法规技术评估流程', + feedbackEvaluation:'反馈评估', + clauseEvaluation:'条款评估', + standardDocuments:'标准文件', + pleaseCompleteTheEvaluationMethodorEvaluator:'请补全列表中评估方式或评估人', + reviewComments:'审核意见', + PleaseCompleteList:'请补全列表中符合性结果', + sponsorFeedback:'发起人反馈', + processNumber:'流程编号', + processName:'流程名称', + feedbackResults:'反馈结果', + theDoesNotSupportPreview:'当前文件格式不支持预览', + releaseSituation:'发布情况', + comparisonResults:'对比结果', + Published:'已发布', + initiateComparison:'发起对比', + translationLanguage:'翻译语言', + translationResults:'翻译结果', + conversionTime:'转换时间', + category:'类别', + RegulatoryProcessEvaluationResults :'法规流程评估结果', + ViewConformanceResults:'查看符合性结果', + CommentsCollectionResultsForReference:'意见收集结果参考', + TechnicalEvaluationResultsForReference:'技术评估结果参考', + ComplianceConfirmationRecord:'符合性确认记录', } \ No newline at end of file diff --git a/jero-web/src/components/CollectionType/index.vue b/jero-web/src/components/CollectionType/index.vue index 635d03811..94961b84c 100644 --- a/jero-web/src/components/CollectionType/index.vue +++ b/jero-web/src/components/CollectionType/index.vue @@ -96,6 +96,31 @@ + +
+
+
+ + + + + + + + + + + +
+ +
+
+
+
diff --git a/jero-web/src/components/ImportFile/index.vue b/jero-web/src/components/ImportFile/index.vue index 159975470..21d8893ef 100644 --- a/jero-web/src/components/ImportFile/index.vue +++ b/jero-web/src/components/ImportFile/index.vue @@ -120,7 +120,7 @@ }) } else { if (this.isTrue) { - this.$emit('getList') + this.$emit('getList',info.file.response.result) } else { eventBUs.$emit('searchReset') } diff --git a/jero-web/src/components/layouts/TabLayout.vue b/jero-web/src/components/layouts/TabLayout.vue index bd131a3ca..216d49f12 100644 --- a/jero-web/src/components/layouts/TabLayout.vue +++ b/jero-web/src/components/layouts/TabLayout.vue @@ -97,6 +97,10 @@ this.$route.path == '/handshakeProcess' || this.$route.path == '/projectStatusAndProgress' || this.$route.path == '/TaskPlanList' || + this.$route.path == '/evaluationProcess' || + this.$route.path == '/evaluationResultsClause' || + this.$route.path == '/evaluationResultsWhole' || + this.$route.path == '/evaluationInitiationProcess' || this.$route.path == '/historicalVersion' || this.$route.path == '/dashboard/analysis' || this.$route.path == '/processDetails') { diff --git a/jero-web/src/components/tableCollection/index.vue b/jero-web/src/components/tableCollection/index.vue index ab50d9fd6..34ab134c9 100644 --- a/jero-web/src/components/tableCollection/index.vue +++ b/jero-web/src/components/tableCollection/index.vue @@ -31,7 +31,7 @@ {{ (record.dataValue == null || record.dataValue == 'undefined')? '--': record.dataValue}} + @click='areaOfResponsibility(record)'>{{ (record.dataValue == null || record.dataValue == 'undefined')? '--': record.dataValue}} {{ (record.dataValue == null || record.dataValue == 'undefined')? '--': record.dataValue}} @@ -41,6 +41,23 @@ {{ (record.dataValue == null || record.dataValue == 'undefined')? '--': record.dataValue}} + + + + + {{ (record.dataValue == null || record.dataValue == 'undefined')? '--': record.dataValue }} + + + {{ (record.dataValue == null || record.dataValue == 'undefined')? '--': record.dataValue }} + + + + {{ (record.dataValue == null || record.dataValue == 'undefined')? '--': record.dataValue }} + + + @@ -95,6 +112,46 @@
+ + + + + + + + + + + + + + + + + + + + +
@@ -161,6 +218,10 @@ type: Object, default: true }, + queryParamQuery: { + type: Object, + default: true + }, currentPersonRole: { type: String, default: true @@ -232,6 +293,7 @@ sdt: 0, // 工程接口人 dre: 0, // 填写人 areaVisible: false, + areaVisiblezr:false, form: {}, rules: { querySdt: [ @@ -240,6 +302,13 @@ message: this.$t('PleaseSelect') + this.$t('engineeringInterfacePerson'), trigger: 'change' } + ], + queryzr: [ + { + required: true, + message: this.$t('PleaseSelect') + this.$t('areaOfResponsibility'), + trigger: 'change' + } ] }, wrapperCol: { @@ -294,8 +363,15 @@ onClickSee(val) { let _this = this this.areaVisibleView = true + let url = '' + if (this.$route.query.it === undefined) { + url = `/jero-boot/params/config/getById?id=${val.db_field_name}` + } else { + // 历史版本 + url = `/jero-boot/params/collectManifestHistory/getConfigById?id=${val.db_field_name}` + } axios({ - url: `/jero-boot/params/config/getById?id=${val.db_field_name}`, + url: url, method: 'get', transformRequest: [function(data) { let ret = '' @@ -312,8 +388,9 @@ .then((res) => { console.log(res) if (res.data.success) { - this.configDetail = res.data.result + this.configDetail = res.data.result || {} } else { + this.configDetail = {} _this.$message.warning(res.data.result) } }) @@ -334,6 +411,44 @@ } }) }, + // 责任领域 保存 + handleSubmitzr(record) { + let _this = this + let param = { dutyTerritory: this.Dateline.queryzr, ids: this.getquerySdtId,paramsManifestId: this.$route.query.id, } + this.$refs.ruleForm.validate(valid => { + if (valid) { + axios({ + url: '/jero-boot/params/collectManifest/updateDutyTerritory', + method: 'post', + data: param, + transformRequest: [function(data) { + let ret = '' + for (let it in data) { + ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&' + } + return ret + }], + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + 'X-Access-Token': _this.token + } + }) + .then((res) => { + console.log(res) + if (res.data.success) { + _this.$message.success(_this.$t('OperationSuccessful')) + _this.areaVisiblezr = false + this.getLoginUserType() + } else { + _this.$message.warning(_this.$t('operationFailed')) + } + }) + .catch((error) => { + console.log(error) + }) + } + }) + }, // 工程接口人 保存 handleSubmit(record) { let _this = this @@ -377,8 +492,12 @@ this.areaVisible = false this.$refs['ruleForm'].resetFields() }, + cancel(){ + this.areaVisiblezr = false + this.$refs['ruleForm'].resetFields() + }, // 点击工程接口人的详情人员 有权限 - ondataValueTobeinitiated(record) { + areaOfResponsibility(record) { this.areaVisible = true // this.$refs.ruleForm.clearValidate() this.$nextTick(() => { @@ -387,9 +506,22 @@ this.$refs.ruleForm.clearValidate() }) }, + // 点击责任领域的详情人员 有权限 + ondataValueTobe(record) { + this.areaVisiblezr = true + // this.$refs.ruleForm.clearValidate() + this.$nextTick(() => { + this.Dateline = { ...this.Dateline } + this.getquerySdtId = record.id + this.$refs.ruleForm.clearValidate() + }) + }, dataValueTobeinitiated() { this.$message.warning(this.$t('certifiedEngineer') + this.$t('and') + this.$t('Statusis') + this.$t('CollectionInitiated') + this.$t('ReturnedPerson') + this.$t('alteration') + this.$t('toHavePermission')) }, + dataValueTobe() { + this.$message.warning(this.$t('certifiedEngineer') + this.$t('and') + this.$t('Statusis') + this.$t('CollectionInitiated') + this.$t('ReturnedPerson') + this.$t('toHavePermission')) + }, // 点击工程接口人的详情人员 无权限 ondataValueNot() { this.$message.warning(this.$t('operatethisbutton')) @@ -479,9 +611,15 @@ sorter: res.sort, width: 160 }) + console.log(res) this.columns[index].scopedSlots = { customRender: 'titleName' } + if(res.click1){ + this.columns[index].scopedSlots = { + customRender: 'operationzr' + } + } if (res.click) { // 工程接口人列表修改 this.columns[index].scopedSlots = { @@ -499,14 +637,28 @@ console.log(pagination, filters, sorter, 'iiiiiiiiiiiiiiiii') }, getTableListReset() { + this.formInline = {} let params = { paramsManifestId: this.$route.query.id, - userTypes: this.currentPersonRole + pageNo: this.pageNo, + pageSize: this.pageSize, + // userTypes: this.currentPersonRole } + let url this.loading = true this.$emit('listReset', '') // todo - getAction(this.url.tableList, params).then((res) => { + if (this.$route.query.it === undefined) { + // 页面跳转 + url = this.url.tableList + params.paramsManifestId = this.$route.query.id + params.userTypes = this.currentPersonRole + } else { + // 历史版本 + url = 'params/collectManifestHistory/list' + params.paramsManifestId = this.$route.query.it + } + getAction(url, params).then((res) => { if (res.success) { let tt = [] if (this.currentPersonRole !== 'dre') { @@ -570,7 +722,8 @@ pageSize: this.pageSize, userTypes: this.currentPersonRole || currentPersonRole, paramsManifestId: paramsManifestid, - ...this.formInline + ...this.formInline, + ...currentPersonRole } this.loading = true getAction(url, params).then((res) => { diff --git a/jero-web/src/components/tableCollection/index1.vue b/jero-web/src/components/tableCollection/index1.vue index 0dc4b2e8e..2faa372e5 100644 --- a/jero-web/src/components/tableCollection/index1.vue +++ b/jero-web/src/components/tableCollection/index1.vue @@ -96,7 +96,7 @@
- +
{{$t('configurationName')}}: @@ -290,12 +290,16 @@ this.$emit('handlePreservation') this.getTableList() }, + hideModal(){ + this.areaVisibleView = false + }, // 查看配置详细信息 onClickSee(val) { + console.log(val) let _this = this this.areaVisibleView = true axios({ - url: `/jero-boot/params/config/getById?id=${val.db_field_name}`, + url: `/jero-boot/report/detail/getConfig?id=${val.db_field_name}`, method: 'get', transformRequest: [function(data) { let ret = '' diff --git a/jero-web/src/config/router.config.js b/jero-web/src/config/router.config.js index bbe11e197..648696c1d 100644 --- a/jero-web/src/config/router.config.js +++ b/jero-web/src/config/router.config.js @@ -342,6 +342,21 @@ export const constantRouterMap = [ name: 'initiatingProcess', component: () => import(/* webpackChunkName: "user" */ '@/views/businessSupport/collectionOfRegulatoryOpinions/components/initiatingProcess') }, + { + path: '/evaluationInitiationProcess', + name: 'evaluationInitiationProcess', + component: () => import(/* webpackChunkName: "user" */ '@/views/businessSupport/technologyAssessment/components/initiatingProcess') + }, + { + path: '/evaluationResultsWhole', + name: 'evaluationResultsWhole', + component: () => import(/* webpackChunkName: "user" */ '@/views/businessSupport/technologyAssessment/components/evaluationResultsWhole') + }, + { + path: '/evaluationResultsClause', + name: 'evaluationResultsClause', + component: () => import(/* webpackChunkName: "user" */ '@/views/businessSupport/technologyAssessment/components/evaluationResultsClause') + }, // { // path: '/ParameterItemCollection', // name: 'ParameterItemCollection', @@ -362,6 +377,11 @@ export const constantRouterMap = [ name: 'taskListProcess', component: () => import(/* webpackChunkName: "user" */ '@/views/processCenter/processForm/taskListProcess/index') }, + { + path: '/evaluationProcess', + name: 'evaluationProcess', + component: () => import(/* webpackChunkName: "user" */ '@/views/processCenter/processForm/evaluationProcess/index') + }, { path: '/handshakeProcess', name: 'handshakeProcess', diff --git a/jero-web/src/views/businessSupport/collectionOfRegulatoryOpinions/components/evaluationResultsList.vue b/jero-web/src/views/businessSupport/collectionOfRegulatoryOpinions/components/evaluationResultsList.vue index fb1d93dfa..60fa6094d 100644 --- a/jero-web/src/views/businessSupport/collectionOfRegulatoryOpinions/components/evaluationResultsList.vue +++ b/jero-web/src/views/businessSupport/collectionOfRegulatoryOpinions/components/evaluationResultsList.vue @@ -44,13 +44,13 @@ />
- 对外意见归档: -
{{$t('filingExternalOpinions')}}: +
{{$t('clickUpload')}}
-
+
{{$t('viewFile')}}
@@ -92,6 +92,7 @@ title: this.$t('relevantSections'), align: 'center', dataIndex: 'relatedSection', + ellipsis: true, width: 180 }, { @@ -177,11 +178,13 @@ //导出 handleExport() { let query = { + pageSize:this.pageSize, + pageNo:this.pageNo, lawsOpinionGatherId: this.lawsOpinionGatherId, actiProcInstId: this.actiProcInstId } downloadFile('/lawsOpinionGather/lawsOpinionAssessmentResultEO/exportXls', - this.$t('evaluationResults') + '.xls', query) + this.$t('evaluationResults') + '.zip', query) }, getData(row) { this.visible = true @@ -206,7 +209,9 @@ getList() { let query = { lawsOpinionGatherId: this.lawsOpinionGatherId, - actiProcInstId: this.actiProcInstId + actiProcInstId: this.actiProcInstId, + pageSize:this.pageSize, + pageNo:this.pageNo } this.loading = true getAction('/lawsOpinionGather/lawsOpinionAssessmentResultEO/page', query).then((res) => { diff --git a/jero-web/src/views/businessSupport/collectionOfRegulatoryOpinions/components/initiatingProcess.vue b/jero-web/src/views/businessSupport/collectionOfRegulatoryOpinions/components/initiatingProcess.vue index 4c8e45171..c7e910665 100644 --- a/jero-web/src/views/businessSupport/collectionOfRegulatoryOpinions/components/initiatingProcess.vue +++ b/jero-web/src/views/businessSupport/collectionOfRegulatoryOpinions/components/initiatingProcess.vue @@ -260,9 +260,11 @@ this.selectedRowKeys = value if (this.selectedRowKeys.length > 1) { this.selectedRowKeys.shift() - record.shift() } - this.selectedRowKeysRecord = record + this.selectedRowKeysRecord = record.filter(res=>{ + return res.id == this.selectedRowKeys[0] + }) + this.selectedRowKeysRecord = [...this.selectedRowKeysRecord] }, clickButtonToUpload(item) { this.$refs.uploadFile.perentHandleFunc() diff --git a/jero-web/src/views/businessSupport/collectionOfRegulatoryOpinions/index.vue b/jero-web/src/views/businessSupport/collectionOfRegulatoryOpinions/index.vue index 5955cfc03..e342a2161 100644 --- a/jero-web/src/views/businessSupport/collectionOfRegulatoryOpinions/index.vue +++ b/jero-web/src/views/businessSupport/collectionOfRegulatoryOpinions/index.vue @@ -168,7 +168,7 @@ align: 'center', width: 170, ellipsis: true, - dataIndex: 'technologyTerritory' + dataIndex: 'technologyTerritoryName' }, { title: this.$t('collectResults'), diff --git a/jero-web/src/views/businessSupport/regulationReport/components/RegulationMonthlyManagement.vue b/jero-web/src/views/businessSupport/regulationReport/components/RegulationMonthlyManagement.vue index e92a7a565..b10d4c466 100644 --- a/jero-web/src/views/businessSupport/regulationReport/components/RegulationMonthlyManagement.vue +++ b/jero-web/src/views/businessSupport/regulationReport/components/RegulationMonthlyManagement.vue @@ -26,10 +26,10 @@ {{$t('uploadMonthly')}}
-
- - {{$t('BatchDelete')}} -
+ + + +
{{text == 1?$t('chinese'):$t('English')}} + + {{text}} + {{record.issueStatus == 2 ? $t('release') : $t('withdraw')}} {{$t('deleteLib')}} + {{$t('download')}}
@@ -75,7 +83,9 @@ + + \ No newline at end of file diff --git a/jero-web/src/views/businessSupport/technologyAssessment/components/evaluationResultsClause.vue b/jero-web/src/views/businessSupport/technologyAssessment/components/evaluationResultsClause.vue new file mode 100644 index 000000000..b9b258dad --- /dev/null +++ b/jero-web/src/views/businessSupport/technologyAssessment/components/evaluationResultsClause.vue @@ -0,0 +1,440 @@ + + + + + + \ No newline at end of file diff --git a/jero-web/src/views/businessSupport/technologyAssessment/components/evaluationResultsWhole.vue b/jero-web/src/views/businessSupport/technologyAssessment/components/evaluationResultsWhole.vue new file mode 100644 index 000000000..7c54837f7 --- /dev/null +++ b/jero-web/src/views/businessSupport/technologyAssessment/components/evaluationResultsWhole.vue @@ -0,0 +1,288 @@ + + + + + + \ No newline at end of file diff --git a/jero-web/src/views/businessSupport/technologyAssessment/components/initiatingProcess.vue b/jero-web/src/views/businessSupport/technologyAssessment/components/initiatingProcess.vue new file mode 100644 index 000000000..09874fbdd --- /dev/null +++ b/jero-web/src/views/businessSupport/technologyAssessment/components/initiatingProcess.vue @@ -0,0 +1,688 @@ + + + + + \ No newline at end of file diff --git a/jero-web/src/views/businessSupport/technologyAssessment/components/processInformation.vue b/jero-web/src/views/businessSupport/technologyAssessment/components/processInformation.vue new file mode 100644 index 000000000..e5eb0a45a --- /dev/null +++ b/jero-web/src/views/businessSupport/technologyAssessment/components/processInformation.vue @@ -0,0 +1,141 @@ + + + + + \ No newline at end of file diff --git a/jero-web/src/views/businessSupport/technologyAssessment/components/standardDecompositionSheet.vue b/jero-web/src/views/businessSupport/technologyAssessment/components/standardDecompositionSheet.vue new file mode 100644 index 000000000..0496bf0a7 --- /dev/null +++ b/jero-web/src/views/businessSupport/technologyAssessment/components/standardDecompositionSheet.vue @@ -0,0 +1,313 @@ + + + + + \ No newline at end of file diff --git a/jero-web/src/views/businessSupport/technologyAssessment/index.vue b/jero-web/src/views/businessSupport/technologyAssessment/index.vue new file mode 100644 index 000000000..6521ae1c7 --- /dev/null +++ b/jero-web/src/views/businessSupport/technologyAssessment/index.vue @@ -0,0 +1,457 @@ + + + + + + \ No newline at end of file diff --git a/jero-web/src/views/dashboard/components/monthlyReportRegulations.vue b/jero-web/src/views/dashboard/components/monthlyReportRegulations.vue index 5f005c4e8..b70c93ce8 100644 --- a/jero-web/src/views/dashboard/components/monthlyReportRegulations.vue +++ b/jero-web/src/views/dashboard/components/monthlyReportRegulations.vue @@ -2,60 +2,98 @@
{{this.$t('monthlyReportRegulations')}}
-
+
More
-
-
+
+
{{item.name}}
-
{{item.time}}
+
{{item.createTime}}
+
+ +
+ {{$t('dataLoading')}}
\ No newline at end of file diff --git a/jero-web/src/views/documentTools/documentTranslation/index.vue b/jero-web/src/views/documentTools/documentTranslation/index.vue new file mode 100644 index 000000000..28593c4e6 --- /dev/null +++ b/jero-web/src/views/documentTools/documentTranslation/index.vue @@ -0,0 +1,330 @@ + + + + \ No newline at end of file diff --git a/jero-web/src/views/parameter/managementdetails/commponts/customexportmodle.vue b/jero-web/src/views/parameter/managementdetails/commponts/customexportmodle.vue index 550f1e191..c413fbf9e 100644 --- a/jero-web/src/views/parameter/managementdetails/commponts/customexportmodle.vue +++ b/jero-web/src/views/parameter/managementdetails/commponts/customexportmodle.vue @@ -17,6 +17,7 @@
+ * {{$t('configure')}}
@@ -41,14 +42,23 @@
+ * {{$t('CustomTemplateName')}}
- - + + + + {{ mode.label }} + + + + + + +
@@ -87,6 +97,7 @@ export default { confirmLoading: false, description:false, dictOptions:[], + exportTemplatetOptions:[], visible: false, required:false, disabled:false, @@ -110,8 +121,8 @@ export default { description:[ { min:1, max: 200, message: this.$t('cantExeed')+'200'+this.$t('characters'), trigger: 'blur' }, ], - status: [ - { required: true, message: this.$t('PleaseSelect')+this.$t('status'), trigger: 'change' }, + exportTemplateId: [ + { required: true, message: this.$t('PleaseSelect')+this.$t('CustomTemplateName'), trigger: 'change' }, ], fileConnectId: [ { required: true, message: this.$t('PleaseSelect')+this.$t('attachmentTemplate'), trigger: 'change' }, @@ -160,9 +171,9 @@ export default { this.visible = true this.title = this.$t('CustomExport') this.formInline = {} - this.formInline.separator = ',' this.formInline = {...this.formInline} this.getConfigure() + this.getexportTemplateId() this.$nextTick(() => { this.$refs['ruleForm'].clearValidate() @@ -172,7 +183,7 @@ export default { let pram = { paramsManifestId: this.$route.query.id } - getAction('report/detail/getConfigLabelList', pram).then((res) => { + getAction('report/detail/getConfigLabelListCustom', pram).then((res) => { if (res.success) { console.log(res.result) this.dictOptions = res.result @@ -181,6 +192,16 @@ export default { } }) }, + getexportTemplateId(){ + getAction('report/detail/getTemplateLabelList', {}).then((res) => { + if (res.success) { + console.log(res.result) + this.exportTemplatetOptions = res.result + } else { + // this.$refs.uploadFile.perentHandleFunc() + } + }) + }, editModel(value) { this.visible = true this.title = '编辑' @@ -213,17 +234,17 @@ export default { let url = this.url.ConventionalExport let Action = getAction let query = JSON.parse(JSON.stringify(this.formInline)) - Object.keys(query).forEach(res => { - if (query[res] && query[res] instanceof Array) { - query[res] = query[res].join(',') - } - }) - if(this.contentListStart){ - query.certCategoryName = this.contentListStart - } + // Object.keys(query).forEach(res => { + // if (query[res] && query[res] instanceof Array) { + // query[res] = query[res].join(',') + // } + // }) + // if(this.contentListStart){ + // query.certCategoryName = this.contentListStart + // } query.paramsManifestId = this.$route.query.id this.confirmLoading = true - downloadFile('report/detail/exportNormal', this.$t('GeneralExportInformation')+'.zip', query) + downloadFile('report/detail/exportCustom', this.$t('CustomizeExportInformation')+'.zip', query) this.confirmLoading = false } }) diff --git a/jero-web/src/views/parameter/managementdetails/index.vue b/jero-web/src/views/parameter/managementdetails/index.vue index 6dc973175..3dc497d98 100644 --- a/jero-web/src/views/parameter/managementdetails/index.vue +++ b/jero-web/src/views/parameter/managementdetails/index.vue @@ -1,4 +1,5 @@ diff --git a/jero-web/src/views/processCenter/processForm/regulatoryProcess/index.vue b/jero-web/src/views/processCenter/processForm/regulatoryProcess/index.vue index 165d6d740..29935870b 100644 --- a/jero-web/src/views/processCenter/processForm/regulatoryProcess/index.vue +++ b/jero-web/src/views/processCenter/processForm/regulatoryProcess/index.vue @@ -134,7 +134,7 @@ }, preservation() { this.loading = true - let dataList = this.$refs.feedbackInformationRef.dataList + let dataList = this.$refs.feedbackInformationRef.formInline.dataList this.insertBatch(dataList, 1) }, insertBatch(list, num) { @@ -142,13 +142,13 @@ res.lawsOpinionGatherId = this.queryProject.id res.actiProcInstId = this.$route.query.prcId }) - postAction('/lawsOpinionGather/lawsOpinionAssessmentResultEO/insertBatch', { dataList:list }).then((res) => { + postAction('/lawsOpinionGather/lawsOpinionAssessmentResultEO/insertBatch', { dataList: list }).then((res) => { if (res.success) { if (num == 1) { this.$message.success(this.$t('OperationSuccessful')) - this.$router.push({ - path: '/collectionOfRegulatoryOpinions' - }) + // this.$router.push({ + // path: '/collectionOfRegulatoryOpinions' + // }) this.loading = false } else { this.completeTask() @@ -162,8 +162,12 @@ }) }, submit() { - let dataList = this.$refs.feedbackInformationRef.dataList - this.insertBatch(dataList, 2) + this.$refs.feedbackInformationRef.submitData((res) => { + this.loading = true + this.insertBatch(res, 2) + }) + // let dataList = this.$refs.feedbackInformationRef.formInline.dataList + // this.insertBatch(dataList, 2) }, completeTask() { let query = { diff --git a/jero-web/src/views/processCenter/processList/tabComponents/alreadyProcess/index.vue b/jero-web/src/views/processCenter/processList/tabComponents/alreadyProcess/index.vue index cacd6f524..00d243eb9 100644 --- a/jero-web/src/views/processCenter/processList/tabComponents/alreadyProcess/index.vue +++ b/jero-web/src/views/processCenter/processList/tabComponents/alreadyProcess/index.vue @@ -51,7 +51,8 @@ selectedRowKeys: [], prcTypeName: { 1: this.$t('taskConfirmationProcess'), - 5:this.$t('collectionOfRegulatoryOpinionsProcess') + 5:this.$t('collectionOfRegulatoryOpinionsProcess'), + 6:this.$t('regulatoryTechnologyAssessmentProcess') }, columns: [ { diff --git a/jero-web/src/views/processCenter/processList/tabComponents/alreadySend/index.vue b/jero-web/src/views/processCenter/processList/tabComponents/alreadySend/index.vue index a9f08e126..de39cef91 100644 --- a/jero-web/src/views/processCenter/processList/tabComponents/alreadySend/index.vue +++ b/jero-web/src/views/processCenter/processList/tabComponents/alreadySend/index.vue @@ -52,7 +52,8 @@ selectedRowKeys: [], prcTypeName: { 1: this.$t('taskConfirmationProcess'), - 5:this.$t('collectionOfRegulatoryOpinionsProcess') + 5:this.$t('collectionOfRegulatoryOpinionsProcess'), + 6:this.$t('regulatoryTechnologyAssessmentProcess') }, columns: [ { diff --git a/jero-web/src/views/processCenter/processList/tabComponents/monitorProcess/index.vue b/jero-web/src/views/processCenter/processList/tabComponents/monitorProcess/index.vue index 848dcfc44..5df28512c 100644 --- a/jero-web/src/views/processCenter/processList/tabComponents/monitorProcess/index.vue +++ b/jero-web/src/views/processCenter/processList/tabComponents/monitorProcess/index.vue @@ -52,7 +52,8 @@ selectedRowKeys: [], prcTypeName: { 1: this.$t('taskConfirmationProcess'), - 5:this.$t('collectionOfRegulatoryOpinionsProcess') + 5:this.$t('collectionOfRegulatoryOpinionsProcess'), + 6:this.$t('regulatoryTechnologyAssessmentProcess') }, columns: [ { diff --git a/jero-web/src/views/processCenter/processList/tabComponents/processCenter/index.vue b/jero-web/src/views/processCenter/processList/tabComponents/processCenter/index.vue index e3981099f..8e318e4f8 100644 --- a/jero-web/src/views/processCenter/processList/tabComponents/processCenter/index.vue +++ b/jero-web/src/views/processCenter/processList/tabComponents/processCenter/index.vue @@ -50,7 +50,8 @@ selectedRowKeys: [], prcTypeName: { 1: this.$t('taskConfirmationProcess'), - 5:this.$t('collectionOfRegulatoryOpinionsProcess') + 5:this.$t('collectionOfRegulatoryOpinionsProcess'), + 6:this.$t('regulatoryTechnologyAssessmentProcess') }, columns: [ { @@ -154,8 +155,8 @@ }) }, dealWith(row) { - let index = row.taskIds.lastIndexOf(',') - row.taskIds = row.taskIds.slice(0, index) + // let index = row.taskIds.lastIndexOf(',') + // row.taskIds = row.taskIds.slice(0, index) if (row.prcType == '1') { let newUrl = this.$router.resolve({ path: '/handshakeProcess', @@ -168,6 +169,12 @@ query: row }) window.open(newUrl.href, '_blank') + } else if (row.prcType == '6') { + let newUrl = this.$router.resolve({ + path: '/evaluationProcess', + query: row + }) + window.open(newUrl.href, '_blank') } }, onChange(page, pageSize) { diff --git a/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue b/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue index a81744a55..73f000e8c 100644 --- a/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue +++ b/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue @@ -20,8 +20,8 @@
{{$t('newNiONumber')}}
- +
@@ -29,21 +29,21 @@
{{$t('ParameterName')}}
- -
- - -
-
- {{$t('certificationCategory')}} -
- +
+ + + + + + + + + + +
@@ -60,33 +60,38 @@
{{$t('completedBy')}}
- -
- - -
-
- {{$t('status')}} -
- - - - {{ item.name}} - - - +
+ + + + + + + + + + + + + + + + + + + + + + {{$t('query')}} {{$t('reset')}} @@ -187,7 +192,7 @@
{ if (this.currentPersonRole == 'dre') { this.handlePreservation() @@ -740,6 +773,20 @@ return flag } }, + // 高级搜索 + handleSuperQuery(params, matchType) { + let sqp = {} + if (!params || (params && params.length == 0)) { + sqp['superQueryParams'] = '' + this.$refs.globalAdvancedQueryRef.superQueryFlag = false + } else { + this.$refs.globalAdvancedQueryRef.superQueryFlag = true + sqp['superQueryParams'] = encodeURI(JSON.stringify(params)) + sqp['superQueryMatchType'] = matchType + } + this.queryParamQuery = sqp + this.$refs.CollectionTabel.getTableList(this.queryParamQuery) + }, // 认证工程师 批量删除 权限 // 仅仅状态为 待发起收集 工程接口人退回 变更 可以批量删除 homoJurisdictionBatchdelete() { @@ -1133,11 +1180,12 @@ selectedRowKeysValue.push(res) } }) + console.log(selectedRowKeysValue) for (let i = 0; i < selectedRowKeysValue.length; i++) { let postDateobj = {} let itemIn = Object.keys(selectedRowKeysValue[i]) for (let j = 0; j < itemIn.length; j++) { - if (itemIn[j] !== 'sdt') { + if (itemIn[j] !== 'sdt' && selectedRowKeysValue[i][itemIn[j]].list) { if (selectedRowKeysValue[i][itemIn[j]] instanceof Object && !(selectedRowKeysValue[i][itemIn[j]] instanceof Array)) { postDateobj[itemIn[j]] = selectedRowKeysValue[i][itemIn[j]] for (let k = 0; k < selectedRowKeysValue[i][itemIn[j]].list.length; k++) { @@ -1196,7 +1244,7 @@ let postDateobj = {} let itemIn = Object.keys(selectedRowKeysValue[i]) for (let j = 0; j < itemIn.length; j++) { - if (itemIn[j] !== 'sdt') { + if (itemIn[j] !== 'sdt' && selectedRowKeysValue[i][itemIn[j]].list) { if (selectedRowKeysValue[i][itemIn[j]] instanceof Object && !(selectedRowKeysValue[i][itemIn[j]] instanceof Array)) { postDateobj[itemIn[j]] = selectedRowKeysValue[i][itemIn[j]] for (let k = 0; k < selectedRowKeysValue[i][itemIn[j]].list.length; k++) { @@ -1391,7 +1439,10 @@ this.$refs.CollectionTabel.getTableList() }, searchReset() { + this.formInline = {} this.$refs.CollectionTabel.getTableListReset() + this.$refs.globalAdvancedQueryRef.handleReset() + // this.$refs.globalAdvancedQueryRef.emitCallback() }, // 批量删除 -- 与下发收集一致 handleDelJurisdiction() { diff --git a/jero-web/src/views/regulationsKanban/components/addModel.vue b/jero-web/src/views/regulationsKanban/components/addModel.vue new file mode 100644 index 000000000..6039934a4 --- /dev/null +++ b/jero-web/src/views/regulationsKanban/components/addModel.vue @@ -0,0 +1,382 @@ + + + + + + \ No newline at end of file diff --git a/jero-web/src/views/regulationsKanban/index.vue b/jero-web/src/views/regulationsKanban/index.vue new file mode 100644 index 000000000..37e7d1b14 --- /dev/null +++ b/jero-web/src/views/regulationsKanban/index.vue @@ -0,0 +1,452 @@ + + + + +