Merge remote-tracking branch 'origin/dev_third_stage' into dev_third_stage
@@ -824,21 +824,21 @@ CREATE TABLE `sar_file_compare_res_comment` (
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
-- 法规技术评估-条款信息评估结果表 字段增加长度 2022-08-08
|
||||
-- 法规技术评估-条款信息评估结果表 字段增加长度 2022-08-11 已同步生产环境
|
||||
ALTER TABLE `laws_weilai`.`laws_technology_evaluation_item_result`
|
||||
MODIFY COLUMN `technical_file_name` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '技术文件名称' AFTER `evaluation_methods`,
|
||||
MODIFY COLUMN `section` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '章节' AFTER `technical_file_name`;
|
||||
-- 问题知识库 字段长度修改 2022-08-08
|
||||
-- 问题知识库 字段长度修改 2022-08-11 已同步生产环境
|
||||
ALTER TABLE `laws_weilai`.`problem_knowledge_base`
|
||||
MODIFY COLUMN `buss_document_library_id` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文档库id' AFTER `target_market`,
|
||||
MODIFY COLUMN `stand_number` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标准编号' AFTER `buss_document_library_id`,
|
||||
MODIFY COLUMN `stand_title` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标准标题' AFTER `stand_number`;
|
||||
|
||||
-- 问题知识库 字段类型修改 2022-08-09
|
||||
-- 问题知识库 字段类型修改 2022-08-11 已同步生产环境
|
||||
ALTER TABLE `laws_weilai`.`problem_knowledge_base`
|
||||
MODIFY COLUMN `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '内容(正文)' AFTER `stand_title`;
|
||||
|
||||
-- 国家与国旗关系表 2022-08-09
|
||||
-- 国家与国旗关系表 2022-08-11 已同步生产环境
|
||||
CREATE TABLE `laws_weilai`.`country_national_flag` (
|
||||
`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 '创建人',
|
||||
@@ -852,7 +852,7 @@ CREATE TABLE `laws_weilai`.`country_national_flag` (
|
||||
`national_flag_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '国旗url',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '国家与国旗中间表' ROW_FORMAT = Dynamic;
|
||||
-- 初始化数据 2022-08-10
|
||||
-- 初始化数据 2022-08-11 已同步生产环境
|
||||
INSERT INTO `laws_weilai`.`country_national_flag` (`id`, `create_by`, `create_time`, `update_by`, `update_time`, `sys_org_code`, `country_name_cn`, `country_name_en`, `national_flag_id`, `national_flag_url`) VALUES ('1', NULL, NULL, NULL, NULL, NULL, '欧盟', 'EU', NULL, '/jero-boot/nationalFlag/EU.png');
|
||||
INSERT INTO `laws_weilai`.`country_national_flag` (`id`, `create_by`, `create_time`, `update_by`, `update_time`, `sys_org_code`, `country_name_cn`, `country_name_en`, `national_flag_id`, `national_flag_url`) VALUES ('10', NULL, NULL, NULL, NULL, NULL, '美国', 'US', NULL, '/jero-boot/nationalFlag/US.png');
|
||||
INSERT INTO `laws_weilai`.`country_national_flag` (`id`, `create_by`, `create_time`, `update_by`, `update_time`, `sys_org_code`, `country_name_cn`, `country_name_en`, `national_flag_id`, `national_flag_url`) VALUES ('11', NULL, NULL, NULL, NULL, NULL, '澳大利亚', 'Australia', NULL, '/jero-boot/nationalFlag/Australia.png');
|
||||
@@ -867,22 +867,22 @@ INSERT INTO `laws_weilai`.`country_national_flag` (`id`, `create_by`, `create_ti
|
||||
INSERT INTO `laws_weilai`.`country_national_flag` (`id`, `create_by`, `create_time`, `update_by`, `update_time`, `sys_org_code`, `country_name_cn`, `country_name_en`, `national_flag_id`, `national_flag_url`) VALUES ('8', NULL, NULL, NULL, NULL, NULL, '海湾地区', 'GCC', NULL, '海湾地区.jpg');
|
||||
INSERT INTO `laws_weilai`.`country_national_flag` (`id`, `create_by`, `create_time`, `update_by`, `update_time`, `sys_org_code`, `country_name_cn`, `country_name_en`, `national_flag_id`, `national_flag_url`) VALUES ('9', NULL, NULL, NULL, NULL, NULL, '阿联酋', 'UAE', NULL, '/jero-boot/nationalFlag/UAE.png');
|
||||
|
||||
-- 法规意见收集-评估结果表字段长度调整 2022-08-11
|
||||
-- 法规意见收集-评估结果表字段长度调整 2022-08-11 已同步生产环境
|
||||
ALTER TABLE `laws_weilai`.`laws_opinion_assessment_result`
|
||||
MODIFY COLUMN `related_section` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '相关章节' AFTER `laws_opinion_gather_id`,
|
||||
MODIFY COLUMN `issue_or_suggest` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '问题/建议' AFTER `related_section`;
|
||||
-- 法规技术评估-评估结果表 字段长度调整 2022-08-11
|
||||
-- 法规技术评估-评估结果表 字段长度调整 2022-08-11 已同步生产环境
|
||||
ALTER TABLE `laws_weilai`.`laws_technology_evaluation_result`
|
||||
MODIFY COLUMN `issue_or_suggest` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '问题/建议' AFTER `related_section`,
|
||||
MODIFY COLUMN `reason` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '理由' AFTER `issue_or_suggest`;
|
||||
|
||||
|
||||
-- 展示区域 英文修改 2022-08-11
|
||||
-- 展示区域 英文修改 2022-08-11 已同步生产环境
|
||||
UPDATE `laws_weilai`.`onl_cgform_area` SET `en_name` = 'Relevant Information' WHERE `id` = '1492408622838222850';
|
||||
UPDATE `laws_weilai`.`onl_cgform_area` SET `en_name` = 'General Information' WHERE `id` = '1499657602378825729';
|
||||
UPDATE `laws_weilai`.`onl_cgform_area` SET `en_name` = 'Document Files' WHERE `id` = '1499658880093847553';
|
||||
|
||||
-- 数据字典 英文修改 2022-08-11
|
||||
-- 数据字典 英文修改 2022-08-11 已同步生产环境
|
||||
-- 同步情况 sync_state
|
||||
UPDATE `laws_weilai`.`sys_dict_item` SET `en_name` = 'No' WHERE `id` = '1507311752583352322';
|
||||
UPDATE `laws_weilai`.`sys_dict_item` SET `en_name` = 'Yes' WHERE `id` = '1507311835571851265';
|
||||
@@ -899,7 +899,7 @@ UPDATE `laws_weilai`.`sys_dict_item` SET `en_name` = 'Development' WHERE `id` =
|
||||
UPDATE `laws_weilai`.`sys_dict_item` SET `en_name` = 'Production' WHERE `id` = '1513769467044179970';
|
||||
|
||||
|
||||
-- 表字段 英文修改 2022-08-11
|
||||
-- 表字段 英文修改 2022-08-11 已同步生产环境
|
||||
-- OCR识别转换记录表
|
||||
UPDATE `laws_weilai`.`onl_cgform_field` SET `db_field_en_name` = 'Conversion Result' WHERE `id` = '6b29f1c0e03533bb380c5ead03195785';
|
||||
UPDATE `laws_weilai`.`onl_cgform_field` SET `db_field_en_name` = 'Conversion Time' WHERE `id` = '85894f5ad04de66ccf45ebd96c97b534';
|
||||
@@ -917,13 +917,35 @@ UPDATE `laws_weilai`.`onl_cgform_field` SET `db_field_en_name` = 'Item No.' WHER
|
||||
UPDATE `laws_weilai`.`onl_cgform_field` SET `db_field_en_name` = 'Item Name' WHERE `id` = '9e91b704de198ccf2f5fb7297e675404';
|
||||
UPDATE `laws_weilai`.`onl_cgform_field` SET `db_field_en_name` = 'Item Content' WHERE `id` = '120a92b6d595c2fd68d2b90278357ce4';
|
||||
UPDATE `laws_weilai`.`onl_cgform_field` SET `db_field_en_name` = 'Technical Field' WHERE `id` = 'ccf68e6578a0a446a6ac34018f0a477d';
|
||||
-- 文档库信息表 2022-08-12
|
||||
-- 文档库信息表 2022-08-12 已同步生产环境
|
||||
UPDATE `laws_weilai`.`onl_cgform_field` SET `db_field_en_name` = 'Standard Type' WHERE `id` = '441588d80cc31ce68fbdf2ce8b36f93c';
|
||||
UPDATE `laws_weilai`.`onl_cgform_field` SET `db_field_en_name` = 'Area' WHERE `id` = '9f82d58f22a12792a53e202d64a39f06';
|
||||
-- 参数项收集清单 2022-08-12
|
||||
-- 参数项收集清单 2022-08-12 已同步生产环境
|
||||
UPDATE `laws_weilai`.`onl_cgform_field` SET `db_field_en_name` = 'Para Batch' WHERE `id` = '161c35a16e92682972dd1aeb26151fa2';
|
||||
UPDATE `laws_weilai`.`onl_cgform_field` SET `db_field_en_name` = 'Para Name' WHERE `id` = 'e586bd87d4d826ce3d7d373caf54c6f6';
|
||||
UPDATE `laws_weilai`.`onl_cgform_field` SET `db_field_en_name` = 'Status' WHERE `id` = '9050dc65a7b2fe82927b74a9ef4a4bb4';
|
||||
UPDATE `laws_weilai`.`onl_cgform_field` SET `db_field_en_name` = 'Responsible Field' WHERE `id` = 'ed57f77975218560b37ea497a20109c6';
|
||||
UPDATE `laws_weilai`.`onl_cgform_field` SET `db_field_en_name` = 'Filled by' WHERE `id` = 'a371f6d49781c0921a48f317d1ba69b6';
|
||||
UPDATE `laws_weilai`.`onl_cgform_field` SET `db_field_en_name` = 'Eng. Interface' WHERE `id` = '58c3d5a50c86be19d5ab0cd5ac4d6d8b';
|
||||
|
||||
-- 国家国旗表 增加旗帜 2022-08-16
|
||||
INSERT INTO `laws_weilai`.`country_national_flag` (`id`, `create_by`, `create_time`, `update_by`, `update_time`, `sys_org_code`, `country_name_cn`, `country_name_en`, `national_flag_id`, `national_flag_url`) VALUES ('14', NULL, NULL, NULL, NULL, NULL, '海湾地区', 'GCC', NULL, '/jero-boot/nationalFlag/GCC.png');
|
||||
INSERT INTO `laws_weilai`.`country_national_flag` (`id`, `create_by`, `create_time`, `update_by`, `update_time`, `sys_org_code`, `country_name_cn`, `country_name_en`, `national_flag_id`, `national_flag_url`) VALUES ('15', NULL, NULL, NULL, NULL, NULL, '巴西', 'Brazil', NULL, '/jero-boot/nationalFlag/Brazil.png');
|
||||
INSERT INTO `laws_weilai`.`country_national_flag` (`id`, `create_by`, `create_time`, `update_by`, `update_time`, `sys_org_code`, `country_name_cn`, `country_name_en`, `national_flag_id`, `national_flag_url`) VALUES ('16', NULL, NULL, NULL, NULL, NULL, '德国', 'Germany', NULL, '/jero-boot/nationalFlag/Germany.png');
|
||||
INSERT INTO `laws_weilai`.`country_national_flag` (`id`, `create_by`, `create_time`, `update_by`, `update_time`, `sys_org_code`, `country_name_cn`, `country_name_en`, `national_flag_id`, `national_flag_url`) VALUES ('17', NULL, NULL, NULL, NULL, NULL, '俄国', 'Russia', NULL, '/jero-boot/nationalFlag/Russia.png');
|
||||
INSERT INTO `laws_weilai`.`country_national_flag` (`id`, `create_by`, `create_time`, `update_by`, `update_time`, `sys_org_code`, `country_name_cn`, `country_name_en`, `national_flag_id`, `national_flag_url`) VALUES ('18', NULL, NULL, NULL, NULL, NULL, '菲律宾', 'Philippines', NULL, '/jero-boot/nationalFlag/Philippines.png');
|
||||
INSERT INTO `laws_weilai`.`country_national_flag` (`id`, `create_by`, `create_time`, `update_by`, `update_time`, `sys_org_code`, `country_name_cn`, `country_name_en`, `national_flag_id`, `national_flag_url`) VALUES ('19', NULL, NULL, NULL, NULL, NULL, '加拿大', 'Canada', NULL, '/jero-boot/nationalFlag/Canada.png');
|
||||
INSERT INTO `laws_weilai`.`country_national_flag` (`id`, `create_by`, `create_time`, `update_by`, `update_time`, `sys_org_code`, `country_name_cn`, `country_name_en`, `national_flag_id`, `national_flag_url`) VALUES ('20', NULL, NULL, NULL, NULL, NULL, '墨西哥', 'Mexico', NULL, '/jero-boot/nationalFlag/Mexico.png');
|
||||
INSERT INTO `laws_weilai`.`country_national_flag` (`id`, `create_by`, `create_time`, `update_by`, `update_time`, `sys_org_code`, `country_name_cn`, `country_name_en`, `national_flag_id`, `national_flag_url`) VALUES ('21', NULL, NULL, NULL, NULL, NULL, '挪威', 'Norway', NULL, '/jero-boot/nationalFlag/Norway.png');
|
||||
INSERT INTO `laws_weilai`.`country_national_flag` (`id`, `create_by`, `create_time`, `update_by`, `update_time`, `sys_org_code`, `country_name_cn`, `country_name_en`, `national_flag_id`, `national_flag_url`) VALUES ('22', NULL, NULL, NULL, NULL, NULL, '泰国', 'Thailand', NULL, '/jero-boot/nationalFlag/Thailand.png');
|
||||
INSERT INTO `laws_weilai`.`country_national_flag` (`id`, `create_by`, `create_time`, `update_by`, `update_time`, `sys_org_code`, `country_name_cn`, `country_name_en`, `national_flag_id`, `national_flag_url`) VALUES ('23', NULL, NULL, NULL, NULL, NULL, '印度', 'Hindustan', NULL, '/jero-boot/nationalFlag/Hindustan.png');
|
||||
INSERT INTO `laws_weilai`.`country_national_flag` (`id`, `create_by`, `create_time`, `update_by`, `update_time`, `sys_org_code`, `country_name_cn`, `country_name_en`, `national_flag_id`, `national_flag_url`) VALUES ('24', NULL, NULL, NULL, NULL, NULL, '印尼', 'Indonesia', NULL, '/jero-boot/nationalFlag/Indonesia.png');
|
||||
INSERT INTO `laws_weilai`.`country_national_flag` (`id`, `create_by`, `create_time`, `update_by`, `update_time`, `sys_org_code`, `country_name_cn`, `country_name_en`, `national_flag_id`, `national_flag_url`) VALUES ('25', NULL, NULL, NULL, NULL, NULL, '越南', 'Vietnam', NULL, '/jero-boot/nationalFlag/Vietnam.png');
|
||||
INSERT INTO `laws_weilai`.`country_national_flag` (`id`, `create_by`, `create_time`, `update_by`, `update_time`, `sys_org_code`, `country_name_cn`, `country_name_en`, `national_flag_id`, `national_flag_url`) VALUES ('26', NULL, NULL, NULL, NULL, NULL, '智利', 'Chile', NULL, '/jero-boot/nationalFlag/Chile.png');
|
||||
INSERT INTO `laws_weilai`.`country_national_flag` (`id`, `create_by`, `create_time`, `update_by`, `update_time`, `sys_org_code`, `country_name_cn`, `country_name_en`, `national_flag_id`, `national_flag_url`) VALUES ('27', NULL, NULL, NULL, NULL, NULL, '中国香港', 'Hong Kong China', NULL, '/jero-boot/nationalFlag/HongKongChina.png');
|
||||
-- 删除之前的3中国香港 和8海湾地区
|
||||
delete from country_national_flag where id in ('3','8');
|
||||
|
||||
-- 法规流程历史表增加字段 审批意见 2022-08-16
|
||||
ALTER TABLE `laws_weilai`.`laws_process_history`
|
||||
ADD COLUMN `approval_opinion` varchar(2000) NULL COMMENT '审批意见' AFTER `flow_type`;
|
||||
|
||||
@@ -36,6 +36,7 @@ import com.jero.modules.cert.report.service.*;
|
||||
import com.jero.modules.cert.template.entity.CertCategoryParamsInfoPublishEO;
|
||||
import com.jero.modules.cert.template.entity.ParamsInfoPublishEO;
|
||||
import com.jero.modules.cert.template.enums.ControlTypeEnum;
|
||||
import com.jero.modules.cert.template.enums.ParamsIsMustEnum;
|
||||
import com.jero.modules.cert.template.service.ICertCategoryParamsInfoPublishEOService;
|
||||
import com.jero.modules.cert.template.service.IParamsInfoPublishEOService;
|
||||
import com.jero.modules.feishu.service.IFeishuService;
|
||||
@@ -528,147 +529,196 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
} else if (ControlTypeEnum.TEXT_PULL_SINGLE.getValue().equals(controlType)) {
|
||||
|
||||
ParamsConfigDataVO textConfigDataVO = new ParamsConfigDataVO();
|
||||
ParamsConfigDataVO pullConfigDataVO = new ParamsConfigDataVO();
|
||||
|
||||
if (ParamsIsMustEnum.YES.getValue().equals(paramsCollectManifestEO.getIsMust())) {
|
||||
pullConfigDataVO.setIsMust(ParamsIsMustEnum.YES.getValue());
|
||||
textConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue());
|
||||
} else {
|
||||
pullConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue());
|
||||
textConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue());
|
||||
}
|
||||
|
||||
textConfigDataVO.setType(ConfigDataTypeEnum.TEXT.getValue());
|
||||
textConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
textConfigDataVO.setIsLock(paramsConfigEO.getIsLock());
|
||||
textConfigDataVO.setControlVerify(paramsCollectManifestEO.getControlVerify());
|
||||
if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getTextData())) {
|
||||
textConfigDataVO.setDataValue(paramsConfigDataEO.getTextData());
|
||||
}
|
||||
paramsConfigDataVOList.add(textConfigDataVO);
|
||||
|
||||
ParamsConfigDataVO pullConfigDataVO = new ParamsConfigDataVO();
|
||||
pullConfigDataVO.setType(ConfigDataTypeEnum.PULL.getValue());
|
||||
pullConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
pullConfigDataVO.setIsLock(paramsConfigEO.getIsLock());
|
||||
pullConfigDataVO.setControlValue(getControlValueMapList(paramsCollectManifestEO.getControlValues()));
|
||||
if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getPullData())) {
|
||||
pullConfigDataVO.setDataValue(paramsConfigDataEO.getPullData());
|
||||
}
|
||||
|
||||
paramsConfigDataVOList.add(pullConfigDataVO);
|
||||
paramsConfigDataVOList.add(textConfigDataVO);
|
||||
|
||||
} else if (ControlTypeEnum.TEXT_PULL_MORE.getValue().equals(controlType)) {
|
||||
|
||||
ParamsConfigDataVO textConfigDataVO = new ParamsConfigDataVO();
|
||||
ParamsConfigDataVO pullMoreConfigDataVO = new ParamsConfigDataVO();
|
||||
|
||||
if (ParamsIsMustEnum.YES.getValue().equals(paramsCollectManifestEO.getIsMust())) {
|
||||
pullMoreConfigDataVO.setIsMust(ParamsIsMustEnum.YES.getValue());
|
||||
textConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue());
|
||||
} else {
|
||||
pullMoreConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue());
|
||||
textConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue());
|
||||
}
|
||||
|
||||
textConfigDataVO.setType(ConfigDataTypeEnum.TEXT.getValue());
|
||||
textConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
textConfigDataVO.setIsLock(paramsConfigEO.getIsLock());
|
||||
textConfigDataVO.setControlVerify(paramsCollectManifestEO.getControlVerify());
|
||||
if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getTextData())) {
|
||||
textConfigDataVO.setDataValue(paramsConfigDataEO.getTextData());
|
||||
}
|
||||
paramsConfigDataVOList.add(textConfigDataVO);
|
||||
|
||||
ParamsConfigDataVO pullMoreConfigDataVO = new ParamsConfigDataVO();
|
||||
pullMoreConfigDataVO.setType(ConfigDataTypeEnum.PULL_MORE.getValue());
|
||||
pullMoreConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
pullMoreConfigDataVO.setIsLock(paramsConfigEO.getIsLock());
|
||||
pullMoreConfigDataVO.setControlValue(getControlValueMapList(paramsCollectManifestEO.getControlValues()));
|
||||
if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getPullData())) {
|
||||
pullMoreConfigDataVO.setDataValue(paramsConfigDataEO.getPullData());
|
||||
}
|
||||
|
||||
paramsConfigDataVOList.add(pullMoreConfigDataVO);
|
||||
paramsConfigDataVOList.add(textConfigDataVO);
|
||||
|
||||
} else if (ControlTypeEnum.TEXT_FILE.getValue().equals(controlType)) {
|
||||
|
||||
ParamsConfigDataVO textConfigDataVO = new ParamsConfigDataVO();
|
||||
ParamsConfigDataVO fileConfigDataVO = new ParamsConfigDataVO();
|
||||
|
||||
if (ParamsIsMustEnum.YES.getValue().equals(paramsCollectManifestEO.getIsMust())) {
|
||||
textConfigDataVO.setIsMust(ParamsIsMustEnum.YES.getValue());
|
||||
fileConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue());
|
||||
} else {
|
||||
textConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue());
|
||||
fileConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue());
|
||||
}
|
||||
|
||||
textConfigDataVO.setType(ConfigDataTypeEnum.TEXT.getValue());
|
||||
textConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
textConfigDataVO.setIsLock(paramsConfigEO.getIsLock());
|
||||
textConfigDataVO.setControlVerify(paramsCollectManifestEO.getControlVerify());
|
||||
if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getTextData())) {
|
||||
textConfigDataVO.setDataValue(paramsConfigDataEO.getTextData());
|
||||
}
|
||||
paramsConfigDataVOList.add(textConfigDataVO);
|
||||
|
||||
ParamsConfigDataVO fileConfigDataVO = new ParamsConfigDataVO();
|
||||
fileConfigDataVO.setType(ConfigDataTypeEnum.FILE.getValue());
|
||||
fileConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
fileConfigDataVO.setIsLock(paramsConfigEO.getIsLock());
|
||||
fileConfigDataVO.setTemplateId(templateId);
|
||||
fileConfigDataVO.setTemplateName(templateName);
|
||||
if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getFileConnectId())) {
|
||||
fileConfigDataVO.setDataValue(paramsConfigDataEO.getFileConnectId());
|
||||
}
|
||||
|
||||
paramsConfigDataVOList.add(textConfigDataVO);
|
||||
paramsConfigDataVOList.add(fileConfigDataVO);
|
||||
|
||||
} else if (ControlTypeEnum.PULL_SINGLE_FILE.getValue().equals(controlType)) {
|
||||
|
||||
ParamsConfigDataVO pullConfigDataVO = new ParamsConfigDataVO();
|
||||
ParamsConfigDataVO fileConfigDataVO = new ParamsConfigDataVO();
|
||||
|
||||
if (ParamsIsMustEnum.YES.getValue().equals(paramsCollectManifestEO.getIsMust())) {
|
||||
pullConfigDataVO.setIsMust(ParamsIsMustEnum.YES.getValue());
|
||||
fileConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue());
|
||||
} else {
|
||||
pullConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue());
|
||||
fileConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue());
|
||||
}
|
||||
|
||||
pullConfigDataVO.setType(ConfigDataTypeEnum.PULL.getValue());
|
||||
pullConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
pullConfigDataVO.setIsLock(paramsConfigEO.getIsLock());
|
||||
pullConfigDataVO.setControlValue(getControlValueMapList(paramsCollectManifestEO.getControlValues()));
|
||||
if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getPullData())) {
|
||||
pullConfigDataVO.setDataValue(paramsConfigDataEO.getPullData());
|
||||
}
|
||||
paramsConfigDataVOList.add(pullConfigDataVO);
|
||||
|
||||
ParamsConfigDataVO fileConfigDataVO = new ParamsConfigDataVO();
|
||||
fileConfigDataVO.setType(ConfigDataTypeEnum.FILE.getValue());
|
||||
fileConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
fileConfigDataVO.setIsLock(paramsConfigEO.getIsLock());
|
||||
fileConfigDataVO.setTemplateId(templateId);
|
||||
fileConfigDataVO.setTemplateName(templateName);
|
||||
if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getFileConnectId())) {
|
||||
fileConfigDataVO.setDataValue(paramsConfigDataEO.getFileConnectId());
|
||||
}
|
||||
|
||||
paramsConfigDataVOList.add(pullConfigDataVO);
|
||||
paramsConfigDataVOList.add(fileConfigDataVO);
|
||||
|
||||
} else if (ControlTypeEnum.PULL_MORE_FILE.getValue().equals(controlType)) {
|
||||
|
||||
ParamsConfigDataVO pullMoreConfigDataVO = new ParamsConfigDataVO();
|
||||
ParamsConfigDataVO fileConfigDataVO = new ParamsConfigDataVO();
|
||||
|
||||
if (ParamsIsMustEnum.YES.getValue().equals(paramsCollectManifestEO.getIsMust())) {
|
||||
pullMoreConfigDataVO.setIsMust(ParamsIsMustEnum.YES.getValue());
|
||||
fileConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue());
|
||||
} else {
|
||||
pullMoreConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue());
|
||||
fileConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue());
|
||||
}
|
||||
|
||||
pullMoreConfigDataVO.setType(ConfigDataTypeEnum.PULL_MORE.getValue());
|
||||
pullMoreConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
pullMoreConfigDataVO.setIsLock(paramsConfigEO.getIsLock());
|
||||
pullMoreConfigDataVO.setControlValue(getControlValueMapList(paramsCollectManifestEO.getControlValues()));
|
||||
if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getPullData())) {
|
||||
pullMoreConfigDataVO.setDataValue(paramsConfigDataEO.getPullData());
|
||||
}
|
||||
paramsConfigDataVOList.add(pullMoreConfigDataVO);
|
||||
|
||||
ParamsConfigDataVO fileConfigDataVO = new ParamsConfigDataVO();
|
||||
fileConfigDataVO.setType(ConfigDataTypeEnum.FILE.getValue());
|
||||
fileConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
fileConfigDataVO.setIsLock(paramsConfigEO.getIsLock());
|
||||
fileConfigDataVO.setTemplateId(templateId);
|
||||
fileConfigDataVO.setTemplateName(templateName);
|
||||
if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getFileConnectId())) {
|
||||
fileConfigDataVO.setDataValue(paramsConfigDataEO.getFileConnectId());
|
||||
}
|
||||
|
||||
paramsConfigDataVOList.add(pullMoreConfigDataVO);
|
||||
paramsConfigDataVOList.add(fileConfigDataVO);
|
||||
|
||||
} else if (ControlTypeEnum.TEXT_PULL_SINGLE_FILE.getValue().equals(controlType)) {
|
||||
|
||||
ParamsConfigDataVO textConfigDataVO = new ParamsConfigDataVO();
|
||||
ParamsConfigDataVO pullConfigDataVO = new ParamsConfigDataVO();
|
||||
ParamsConfigDataVO fileConfigDataVO = new ParamsConfigDataVO();
|
||||
|
||||
if (ParamsIsMustEnum.YES.getValue().equals(paramsCollectManifestEO.getIsMust())) {
|
||||
pullConfigDataVO.setIsMust(ParamsIsMustEnum.YES.getValue());
|
||||
textConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue());
|
||||
fileConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue());
|
||||
} else {
|
||||
pullConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue());
|
||||
textConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue());
|
||||
fileConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue());
|
||||
}
|
||||
|
||||
textConfigDataVO.setType(ConfigDataTypeEnum.TEXT.getValue());
|
||||
textConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
textConfigDataVO.setIsLock(paramsConfigEO.getIsLock());
|
||||
textConfigDataVO.setControlVerify(paramsCollectManifestEO.getControlVerify());
|
||||
if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getTextData())) {
|
||||
textConfigDataVO.setDataValue(paramsConfigDataEO.getTextData());
|
||||
}
|
||||
paramsConfigDataVOList.add(textConfigDataVO);
|
||||
|
||||
ParamsConfigDataVO pullConfigDataVO = new ParamsConfigDataVO();
|
||||
pullConfigDataVO.setType(ConfigDataTypeEnum.PULL.getValue());
|
||||
pullConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
pullConfigDataVO.setIsLock(paramsConfigEO.getIsLock());
|
||||
pullConfigDataVO.setControlValue(getControlValueMapList(paramsCollectManifestEO.getControlValues()));
|
||||
if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getPullData())) {
|
||||
pullConfigDataVO.setDataValue(paramsConfigDataEO.getPullData());
|
||||
}
|
||||
paramsConfigDataVOList.add(pullConfigDataVO);
|
||||
|
||||
ParamsConfigDataVO fileConfigDataVO = new ParamsConfigDataVO();
|
||||
fileConfigDataVO.setType(ConfigDataTypeEnum.FILE.getValue());
|
||||
fileConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
fileConfigDataVO.setIsLock(paramsConfigEO.getIsLock());
|
||||
fileConfigDataVO.setTemplateId(templateId);
|
||||
fileConfigDataVO.setTemplateName(templateName);
|
||||
if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getFileConnectId())) {
|
||||
fileConfigDataVO.setDataValue(paramsConfigDataEO.getFileConnectId());
|
||||
}
|
||||
|
||||
paramsConfigDataVOList.add(pullConfigDataVO);
|
||||
paramsConfigDataVOList.add(textConfigDataVO);
|
||||
paramsConfigDataVOList.add(fileConfigDataVO);
|
||||
|
||||
}
|
||||
@@ -724,6 +774,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
String dbFieldName = onlCgformField.getDbFieldName();
|
||||
if ("description".equals(dbFieldName)) {
|
||||
indexOfDescription = i;
|
||||
map.put("click2", true);
|
||||
}
|
||||
if ("duty_territory".equals(dbFieldName)) {
|
||||
map.put("click1", true);
|
||||
|
||||
@@ -26,6 +26,7 @@ import com.jero.modules.cert.report.mapper.ParamsReportDetailEOMapper;
|
||||
import com.jero.modules.cert.report.service.*;
|
||||
import com.jero.modules.cert.report.vo.ParamsReportDetailVO;
|
||||
import com.jero.modules.cert.template.enums.ControlTypeEnum;
|
||||
import com.jero.modules.cert.template.enums.ParamsIsMustEnum;
|
||||
import com.jero.modules.ocr.util.LineHumpUtil;
|
||||
import com.jero.modules.oss.entity.OSSFile;
|
||||
import com.jero.modules.oss.service.IOSSFileService;
|
||||
@@ -274,147 +275,196 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
} else if (ControlTypeEnum.TEXT_PULL_SINGLE.getValue().equals(controlType)) {
|
||||
|
||||
ParamsConfigDataVO textConfigDataVO = new ParamsConfigDataVO();
|
||||
ParamsConfigDataVO pullConfigDataVO = new ParamsConfigDataVO();
|
||||
|
||||
if (ParamsIsMustEnum.YES.getValue().equals(paramsCollectManifestEO.getIsMust())) {
|
||||
pullConfigDataVO.setIsMust(ParamsIsMustEnum.YES.getValue());
|
||||
textConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue());
|
||||
} else {
|
||||
pullConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue());
|
||||
textConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue());
|
||||
}
|
||||
|
||||
textConfigDataVO.setType(ConfigDataTypeEnum.TEXT.getValue());
|
||||
textConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
textConfigDataVO.setIsLock(paramsConfigEO.getIsLock());
|
||||
textConfigDataVO.setControlVerify(paramsCollectManifestEO.getControlVerify());
|
||||
if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getTextData())) {
|
||||
textConfigDataVO.setDataValue(paramsConfigDataEO.getTextData());
|
||||
}
|
||||
paramsConfigDataVOList.add(textConfigDataVO);
|
||||
|
||||
ParamsConfigDataVO pullConfigDataVO = new ParamsConfigDataVO();
|
||||
pullConfigDataVO.setType(ConfigDataTypeEnum.PULL.getValue());
|
||||
pullConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
pullConfigDataVO.setIsLock(paramsConfigEO.getIsLock());
|
||||
pullConfigDataVO.setControlValue(getControlValueMapList(paramsCollectManifestEO.getControlValues()));
|
||||
if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getPullData())) {
|
||||
pullConfigDataVO.setDataValue(paramsConfigDataEO.getPullData());
|
||||
}
|
||||
|
||||
paramsConfigDataVOList.add(pullConfigDataVO);
|
||||
paramsConfigDataVOList.add(textConfigDataVO);
|
||||
|
||||
} else if (ControlTypeEnum.TEXT_PULL_MORE.getValue().equals(controlType)) {
|
||||
|
||||
ParamsConfigDataVO textConfigDataVO = new ParamsConfigDataVO();
|
||||
ParamsConfigDataVO pullMoreConfigDataVO = new ParamsConfigDataVO();
|
||||
|
||||
if (ParamsIsMustEnum.YES.getValue().equals(paramsCollectManifestEO.getIsMust())) {
|
||||
pullMoreConfigDataVO.setIsMust(ParamsIsMustEnum.YES.getValue());
|
||||
textConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue());
|
||||
} else {
|
||||
pullMoreConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue());
|
||||
textConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue());
|
||||
}
|
||||
|
||||
textConfigDataVO.setType(ConfigDataTypeEnum.TEXT.getValue());
|
||||
textConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
textConfigDataVO.setIsLock(paramsConfigEO.getIsLock());
|
||||
textConfigDataVO.setControlVerify(paramsCollectManifestEO.getControlVerify());
|
||||
if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getTextData())) {
|
||||
textConfigDataVO.setDataValue(paramsConfigDataEO.getTextData());
|
||||
}
|
||||
paramsConfigDataVOList.add(textConfigDataVO);
|
||||
|
||||
ParamsConfigDataVO pullMoreConfigDataVO = new ParamsConfigDataVO();
|
||||
pullMoreConfigDataVO.setType(ConfigDataTypeEnum.PULL_MORE.getValue());
|
||||
pullMoreConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
pullMoreConfigDataVO.setIsLock(paramsConfigEO.getIsLock());
|
||||
pullMoreConfigDataVO.setControlValue(getControlValueMapList(paramsCollectManifestEO.getControlValues()));
|
||||
if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getPullData())) {
|
||||
pullMoreConfigDataVO.setDataValue(paramsConfigDataEO.getPullData());
|
||||
}
|
||||
|
||||
paramsConfigDataVOList.add(pullMoreConfigDataVO);
|
||||
paramsConfigDataVOList.add(textConfigDataVO);
|
||||
|
||||
} else if (ControlTypeEnum.TEXT_FILE.getValue().equals(controlType)) {
|
||||
|
||||
ParamsConfigDataVO textConfigDataVO = new ParamsConfigDataVO();
|
||||
ParamsConfigDataVO fileConfigDataVO = new ParamsConfigDataVO();
|
||||
|
||||
if (ParamsIsMustEnum.YES.getValue().equals(paramsCollectManifestEO.getIsMust())) {
|
||||
textConfigDataVO.setIsMust(ParamsIsMustEnum.YES.getValue());
|
||||
fileConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue());
|
||||
} else {
|
||||
textConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue());
|
||||
fileConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue());
|
||||
}
|
||||
|
||||
textConfigDataVO.setType(ConfigDataTypeEnum.TEXT.getValue());
|
||||
textConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
textConfigDataVO.setIsLock(paramsConfigEO.getIsLock());
|
||||
textConfigDataVO.setControlVerify(paramsCollectManifestEO.getControlVerify());
|
||||
if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getTextData())) {
|
||||
textConfigDataVO.setDataValue(paramsConfigDataEO.getTextData());
|
||||
}
|
||||
paramsConfigDataVOList.add(textConfigDataVO);
|
||||
|
||||
ParamsConfigDataVO fileConfigDataVO = new ParamsConfigDataVO();
|
||||
fileConfigDataVO.setType(ConfigDataTypeEnum.FILE.getValue());
|
||||
fileConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
fileConfigDataVO.setIsLock(paramsConfigEO.getIsLock());
|
||||
fileConfigDataVO.setTemplateId(templateId);
|
||||
fileConfigDataVO.setTemplateName(templateName);
|
||||
if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getFileConnectId())) {
|
||||
fileConfigDataVO.setDataValue(paramsConfigDataEO.getFileConnectId());
|
||||
}
|
||||
|
||||
paramsConfigDataVOList.add(textConfigDataVO);
|
||||
paramsConfigDataVOList.add(fileConfigDataVO);
|
||||
|
||||
} else if (ControlTypeEnum.PULL_SINGLE_FILE.getValue().equals(controlType)) {
|
||||
|
||||
ParamsConfigDataVO pullConfigDataVO = new ParamsConfigDataVO();
|
||||
ParamsConfigDataVO fileConfigDataVO = new ParamsConfigDataVO();
|
||||
|
||||
if (ParamsIsMustEnum.YES.getValue().equals(paramsCollectManifestEO.getIsMust())) {
|
||||
pullConfigDataVO.setIsMust(ParamsIsMustEnum.YES.getValue());
|
||||
fileConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue());
|
||||
} else {
|
||||
pullConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue());
|
||||
fileConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue());
|
||||
}
|
||||
|
||||
pullConfigDataVO.setType(ConfigDataTypeEnum.PULL.getValue());
|
||||
pullConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
pullConfigDataVO.setIsLock(paramsConfigEO.getIsLock());
|
||||
pullConfigDataVO.setControlValue(getControlValueMapList(paramsCollectManifestEO.getControlValues()));
|
||||
if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getPullData())) {
|
||||
pullConfigDataVO.setDataValue(paramsConfigDataEO.getPullData());
|
||||
}
|
||||
paramsConfigDataVOList.add(pullConfigDataVO);
|
||||
|
||||
ParamsConfigDataVO fileConfigDataVO = new ParamsConfigDataVO();
|
||||
fileConfigDataVO.setType(ConfigDataTypeEnum.FILE.getValue());
|
||||
fileConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
fileConfigDataVO.setIsLock(paramsConfigEO.getIsLock());
|
||||
fileConfigDataVO.setTemplateId(templateId);
|
||||
fileConfigDataVO.setTemplateName(templateName);
|
||||
if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getFileConnectId())) {
|
||||
fileConfigDataVO.setDataValue(paramsConfigDataEO.getFileConnectId());
|
||||
}
|
||||
|
||||
paramsConfigDataVOList.add(pullConfigDataVO);
|
||||
paramsConfigDataVOList.add(fileConfigDataVO);
|
||||
|
||||
} else if (ControlTypeEnum.PULL_MORE_FILE.getValue().equals(controlType)) {
|
||||
|
||||
ParamsConfigDataVO pullMoreConfigDataVO = new ParamsConfigDataVO();
|
||||
ParamsConfigDataVO fileConfigDataVO = new ParamsConfigDataVO();
|
||||
|
||||
if (ParamsIsMustEnum.YES.getValue().equals(paramsCollectManifestEO.getIsMust())) {
|
||||
pullMoreConfigDataVO.setIsMust(ParamsIsMustEnum.YES.getValue());
|
||||
fileConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue());
|
||||
} else {
|
||||
pullMoreConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue());
|
||||
fileConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue());
|
||||
}
|
||||
|
||||
pullMoreConfigDataVO.setType(ConfigDataTypeEnum.PULL_MORE.getValue());
|
||||
pullMoreConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
pullMoreConfigDataVO.setIsLock(paramsConfigEO.getIsLock());
|
||||
pullMoreConfigDataVO.setControlValue(getControlValueMapList(paramsCollectManifestEO.getControlValues()));
|
||||
if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getPullData())) {
|
||||
pullMoreConfigDataVO.setDataValue(paramsConfigDataEO.getPullData());
|
||||
}
|
||||
paramsConfigDataVOList.add(pullMoreConfigDataVO);
|
||||
|
||||
ParamsConfigDataVO fileConfigDataVO = new ParamsConfigDataVO();
|
||||
fileConfigDataVO.setType(ConfigDataTypeEnum.FILE.getValue());
|
||||
fileConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
fileConfigDataVO.setIsLock(paramsConfigEO.getIsLock());
|
||||
fileConfigDataVO.setTemplateId(templateId);
|
||||
fileConfigDataVO.setTemplateName(templateName);
|
||||
if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getFileConnectId())) {
|
||||
fileConfigDataVO.setDataValue(paramsConfigDataEO.getFileConnectId());
|
||||
}
|
||||
|
||||
paramsConfigDataVOList.add(pullMoreConfigDataVO);
|
||||
paramsConfigDataVOList.add(fileConfigDataVO);
|
||||
|
||||
} else if (ControlTypeEnum.TEXT_PULL_SINGLE_FILE.getValue().equals(controlType)) {
|
||||
|
||||
ParamsConfigDataVO textConfigDataVO = new ParamsConfigDataVO();
|
||||
ParamsConfigDataVO pullConfigDataVO = new ParamsConfigDataVO();
|
||||
ParamsConfigDataVO fileConfigDataVO = new ParamsConfigDataVO();
|
||||
|
||||
if (ParamsIsMustEnum.YES.getValue().equals(paramsCollectManifestEO.getIsMust())) {
|
||||
pullConfigDataVO.setIsMust(ParamsIsMustEnum.YES.getValue());
|
||||
textConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue());
|
||||
fileConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue());
|
||||
} else {
|
||||
pullConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue());
|
||||
textConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue());
|
||||
fileConfigDataVO.setIsMust(ParamsIsMustEnum.NO.getValue());
|
||||
}
|
||||
|
||||
textConfigDataVO.setType(ConfigDataTypeEnum.TEXT.getValue());
|
||||
textConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
textConfigDataVO.setIsLock(paramsConfigEO.getIsLock());
|
||||
textConfigDataVO.setControlVerify(paramsCollectManifestEO.getControlVerify());
|
||||
if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getTextData())) {
|
||||
textConfigDataVO.setDataValue(paramsConfigDataEO.getTextData());
|
||||
}
|
||||
paramsConfigDataVOList.add(textConfigDataVO);
|
||||
|
||||
ParamsConfigDataVO pullConfigDataVO = new ParamsConfigDataVO();
|
||||
pullConfigDataVO.setType(ConfigDataTypeEnum.PULL.getValue());
|
||||
pullConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
pullConfigDataVO.setIsLock(paramsConfigEO.getIsLock());
|
||||
pullConfigDataVO.setControlValue(getControlValueMapList(paramsCollectManifestEO.getControlValues()));
|
||||
if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getPullData())) {
|
||||
pullConfigDataVO.setDataValue(paramsConfigDataEO.getPullData());
|
||||
}
|
||||
paramsConfigDataVOList.add(pullConfigDataVO);
|
||||
|
||||
ParamsConfigDataVO fileConfigDataVO = new ParamsConfigDataVO();
|
||||
fileConfigDataVO.setType(ConfigDataTypeEnum.FILE.getValue());
|
||||
fileConfigDataVO.setIsMust(paramsCollectManifestEO.getIsMust());
|
||||
fileConfigDataVO.setIsLock(paramsConfigEO.getIsLock());
|
||||
fileConfigDataVO.setTemplateId(templateId);
|
||||
fileConfigDataVO.setTemplateName(templateName);
|
||||
if (ObjectUtil.isNotEmpty(paramsConfigDataEO) && StringUtils.isNotEmpty(paramsConfigDataEO.getFileConnectId())) {
|
||||
fileConfigDataVO.setDataValue(paramsConfigDataEO.getFileConnectId());
|
||||
}
|
||||
|
||||
paramsConfigDataVOList.add(pullConfigDataVO);
|
||||
paramsConfigDataVOList.add(textConfigDataVO);
|
||||
paramsConfigDataVOList.add(fileConfigDataVO);
|
||||
|
||||
} else if (ControlTypeEnum.Title.getValue().equals(controlType)) {
|
||||
|
||||
@@ -146,7 +146,7 @@ public class OSSFileServiceImpl extends ServiceImpl<OSSFileMapper, OSSFile> impl
|
||||
if (cut.equals(CutEnum.CN.getValue())) {
|
||||
throw new JeroBootException("只能够上传pdf/word/excel/csv/ppt/txt/zip/rar/静态图片类型的文件。请重新选择文件!");
|
||||
} else {
|
||||
throw new JeroBootException("Only upload pdf/word/excel/csv/ppt/txt/zip/rar/Static image type file. Please re-select the file!");
|
||||
throw new JeroBootException("Only upload pdf/word/excel/csv/ppt/txt/zip/rar/Static image type file. Please re select the file!");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -265,7 +265,7 @@ public class OSSFileServiceImpl extends ServiceImpl<OSSFileMapper, OSSFile> impl
|
||||
if (cut.equals(CutEnum.CN.getValue())) {
|
||||
throw new JeroBootException("只能够上传pdf/word/excel/csv/ppt/txt/zip/rar/静态图片类型的文件。请重新选择文件!");
|
||||
} else {
|
||||
throw new JeroBootException("Only upload pdf/word/excel/csv/ppt/txt/zip/rar/Static image type file. Please re-select the file!");
|
||||
throw new JeroBootException("Only upload pdf/word/excel/csv/ppt/txt/zip/rar/Static image type file. Please re select the file!");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -357,7 +357,7 @@ public class OSSFileServiceImpl extends ServiceImpl<OSSFileMapper, OSSFile> impl
|
||||
if (cut.equals(CutEnum.CN.getValue())) {
|
||||
throw new JeroBootException("只能够上传pdf/word/excel/csv/ppt/txt/zip/rar/静态图片类型的文件。请重新选择文件!");
|
||||
} else {
|
||||
throw new JeroBootException("Only upload pdf/word/excel/csv/ppt/txt/zip/rar/Static image type file. Please re-select the file!");
|
||||
throw new JeroBootException("Only upload pdf/word/excel/csv/ppt/txt/zip/rar/Static image type file. Please re select the file!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,4 +97,7 @@ public class LawsProcessHistoryEO implements Serializable {
|
||||
@ApiModelProperty(value = "流程类型")
|
||||
private String flowType;
|
||||
|
||||
/**审批意见*/
|
||||
@ApiModelProperty(value = "审批意见")
|
||||
private String approvalOpinion;
|
||||
}
|
||||
|
||||
@@ -59,6 +59,6 @@ public class LawsOpinionGatherJob implements Job {
|
||||
}
|
||||
}
|
||||
}
|
||||
log.info("法规意见收集流程,定时任务开启 =====================================================");
|
||||
log.info("法规意见收集流程,定时任务结束 =====================================================");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,5 +14,6 @@
|
||||
<result column="operator_role_code" property="operatorRoleCode" />
|
||||
<result column="operator_time" property="operatorTime" />
|
||||
<result column="flow_type" property="flowType" />
|
||||
<result column="approval_opinion" property="approvalOpinion" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
|
||||
@@ -208,8 +208,7 @@ public class LawsTechnologyEvaluationEOController extends JeroController<LawsTec
|
||||
@ApiOperation(value = "条款导入")
|
||||
@PostMapping(value = "/importItemExcel")
|
||||
public Result<?> importItemExcel(MultipartFile file, @RequestParam(name = "cut") String cut, HttpServletRequest request) throws Exception {
|
||||
List<Map<String,Object>> result = this.lawsTechnologyEvaluationEOService.importItemExcel(file,cut,request);
|
||||
return Result.OK(result);
|
||||
return this.lawsTechnologyEvaluationEOService.importItemExcel(file,cut,request);
|
||||
}
|
||||
|
||||
@ApiOperation(value="根据id查询明细数据", notes="根据id查询明细数据")
|
||||
|
||||
@@ -85,7 +85,7 @@ public interface ILawsTechnologyEvaluationEOService extends IService<LawsTechnol
|
||||
|
||||
void exportItemTemplate(String cut, HttpServletResponse response, HttpServletRequest request);
|
||||
|
||||
List<Map<String,Object>> importItemExcel(MultipartFile file, String cut, HttpServletRequest request)throws Exception;
|
||||
Result<?> importItemExcel(MultipartFile file, String cut, HttpServletRequest request)throws Exception;
|
||||
|
||||
List<Map<String, Object>> queryPageDummyById(Map<String, Object> parameter);
|
||||
}
|
||||
|
||||
@@ -312,7 +312,7 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
|
||||
title = "条款号,条款名称,条款内容";
|
||||
fileOriName = "条款信息导入模板.xls";
|
||||
} else {
|
||||
title = "Item num,Item name,Item Contents";
|
||||
title = "Item No.,Item Name,Item Content";
|
||||
fileOriName = "Item information is imported into the template.xls";
|
||||
}
|
||||
|
||||
@@ -356,7 +356,7 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String,Object>> importItemExcel(MultipartFile file, String cut, HttpServletRequest request)throws Exception {
|
||||
public Result<?> importItemExcel(MultipartFile file, String cut, HttpServletRequest request)throws Exception {
|
||||
//校验文件格式
|
||||
int pos = file.getOriginalFilename().lastIndexOf(".");
|
||||
String fileSuffixStr = file.getOriginalFilename().substring(pos+1).toLowerCase();
|
||||
@@ -367,7 +367,7 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
|
||||
title = "条款号,条款名称,条款内容";
|
||||
verifyTemplateMsg = "模板不正确,请下载正确的模板导入!";
|
||||
} else {
|
||||
title = "Item num,Item name,Item Contents";
|
||||
title = "Item No.,Item Name,Item Content";
|
||||
verifyTemplateMsg = "The template is not correct, please download the correct template to import!";
|
||||
}
|
||||
|
||||
@@ -406,12 +406,35 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
|
||||
}
|
||||
|
||||
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 itemNum = "";
|
||||
Cell itemNumCell = row.getCell(0);
|
||||
if(itemNumCell != null){
|
||||
itemNumCell.setCellType(CellType.STRING);
|
||||
itemNum = itemNumCell.toString().replaceAll("'","‘").replaceAll("\"","”");
|
||||
}
|
||||
|
||||
String itemName = "";
|
||||
Cell itemNameCell = row.getCell(1);
|
||||
if(itemNameCell != null){
|
||||
itemNameCell.setCellType(CellType.STRING);
|
||||
itemName = itemNameCell.toString().replaceAll("'","‘").replaceAll("\"","”");
|
||||
}
|
||||
|
||||
String itemContents = "";
|
||||
Cell itemContentsCell = row.getCell(2);
|
||||
if(itemContentsCell != null){
|
||||
itemContentsCell.setCellType(CellType.STRING);
|
||||
itemContents = itemContentsCell.toString().replaceAll("'","‘").replaceAll("\"","”");
|
||||
}
|
||||
|
||||
/*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();
|
||||
String itemContents = row.getCell(2, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK).toString();*/
|
||||
|
||||
Map<String,Object> itemInfoMap = new HashMap<>();
|
||||
String itemId = UUID.randomUUID().toString().replace("-", "");
|
||||
itemInfoMap.put("itemId",itemId);
|
||||
@@ -421,9 +444,17 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
|
||||
result.add(itemInfoMap);
|
||||
}
|
||||
}
|
||||
|
||||
Map map = validateImportDatas(result,cut);
|
||||
boolean isOk = (boolean) map.get("result");
|
||||
if (!isOk) {
|
||||
//验证没有通过
|
||||
String message = (String) map.get("message");
|
||||
return Result.error(message);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
return Result.OK(result);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -511,4 +542,105 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
|
||||
}
|
||||
return technologyTerritoryName;
|
||||
}
|
||||
|
||||
public Map validateImportDatas(List<Map<String, Object>> dataList,String cut){
|
||||
//存放数据验证结果信息
|
||||
List<String> stringMessage = new ArrayList<>();
|
||||
|
||||
int i = 0;
|
||||
|
||||
for (Map<String, Object> map : dataList) {
|
||||
i++;
|
||||
|
||||
int countError = 0; //记录失败数据数量
|
||||
String errorMsg = "";
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
errorMsg = "第" + i + "行:";
|
||||
}else{
|
||||
errorMsg = i + " line:";
|
||||
}
|
||||
|
||||
String itemNum = (String) map.get("itemNum");
|
||||
String itemName = (String) map.get("itemName");
|
||||
String itemContent = (String) map.get("itemContent");
|
||||
|
||||
if(StringUtils.isEmpty(itemNum)){
|
||||
if(StringUtils.equals(cut,CutEnum.CN.getValue())){
|
||||
errorMsg += "条款号不能为空;";
|
||||
}else if (StringUtils.equals(cut,CutEnum.EN.getValue())){
|
||||
errorMsg += "Item No. cannot be empty;";
|
||||
}
|
||||
countError++;
|
||||
}else if(itemNum.length() > 100){
|
||||
if(StringUtils.equals(cut,CutEnum.CN.getValue())){
|
||||
errorMsg += "条款号长度不能超过100;";
|
||||
}else if (StringUtils.equals(cut,CutEnum.EN.getValue())){
|
||||
errorMsg += "Item No. length of the cannot exceed 100;";
|
||||
}
|
||||
countError++;
|
||||
}
|
||||
|
||||
if(StringUtils.isEmpty(itemName)){
|
||||
if(StringUtils.equals(cut,CutEnum.CN.getValue())){
|
||||
errorMsg += "条款名称不能为空;";
|
||||
}else if (StringUtils.equals(cut,CutEnum.EN.getValue())){
|
||||
errorMsg += "Item Name cannot be empty;";
|
||||
}
|
||||
countError++;
|
||||
}else if(itemName.length() > 100){
|
||||
if(StringUtils.equals(cut,CutEnum.CN.getValue())){
|
||||
errorMsg += "条款名称长度不能超过100;";
|
||||
}else if (StringUtils.equals(cut,CutEnum.EN.getValue())){
|
||||
errorMsg += "Item Name length of the cannot exceed 100;";
|
||||
}
|
||||
countError++;
|
||||
}
|
||||
|
||||
if(StringUtils.isEmpty(itemContent)){
|
||||
if(StringUtils.equals(cut,CutEnum.CN.getValue())){
|
||||
errorMsg += "条款内容不能为空;";
|
||||
}else if (StringUtils.equals(cut,CutEnum.EN.getValue())){
|
||||
errorMsg += "Item Content cannot be empty;";
|
||||
}
|
||||
countError++;
|
||||
}else if(itemContent.length() > 500){
|
||||
if(StringUtils.equals(cut,CutEnum.CN.getValue())){
|
||||
errorMsg += "条款内容长度不能超过500;";
|
||||
}else if (StringUtils.equals(cut,CutEnum.EN.getValue())){
|
||||
errorMsg += "Item Content length of the cannot exceed 500;";
|
||||
}
|
||||
countError++;
|
||||
}
|
||||
|
||||
if (countError > 0) {
|
||||
errorMsg = errorMsg.substring(0,errorMsg.length()-1);
|
||||
stringMessage.add(errorMsg);
|
||||
}
|
||||
}
|
||||
|
||||
Map result = new HashMap();
|
||||
|
||||
if(CollectionUtils.isEmpty(dataList)){
|
||||
result.put("result", false);
|
||||
String message = "";
|
||||
if (StringUtils.equals(cut, CutEnum.CN.getValue())) {
|
||||
message = "不能导入空的模板,请检查!";
|
||||
}else if(StringUtils.equals(cut,CutEnum.EN.getValue())){
|
||||
message = "Cannot import empty template, please check!";
|
||||
}
|
||||
result.put("message", message);
|
||||
}else if (stringMessage.isEmpty()) {
|
||||
result.put("result", true);
|
||||
result.put("resultList", dataList);
|
||||
result.put("message", "");
|
||||
} else {
|
||||
result.put("result", false);
|
||||
String html = "";
|
||||
for (String message : stringMessage) {
|
||||
html += message + "</br>";
|
||||
}
|
||||
result.put("message", html);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -216,9 +216,12 @@ public class LawsTechnologyEvaluationItemResultEOServiceImpl extends ServiceImpl
|
||||
List<SysCategory> categoryList = sysCategoryService.list();
|
||||
for (LawsTechnologyEvaluationItemResultEO data : datas) {
|
||||
String evaluationMethods = data.getEvaluationMethods();
|
||||
List<String> evaluationMethodsList = Arrays.asList(evaluationMethods.split(","));
|
||||
String name = getTreeName(cut, categoryList, evaluationMethodsList);
|
||||
data.setEvaluationMethodsName(name);
|
||||
if(StringUtils.isNotEmpty(evaluationMethods)){
|
||||
List<String> 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));
|
||||
}
|
||||
@@ -263,7 +266,7 @@ public class LawsTechnologyEvaluationItemResultEOServiceImpl extends ServiceImpl
|
||||
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 ";
|
||||
title = "Item No.,Item Name,Item Content,Assessor,Evaluation method,Name of technical document,chapter,Compliance Results,Opinion,Enclosure,Feedback Time";
|
||||
fileName = "Item Evaluation results " + ".xlsx";
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.jero.modules.problemKnowledgeBase.enums;
|
||||
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
/**
|
||||
* 问题知识库-查询标识枚举类
|
||||
*/
|
||||
public enum QueryFlagEnum {
|
||||
|
||||
GET_ALL_APPLY_MARKET("获取所有的适用市场","","0"),
|
||||
GET_NOT_CREATE_APPLY_MARKET("获取还没有创建过countryCard的适用市场","","1"),
|
||||
GET_RELEASED_APPLY_MARKET("获取已发布的countryCard的适用市场","","2"),
|
||||
GET_CREATE_APPLY_MARKET("获取所有自己已创建的countryCard的适用市场","","3"),
|
||||
;
|
||||
|
||||
String cnName;
|
||||
String enName;
|
||||
String value;
|
||||
|
||||
private QueryFlagEnum(String cnName, String enName, String value) {
|
||||
this.cnName = cnName;
|
||||
this.enName = enName;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public static String getTextByValue(String value,String cut) {
|
||||
QueryFlagEnum[] values = values();
|
||||
for (QueryFlagEnum queryFlagEnum : values) {
|
||||
if (queryFlagEnum.value.equals(value)) {
|
||||
if(StringUtils.equals(cut, CutEnum.CN.getValue())){
|
||||
return queryFlagEnum.cnName;
|
||||
}else if(StringUtils.equals(cut,CutEnum.EN.getValue())){
|
||||
return queryFlagEnum.enName;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -6,9 +6,11 @@ import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.common.system.vo.DictModel;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.CountryCardManageReleaseDetailEO;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.CountryCardManageReleaseEO;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.CountryNationalFlagEO;
|
||||
import com.jero.modules.problemKnowledgeBase.enums.QueryFlagEnum;
|
||||
import com.jero.modules.problemKnowledgeBase.enums.ReleaseStatusEnum;
|
||||
import com.jero.modules.problemKnowledgeBase.mapper.CountryCardManageReleaseEOMapper;
|
||||
import com.jero.modules.problemKnowledgeBase.service.ICountryCardManageReleaseDetailEOService;
|
||||
@@ -18,6 +20,7 @@ import com.jero.modules.system.enums.DicCodeEnum;
|
||||
import com.jero.modules.system.service.ISysDictService;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -216,9 +219,9 @@ public class CountryCardManageReleaseEOServiceImpl extends ServiceImpl<CountryCa
|
||||
//获取已经创建了country Card的适用地区,该接口只返回,在country Card里面没有的适用地区。
|
||||
List<CountryCardManageReleaseEO> countryCardManageReleaseEOList = this.list();
|
||||
|
||||
//如果查询标识是空,则是在countryCard管理发布页面新增数据时使用:管理发布页新增查询的是,所有未创建countryCard的适用市场。
|
||||
//如果查询标识不是空,则是在CountryCard的首页使用:首页查询的是 所有已创建了countryCard的适用市场。
|
||||
if (StringUtils.isEmpty(queryFlag)) {
|
||||
if (StringUtils.equals(queryFlag, QueryFlagEnum.GET_ALL_APPLY_MARKET.getValue())) {
|
||||
result = dictModelList;
|
||||
}else if (StringUtils.equals(queryFlag,QueryFlagEnum.GET_NOT_CREATE_APPLY_MARKET.getValue())) {
|
||||
if(CollectionUtils.isEmpty(countryCardManageReleaseEOList)){
|
||||
result = dictModelList;
|
||||
}else {
|
||||
@@ -236,7 +239,7 @@ public class CountryCardManageReleaseEOServiceImpl extends ServiceImpl<CountryCa
|
||||
}
|
||||
}
|
||||
}
|
||||
}else {
|
||||
}else if(StringUtils.equals(queryFlag,QueryFlagEnum.GET_RELEASED_APPLY_MARKET.getValue())){
|
||||
if(CollectionUtils.isEmpty(countryCardManageReleaseEOList)){
|
||||
result = null;
|
||||
}else {
|
||||
@@ -250,6 +253,26 @@ public class CountryCardManageReleaseEOServiceImpl extends ServiceImpl<CountryCa
|
||||
}
|
||||
}
|
||||
|
||||
if(flag){
|
||||
result.add(dictModel);
|
||||
}
|
||||
}
|
||||
}
|
||||
}else if(StringUtils.equals(queryFlag,QueryFlagEnum.GET_CREATE_APPLY_MARKET.getValue())){
|
||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
if(CollectionUtils.isEmpty(countryCardManageReleaseEOList)){
|
||||
result = null;
|
||||
}else {
|
||||
for (DictModel dictModel : dictModelList) {
|
||||
boolean flag = false;
|
||||
for (CountryCardManageReleaseEO countryCardManageReleaseEO : countryCardManageReleaseEOList) {
|
||||
if(StringUtils.equals(dictModel.getValue(),countryCardManageReleaseEO.getApplyMarket())
|
||||
&& StringUtils.equals(countryCardManageReleaseEO.getCreateBy(),currentUser.getUsername())){
|
||||
flag = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(flag){
|
||||
result.add(dictModel);
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.jero.modules.problemKnowledgeBase.service.impl;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseClassifyEO;
|
||||
import com.jero.modules.problemKnowledgeBase.mapper.ProblemKnowledgeBaseClassifyEOMapper;
|
||||
import com.jero.modules.problemKnowledgeBase.service.IProblemKnowledgeBaseClassifyEOService;
|
||||
import com.jero.modules.project.entity.ConditionAssessmentEO;
|
||||
import com.jero.modules.system.entity.SysUser;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
import com.jero.modules.system.util.StringUtils;
|
||||
@@ -10,10 +11,8 @@ 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.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
import java.text.Collator;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
@@ -99,7 +98,15 @@ public class ProblemKnowledgeBaseClassifyEOServiceImpl extends ServiceImpl<Probl
|
||||
*/
|
||||
@Override
|
||||
public List<ProblemKnowledgeBaseClassifyEO> queryList() {
|
||||
return list();
|
||||
List<ProblemKnowledgeBaseClassifyEO> result = this.list();
|
||||
// 匿名比较器排序
|
||||
Collections.sort(result, new Comparator<ProblemKnowledgeBaseClassifyEO>() {
|
||||
@Override
|
||||
public int compare(ProblemKnowledgeBaseClassifyEO p1, ProblemKnowledgeBaseClassifyEO p2) {
|
||||
return p1.getProblemLabel().compareTo(p2.getProblemLabel());
|
||||
}
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -50,6 +50,8 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
||||
private IProblemKnowledgeBaseClassifyEOService problemKnowledgeBaseClassifyEOService;
|
||||
@Autowired
|
||||
private ISysDictService sysDictService;
|
||||
@Autowired
|
||||
private IProblemKnowledgeBaseCommentEOService problemKnowledgeBaseCommentEOService;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
@@ -108,6 +110,18 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
||||
@Override
|
||||
public void deleteByIds(List<String> ids) {
|
||||
removeByIds(ids);
|
||||
|
||||
QueryWrapper deleteWrapper = new QueryWrapper<>();
|
||||
deleteWrapper.in("problem_knowledge_base_id",ids);
|
||||
this.problemKnowledgeBaseUserEOService.remove(deleteWrapper);
|
||||
|
||||
this.problemKnowledgeBasePraiseEOService.remove(deleteWrapper);
|
||||
|
||||
this.problemKnowledgeBaseCollectEOService.remove(deleteWrapper);
|
||||
|
||||
this.problemKnowledgeBaseBrowsingHistoryEOService.remove(deleteWrapper);
|
||||
|
||||
this.problemKnowledgeBaseCommentEOService.remove(deleteWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -308,20 +322,25 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
||||
|
||||
String targetMarket = data.getTargetMarket();
|
||||
if(StringUtils.isNotEmpty(targetMarket) && CollectionUtils.isNotEmpty(regionList)){
|
||||
String[] targetMarketArr = targetMarket.split(",");
|
||||
String targetMarket_dicText = "";
|
||||
if(StringUtils.equals(cut, CutEnum.CN.getValue())){
|
||||
targetMarket_dicText = regionList.stream().filter(region -> {
|
||||
boolean flag = false;
|
||||
if (StringUtils.equals(targetMarket, region.getValue())) {
|
||||
flag = true;
|
||||
for (String s : targetMarketArr) {
|
||||
if (StringUtils.equals(s, region.getValue())) {
|
||||
flag = true;
|
||||
}
|
||||
}
|
||||
return flag;
|
||||
}).map(DictModel::getText).collect(Collectors.joining(","));
|
||||
}else if(StringUtils.equals(cut, CutEnum.EN.getValue())){
|
||||
targetMarket_dicText = regionList.stream().filter(region -> {
|
||||
boolean flag = false;
|
||||
if (StringUtils.equals(targetMarket, region.getValue())) {
|
||||
flag = true;
|
||||
for (String s : targetMarketArr) {
|
||||
if (StringUtils.equals(s, region.getValue())) {
|
||||
flag = true;
|
||||
}
|
||||
}
|
||||
return flag;
|
||||
}).map(DictModel::getTextEn).collect(Collectors.joining(","));
|
||||
@@ -348,11 +367,13 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
||||
List<String> problemKnowledgeBaseIdList = problemKnowledgeBaseUserEOList.stream().map(ProblemKnowledgeBaseUserEO::getProblemKnowledgeBaseId).distinct().collect(Collectors.toList());
|
||||
|
||||
queryWrapper.lambda().and(query -> {
|
||||
query.eq(ProblemKnowledgeBaseEO::getShowPermissions,ShowPermissionsEnum.OPEN.getValue()).
|
||||
or(o -> {
|
||||
query.eq(ProblemKnowledgeBaseEO::getShowPermissions,ShowPermissionsEnum.OPEN.getValue());
|
||||
if(CollectionUtils.isNotEmpty(problemKnowledgeBaseIdList)){
|
||||
query.or(o -> {
|
||||
o.eq(ProblemKnowledgeBaseEO::getShowPermissions,ShowPermissionsEnum.PRIVACY.getValue());
|
||||
o.in(ProblemKnowledgeBaseEO::getId,problemKnowledgeBaseIdList);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
String searchStr = problemKnowledgeBaseEO.getSearchStr();
|
||||
|
||||
@@ -44,7 +44,6 @@ public class ProjectLibraryBaseController extends JeroController<ProjectLibraryB
|
||||
*/
|
||||
@AutoLog(value = "项目库基础表-分页列表查询")
|
||||
@ApiOperation(value="项目库基础表-分页列表查询", notes="项目库基础表-分页列表查询")
|
||||
@RequiresPermissions("projectLibraryBase:page")
|
||||
@PostMapping(value = "/page")
|
||||
public Result<?> queryPageList(@RequestBody Map<String,Object> params) {
|
||||
IPage<ProjectLibraryBase> pageList= projectLibraryBaseService.queryPageList(params);
|
||||
|
||||
@@ -7,9 +7,9 @@ public enum ProjectTaskPlanningNameEnum {
|
||||
// PREHOMO_DEADLINE("Pre-Homo","Pre-Homo"),
|
||||
// ATTESTATION_START_TIME("认证开始","Certification begins"),
|
||||
// ATTESTATION_END_TIME("认证结束"," End of certification"),
|
||||
PREHOMO_DEADLINE("Pre-Homo确认","Pre-Homo Confirmation"), // name:Pre-Homo value:Pre-Homo
|
||||
ATTESTATION_START_TIME("认证结束","Homo Completion"),// name:认证开始 value:Certification begins
|
||||
ATTESTATION_END_TIME("认证开始","Homo KO"),// name:认证结束 value:End of certification
|
||||
PREHOMO_DEADLINE("摸底试验结束","Pre-Homo Confirmation"), // name:Pre-Homo value:Pre-Homo
|
||||
ATTESTATION_START_TIME("认证试验结束","Homo Completion"),// name:认证开始 value:Certification begins
|
||||
ATTESTATION_END_TIME("认证批准","Homo KO"),// name:认证结束 value:End of certification
|
||||
VERIFY_DEADLINE("验证符合性确认","Validation Compliance Confirmation"),
|
||||
;
|
||||
String name;
|
||||
|
||||
@@ -257,7 +257,7 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi
|
||||
title = "编号,标题,状态,技术领域,责任领域,相关项目,设计符合性,Pre-Homo确认,验证符合性";
|
||||
fileName = "符合性结果" + ".xlsx";
|
||||
}else if(StringUtils.equals(cut,CutEnum.EN.getValue())){
|
||||
title = "Serial number,Title,State,Technology territory,Responsible Field,Relevant project,Design conformance,Pre-Homo Confirm,Verify conformance";
|
||||
title = "Number,Title,Status,Tech field,Responsible Field,Relevant project,Design Compliance Confirmation,Pre-Homo Confirmation,Validation Compliance Confirmation";
|
||||
fileName = "Compliance results" + ".xlsx";
|
||||
}
|
||||
OutputStream os = null;
|
||||
@@ -281,7 +281,7 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi
|
||||
|
||||
//设置居中、表头值。
|
||||
for (int i = 0; i < firstLineTitleArr.length; i++){
|
||||
sheet.setColumnWidth(i,5000);
|
||||
sheet.setColumnWidth(i,8000);
|
||||
Cell cell = firstRow.createCell(i);
|
||||
cell.setCellStyle(titleCellStyle);
|
||||
cell.setCellValue(firstLineTitleArr[i]);
|
||||
@@ -367,7 +367,7 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi
|
||||
title = "责任领域,相关项目,设计符合性,Pre-Homo确认,验证符合性";
|
||||
fileName = "符合性结果" + ".xlsx";
|
||||
}else if(StringUtils.equals(cut,CutEnum.EN.getValue())){
|
||||
title = "Responsible Field,Relevant project,Design conformance,Pre-Homo Confirm,Verify conformance";
|
||||
title = "Responsible Field,Relevant project,Design Compliance Confirmation,Pre-Homo Confirmation,Validation Compliance Confirmation";
|
||||
fileName = "Compliance results" + ".xlsx";
|
||||
}
|
||||
OutputStream os = null;
|
||||
@@ -391,7 +391,7 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi
|
||||
|
||||
//设置居中、表头值。
|
||||
for (int i = 0; i < firstLineTitleArr.length; i++){
|
||||
sheet.setColumnWidth(i,5000);
|
||||
sheet.setColumnWidth(i,8000);
|
||||
Cell cell = firstRow.createCell(i);
|
||||
cell.setCellStyle(titleCellStyle);
|
||||
cell.setCellValue(firstLineTitleArr[i]);
|
||||
|
||||
@@ -134,6 +134,22 @@ public class LawsMonthlyReportTitleTemplateEOController extends JeroController<L
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 目录删除验证
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "月报标题模板-批量删除")
|
||||
@ApiOperation(value="月报标题模板-批量删除", notes="月报标题模板-批量删除")
|
||||
@GetMapping(value = "/verifyDelete")
|
||||
public Result<?> verifyDelete(@RequestParam(name="ids",required=true) String ids) {
|
||||
String flag = this.lawsMonthlyReportTitleTemplateEOService.verifyDelete(Arrays.asList(ids.split(",")));
|
||||
return Result.OK(flag);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
|
||||
@@ -193,4 +193,10 @@ public class LawsMonthlyReportWriteEO implements Serializable {
|
||||
@TableField(exist = false)
|
||||
private String ids;
|
||||
|
||||
//新添字段
|
||||
private String relatedAreasCn;//相关领域中文
|
||||
private String relatedAreasEn;//相关领域英文
|
||||
private String source;//来源
|
||||
private String time;//日期
|
||||
|
||||
}
|
||||
|
||||
@@ -9,7 +9,8 @@ package com.jero.modules.report.enums;
|
||||
public enum ContentTemplateEnum {
|
||||
DEFAULT_TEMPLATE("默认模板","1"),
|
||||
NEW_REQUEST_LIST_TEMPLATE("新征求意见清单模板","2"),
|
||||
NEW_RELEASE_STANDARD_MANIFEST_TEMPLATE("新发布标准清单模板","3");
|
||||
NEW_RELEASE_STANDARD_MANIFEST_TEMPLATE("新发布标准清单模板","3"),
|
||||
INDUSTRY_INFORMATION_TRENDS("行业资讯动态","4");
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -29,5 +29,9 @@
|
||||
<result column="laws_contact" property="lawsContact" />
|
||||
<result column="link" property="link" />
|
||||
<result column="export_state" property="exportState" />
|
||||
<result column="related_areas_cn" property="relatedAreasCn" />
|
||||
<result column="related_areas_en" property="relatedAreasEn" />
|
||||
<result column="source" property="source" />
|
||||
<result column="time" property="time" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
|
||||
@@ -48,6 +48,13 @@ public interface ILawsMonthlyReportTitleTemplateEOService extends IService<LawsM
|
||||
*/
|
||||
void deleteByIds(List<String> ids);
|
||||
|
||||
/**
|
||||
* 目录删除验证
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
String verifyDelete(List<String> ids);
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
|
||||
@@ -121,6 +121,32 @@ public class LawsMonthlyReportTitleTemplateEOServiceImpl extends ServiceImpl<Law
|
||||
removeByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 目录删除验证
|
||||
* @param ids
|
||||
*/
|
||||
@Override
|
||||
public String verifyDelete(List<String> ids) {
|
||||
//标题下存在内容或子标题时不能删除
|
||||
//1. 判断是否存在子标题
|
||||
LambdaQueryWrapper<LawsMonthlyReportTitleTemplateEO> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.in(LawsMonthlyReportTitleTemplateEO::getParentId,ids);
|
||||
List<LawsMonthlyReportTitleTemplateEO> list = this.list(wrapper);
|
||||
if(list.size() != 0){
|
||||
//不能删除
|
||||
return "false";
|
||||
}
|
||||
//2. 判断是否存在内容 memories_chapter
|
||||
LambdaQueryWrapper<LawsMonthlyReportWriteEO> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.in(LawsMonthlyReportWriteEO::getMemoriesChapter,ids);
|
||||
List<LawsMonthlyReportWriteEO> lawsMonthlyReportWriteEOS = lawsMonthlyReportWriteEOService.list(lambdaQueryWrapper);
|
||||
if(lawsMonthlyReportWriteEOS.size() != 0){
|
||||
//不能删除
|
||||
return "false";
|
||||
}
|
||||
return "true";
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
|
||||
@@ -414,7 +414,16 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
if(StringUtils.isNotBlank(lawsMonthlyReportWriteEO.getIds())){
|
||||
wrapper.in(LawsMonthlyReportWriteEO::getId,Arrays.asList(lawsMonthlyReportWriteEO.getIds().split(",")));
|
||||
}
|
||||
//管理员查看全部数据,其余人只能查看自己的数据
|
||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
List<String> rolesList = sysBaseApi.getRolesByUsername(currentUser.getUsername());
|
||||
if(!rolesList.contains(ProjectRoleEnum.ADMIN.getCode())){
|
||||
wrapper.in(LawsMonthlyReportWriteEO::getCreateBy,currentUser.getUsername());
|
||||
}
|
||||
List<LawsMonthlyReportWriteEO> lawsMonthlyReportWriteEOS = this.list(wrapper);
|
||||
//法规联系人
|
||||
List<LoginUser> loginUserList = getlawsContact(lawsMonthlyReportWriteEOS);
|
||||
|
||||
|
||||
List<String> lawsMonthlyReportIdList = lawsMonthlyReportWriteEOS.stream().map(LawsMonthlyReportWriteEO::getId).collect(Collectors.toList());
|
||||
//新征求意见清单模板
|
||||
@@ -456,8 +465,8 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
List<LawsMonthlyReportTitleTemplateEO> lawsMonthlyReportTitleTemplateEOS = lawsMonthlyReportTitleTemplateEOService.list();
|
||||
lawsMonthlyReportTitleTemplateEOS = lawsMonthlyReportTitleTemplateEOS.stream()
|
||||
.filter(e -> memoriesChapterList.contains(e.getId())).collect(Collectors.toList());
|
||||
|
||||
String path = uploadpath + "/tempZip";
|
||||
long l = System.currentTimeMillis();
|
||||
String path = uploadpath + "/tempZip"+l;
|
||||
File fileTemp = new File(path);
|
||||
if (fileTemp.exists()) {
|
||||
fileTemp.delete();
|
||||
@@ -465,7 +474,7 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
fileTemp.mkdirs();
|
||||
OutputStream os = null;
|
||||
try {
|
||||
createWord(path,lawsMonthlyReportWriteEOS,lawsMonthlyReportTitleTemplateEOS);
|
||||
createWord(path,lawsMonthlyReportWriteEOS,lawsMonthlyReportTitleTemplateEOS,loginUserList);
|
||||
ZipUtil.zip(path, path + ".zip");
|
||||
//文件
|
||||
os = response.getOutputStream();
|
||||
@@ -477,13 +486,15 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
os.write(len);
|
||||
}
|
||||
os.flush();
|
||||
os.close();
|
||||
fis.close();
|
||||
} catch (Exception e) {
|
||||
|
||||
}finally {
|
||||
IOUtils.closeQuietly(os);
|
||||
File file = new File(uploadpath + "/tempZip");
|
||||
File file = new File(uploadpath + "/tempZip"+l);
|
||||
FileUtil.deleteContents(file);
|
||||
File fileTem = new File(uploadpath + "/tempZip.zip");
|
||||
File fileTem = new File(uploadpath + "/tempZip"+l+".zip");
|
||||
FileUtil.deleteContents(fileTem);
|
||||
}
|
||||
//导出月报后修改列表状态
|
||||
@@ -505,6 +516,28 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
}
|
||||
}
|
||||
|
||||
private List<LoginUser> getlawsContact(List<LawsMonthlyReportWriteEO> lawsMonthlyReportWriteEOS) {
|
||||
List<String> userIdList = lawsMonthlyReportWriteEOS.stream().map(LawsMonthlyReportWriteEO::getLawsContact).collect(Collectors.toList());
|
||||
//法规联系人
|
||||
List<String> userIds = new ArrayList<>();
|
||||
for (String s : userIdList) {
|
||||
if(StringUtils.isNotBlank(s)){
|
||||
if(s.contains(",")){
|
||||
userIds.addAll(Arrays.asList(s.split(",")));
|
||||
}else{
|
||||
userIds.add(s);
|
||||
}
|
||||
}
|
||||
}
|
||||
List<JSONObject> jsonObjects = sysBaseApi.queryUsersByIds(StringUtils.join(userIds, ","));
|
||||
List<LoginUser> userList = new ArrayList<>();
|
||||
for (JSONObject jsonObject : jsonObjects) {
|
||||
LoginUser loginUser = JSONObject.parseObject(jsonObject.toJSONString(), LoginUser.class);
|
||||
userList.add(loginUser);
|
||||
}
|
||||
return userList;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*创建word文件
|
||||
@@ -514,7 +547,8 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
*/
|
||||
private void createWord(String path,
|
||||
List<LawsMonthlyReportWriteEO> lawsMonthlyReportWriteEOS,
|
||||
List<LawsMonthlyReportTitleTemplateEO> lawsMonthlyReportTitleTemplateEOS){
|
||||
List<LawsMonthlyReportTitleTemplateEO> lawsMonthlyReportTitleTemplateEOS,
|
||||
List<LoginUser> loginUserList){
|
||||
//一级菜单
|
||||
List<String> parentIdList = lawsMonthlyReportTitleTemplateEOS.stream().map(LawsMonthlyReportTitleTemplateEO::getParentId).distinct().collect(Collectors.toList());
|
||||
LambdaQueryWrapper<LawsMonthlyReportTitleTemplateEO> wrapper = new LambdaQueryWrapper<>();
|
||||
@@ -583,13 +617,15 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
//内容中文版
|
||||
XWPFDocument documentContentCn = new XWPFDocument();
|
||||
FileOutputStream outContentCn = new FileOutputStream(wordFileContentCn);
|
||||
wordContent(lawsMonthlyReportWriteEOS, lawsMonthlyReportTitleTemplateEOS, reportTitleOneList, titleCN, documentContentCn,CutEnum.CN.getValue());
|
||||
wordContent(lawsMonthlyReportWriteEOS, lawsMonthlyReportTitleTemplateEOS, reportTitleOneList, titleCN,
|
||||
documentContentCn,CutEnum.CN.getValue(),loginUserList);
|
||||
documentContentCn.write(outContentCn);
|
||||
|
||||
//内容英文版
|
||||
XWPFDocument documentContentEn = new XWPFDocument();
|
||||
FileOutputStream outContentEn = new FileOutputStream(wordFileContentEn);
|
||||
wordContent(lawsMonthlyReportWriteEOS, lawsMonthlyReportTitleTemplateEOS, reportTitleOneList, titleCN, documentContentEn,CutEnum.EN.getValue());
|
||||
wordContent(lawsMonthlyReportWriteEOS, lawsMonthlyReportTitleTemplateEOS, reportTitleOneList, titleEN,
|
||||
documentContentEn,CutEnum.EN.getValue(), loginUserList);
|
||||
documentContentEn.write(outContentEn);
|
||||
|
||||
} catch (IOException e) {
|
||||
@@ -675,7 +711,8 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
List<LawsMonthlyReportTitleTemplateEO> reportTitleOneList,
|
||||
String titleCN,
|
||||
XWPFDocument document,
|
||||
String cut) {
|
||||
String cut,
|
||||
List<LoginUser> loginUserList) {
|
||||
//数据字典
|
||||
List<SysDictItem> sysDictItems = sysDictItemServiceImpl.selectItemsAll();
|
||||
|
||||
@@ -753,9 +790,12 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
||||
String contentTemplate = lawsMonthlyReportWriteEO.getContentTemplate();
|
||||
if(ContentTemplateEnum.DEFAULT_TEMPLATE.getValue().equals(contentTemplate)){
|
||||
//写入模板
|
||||
WordUtil.exportWordExcelDefault(document,lawsMonthlyReportWriteEO,sysDictItems,categoryList,cut);
|
||||
|
||||
WordUtil.exportWordExcelDefault(document,lawsMonthlyReportWriteEO,sysDictItems,categoryList,cut,loginUserList);
|
||||
}
|
||||
if(ContentTemplateEnum.INDUSTRY_INFORMATION_TRENDS.getValue().equals(contentTemplate)){
|
||||
WordUtil.exportWordExcelIndustry(document,lawsMonthlyReportWriteEO,cut);
|
||||
}
|
||||
|
||||
// else if(ContentTemplateEnum.NEW_REQUEST_LIST_TEMPLATE.getValue().equals(contentTemplate)){
|
||||
// //新征求意见清单模板
|
||||
// WordUtil.exportWordExcelAsk(document,lawsMonthlyReportWriteEO,cut);
|
||||
|
||||
@@ -2,7 +2,7 @@ package com.jero.modules.report.util;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.modules.project.service.impl.ProjectLawsInventoryEOServiceImpl;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.modules.report.entity.LawsMonthlyReportWriteEO;
|
||||
import com.jero.modules.report.entity.NewOpinionTemplateEO;
|
||||
import com.jero.modules.report.entity.NewStandardTemplateEO;
|
||||
@@ -36,7 +36,6 @@ import org.openxmlformats.schemas.wordprocessingml.x2006.main.STFldCharType;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.STJc;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.STTblWidth;
|
||||
|
||||
import java.io.FileInputStream;
|
||||
import java.io.InputStream;
|
||||
import java.math.BigInteger;
|
||||
import java.util.Arrays;
|
||||
@@ -44,6 +43,7 @@ import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class WordUtil {
|
||||
|
||||
/**
|
||||
* 导出工具示例
|
||||
*
|
||||
@@ -350,7 +350,8 @@ public class WordUtil {
|
||||
LawsMonthlyReportWriteEO lawsMonthlyReportWriteEO,
|
||||
List<SysDictItem> sysDictItems,
|
||||
List<SysCategory> categoryList,
|
||||
String cut) {
|
||||
String cut,
|
||||
List<LoginUser> loginUserList) {
|
||||
String technologyTerritory = lawsMonthlyReportWriteEO.getTechnologyTerritory();//技术领域
|
||||
String applyCar = lawsMonthlyReportWriteEO.getApplyCar();//适用车型
|
||||
String applyScope = lawsMonthlyReportWriteEO.getApplyScope();//适用范围
|
||||
@@ -363,7 +364,8 @@ public class WordUtil {
|
||||
String contentEn = lawsMonthlyReportWriteEO.getContentEn();//主要内容英文
|
||||
String workProgressCn = lawsMonthlyReportWriteEO.getWorkProgressCn();//NIO工作进展中文
|
||||
String workProgressEn = lawsMonthlyReportWriteEO.getWorkProgressEn();//NIO工作进展英文
|
||||
String lawsContact = lawsMonthlyReportWriteEO.getLawsContact();//法规联系人
|
||||
String lawsContactTemp = lawsMonthlyReportWriteEO.getLawsContact();//法规联系人
|
||||
String lawsContact = getLawsContact(loginUserList, lawsContactTemp);
|
||||
String link = lawsMonthlyReportWriteEO.getLink();//链接
|
||||
String technologyTerritoryName = "";
|
||||
if(org.apache.commons.lang3.StringUtils.isNotBlank(technologyTerritory)){
|
||||
@@ -404,54 +406,163 @@ public class WordUtil {
|
||||
//第1行
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
//第1行
|
||||
setCell(table.getRow(0), "技术领域",technologyTerritoryName);
|
||||
setCell(table, 0, "相关领域",technologyTerritoryName);
|
||||
//第2行
|
||||
setCell(table.getRow(1), "适用车型",applyCarName);
|
||||
setCell(table,1, "适用车型",applyCarName);
|
||||
//第3行
|
||||
setCell(table.getRow(2), "适用范围",applyScopeName);
|
||||
setCell(table,2, "适用范围",applyScopeName);
|
||||
//第4行
|
||||
setCell(table.getRow(3), "状态",stateName);
|
||||
setCell(table,3, "状态",stateName);
|
||||
//第5行
|
||||
setCell(table.getRow(4), "用法",useMethodName);
|
||||
setCell(table,4, "用法",useMethodName);
|
||||
//第6行
|
||||
setCell(table.getRow(5), "实施车型",implementCar);
|
||||
setCell(table,5, "实施车型",implementCar);
|
||||
//第7行
|
||||
setCell(table.getRow(6), "新车型实施日期",newCarImplementTime);
|
||||
setCell(table,6, "新车型实施日期",newCarImplementTime);
|
||||
//第8行
|
||||
setCell(table.getRow(7), "在产车实施日期",productionCarImplementTime);
|
||||
setCell(table,7, "在产车实施日期",productionCarImplementTime);
|
||||
//第9行
|
||||
setCell(table.getRow(8), "主要内容中文",contentCn);
|
||||
setCell(table,8, "主要内容",contentCn);
|
||||
//第10行
|
||||
setCell(table.getRow(9), "NIO工作进展中文",workProgressCn);
|
||||
setCell(table,9, "NIO工作进展",workProgressCn);
|
||||
//第11行
|
||||
setCell(table.getRow(10), "法规联系人",lawsContact);
|
||||
setCell(table,10, "法规联系人",lawsContact);
|
||||
//第12行
|
||||
setCell(table.getRow(11), "链接",link);
|
||||
setCell(table,11, "链接",link);
|
||||
}else{
|
||||
//第1行
|
||||
setCell(table.getRow(0), "Technical Field",technologyTerritoryName);
|
||||
setCell(table,0, "Related Areas",technologyTerritoryName);
|
||||
//第2行
|
||||
setCell(table.getRow(1), "Vehicle Type",applyCarName);
|
||||
setCell(table,1,"Vehicle Type",applyCarName);
|
||||
//第3行
|
||||
setCell(table.getRow(2), "Scope",applyScopeName);
|
||||
setCell(table,2,"Scope",applyScopeName);
|
||||
//第4行
|
||||
setCell(table.getRow(3), "Status",stateName);
|
||||
setCell(table,3,"Status",stateName);
|
||||
//第5行
|
||||
setCell(table.getRow(4), "usage",useMethodName);
|
||||
setCell(table,4,"usage",useMethodName);
|
||||
//第6行
|
||||
setCell(table.getRow(5), "Implementation Model",implementCar);
|
||||
setCell(table,5,"Implementation Model",implementCar);
|
||||
//第7行
|
||||
setCell(table.getRow(6), "New Type Execution Date",newCarImplementTime);
|
||||
setCell(table,6,"New Type Execution Date",newCarImplementTime);
|
||||
//第8行
|
||||
setCell(table.getRow(7), "New Vehicle Execution Date",productionCarImplementTime);
|
||||
setCell(table,7,"New Vehicle Execution Date",productionCarImplementTime);
|
||||
//第9行
|
||||
setCell(table.getRow(8), "Main Content (English)",contentEn);
|
||||
setCell(table,8,"Main Content",contentEn);
|
||||
//第10行
|
||||
setCell(table.getRow(9), "NIO Work Progress (English)",workProgressEn);
|
||||
setCell(table,9,"NIO Work Progress",workProgressEn);
|
||||
//第11行
|
||||
setCell(table.getRow(10), "Regulatory Contact",lawsContact);
|
||||
setCell(table, 10,"Regulatory Contact",lawsContact);
|
||||
//第12行
|
||||
setCell(table.getRow(11), "Link",link);
|
||||
setCell(table, 11,"Link",link);
|
||||
}
|
||||
// if(CutEnum.CN.getValue().equals(cut)){
|
||||
// //第1行
|
||||
// setCell(table.getRow(0), "相关领域",technologyTerritoryName);
|
||||
// //第2行
|
||||
// setCell(table.getRow(1), "适用车型",applyCarName);
|
||||
// //第3行
|
||||
// setCell(table.getRow(2), "适用范围",applyScopeName);
|
||||
// //第4行
|
||||
// setCell(table.getRow(3), "状态",stateName);
|
||||
// //第5行
|
||||
// setCell(table.getRow(4), "用法",useMethodName);
|
||||
// //第6行
|
||||
// setCell(table.getRow(5), "实施车型",implementCar);
|
||||
// //第7行
|
||||
// setCell(table.getRow(6), "新车型实施日期",newCarImplementTime);
|
||||
// //第8行
|
||||
// setCell(table.getRow(7), "在产车实施日期",productionCarImplementTime);
|
||||
// //第9行
|
||||
// setCell(table.getRow(8), "主要内容",contentCn);
|
||||
// //第10行
|
||||
// setCell(table.getRow(9), "NIO工作进展",workProgressCn);
|
||||
// //第11行
|
||||
// setCell(table.getRow(10), "法规联系人",lawsContact);
|
||||
// //第12行
|
||||
// setCell(table.getRow(11), "链接",link);
|
||||
// }else{
|
||||
// //第1行
|
||||
// setCell(table.getRow(0), "Related Areas",technologyTerritoryName);
|
||||
// //第2行
|
||||
// setCell(table.getRow(1), "Vehicle Type",applyCarName);
|
||||
// //第3行
|
||||
// setCell(table.getRow(2), "Scope",applyScopeName);
|
||||
// //第4行
|
||||
// setCell(table.getRow(3), "Status",stateName);
|
||||
// //第5行
|
||||
// setCell(table.getRow(4), "usage",useMethodName);
|
||||
// //第6行
|
||||
// setCell(table.getRow(5), "Implementation Model",implementCar);
|
||||
// //第7行
|
||||
// setCell(table.getRow(6), "New Type Execution Date",newCarImplementTime);
|
||||
// //第8行
|
||||
// setCell(table.getRow(7), "New Vehicle Execution Date",productionCarImplementTime);
|
||||
// //第9行
|
||||
// setCell(table.getRow(8), "Main Content",contentEn);
|
||||
// //第10行
|
||||
// setCell(table.getRow(9), "NIO Work Progress",workProgressEn);
|
||||
// //第11行
|
||||
// setCell(table.getRow(10), "Regulatory Contact",lawsContact);
|
||||
// //第12行
|
||||
// setCell(table.getRow(11), "Link",link);
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
* 行业资讯动态
|
||||
* @param document
|
||||
* @param lawsMonthlyReportWriteEO
|
||||
* @param cut
|
||||
*/
|
||||
public static void exportWordExcelIndustry(XWPFDocument document,
|
||||
LawsMonthlyReportWriteEO lawsMonthlyReportWriteEO,
|
||||
String cut) {
|
||||
String relatedAreasCn = lawsMonthlyReportWriteEO.getRelatedAreasCn();//相关领域中文
|
||||
String relatedAreasEn = lawsMonthlyReportWriteEO.getRelatedAreasEn();//相关领域英文
|
||||
String source = lawsMonthlyReportWriteEO.getSource();//来源
|
||||
String time = lawsMonthlyReportWriteEO.getTime();//日期
|
||||
String contentCn = lawsMonthlyReportWriteEO.getContentCn();//主要内容中文
|
||||
String contentEn = lawsMonthlyReportWriteEO.getContentEn();//主要内容英文
|
||||
String link = lawsMonthlyReportWriteEO.getLink();//链接
|
||||
|
||||
XWPFTable table = document.createTable(5, 2);
|
||||
|
||||
//表格属性
|
||||
CTTblPr tablePr = table.getCTTbl().addNewTblPr();
|
||||
//表格宽度
|
||||
CTJc cTJc = tablePr.addNewJc();
|
||||
//居中
|
||||
cTJc.setVal(STJc.CENTER);
|
||||
//列宽自动分割
|
||||
CTTblWidth tableWidth = tablePr.addNewTblW();
|
||||
//设置表格宽度
|
||||
tableWidth.setType(STTblWidth.DXA);
|
||||
tableWidth.setW(BigInteger.valueOf(8000));
|
||||
|
||||
|
||||
//第1行
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
//第1行
|
||||
setCell(table, 0, "相关领域",relatedAreasCn);
|
||||
//第2行
|
||||
setCell(table,1, "来源",source);
|
||||
//第3行
|
||||
setCell(table,2, "日期",time);
|
||||
//第4行
|
||||
setCell(table,3, "主要内容",contentCn);
|
||||
//第5行
|
||||
setCell(table,4, "链接",link);
|
||||
}else{
|
||||
//第1行
|
||||
setCell(table,0, "Related Areas",relatedAreasEn);
|
||||
//第2行
|
||||
setCell(table,1,"source",source);
|
||||
//第3行
|
||||
setCell(table,2,"Date",time);
|
||||
//第4行
|
||||
setCell(table,3,"Main Content",contentEn);
|
||||
//第5行
|
||||
setCell(table,4,"Link",link);
|
||||
}
|
||||
}
|
||||
public static void exportWordExcelAsk(XWPFDocument document,
|
||||
@@ -666,18 +777,49 @@ public class WordUtil {
|
||||
return fieldValueName;
|
||||
}
|
||||
|
||||
private static void setCell(XWPFTableRow tableRow, String fieldName,String technologyTerritory) {
|
||||
private static void setCell(XWPFTable table, int number, String fieldName,String technologyTerritory) {
|
||||
|
||||
tableRow.setHeight(500);
|
||||
CTTblWidth ctTblWidth0 = tableRow.getCell(0).getCTTc().addNewTcPr().addNewTcW();
|
||||
table.getRow(number).setHeight(500);
|
||||
CTTblWidth ctTblWidth0 = table.getRow(number).getCell(0).getCTTc().addNewTcPr().addNewTcW();
|
||||
ctTblWidth0.setType(STTblWidth.DXA);
|
||||
ctTblWidth0.setW(BigInteger.valueOf(3000));
|
||||
CTTblWidth ctTblWidth1 = tableRow.getCell(1).getCTTc().addNewTcPr().addNewTcW();
|
||||
ctTblWidth0.setW(BigInteger.valueOf(2000));
|
||||
CTTblWidth ctTblWidth1 = table.getRow(number).getCell(1).getCTTc().addNewTcPr().addNewTcW();
|
||||
ctTblWidth1.setType(STTblWidth.DXA);
|
||||
ctTblWidth1.setW(BigInteger.valueOf(5000));
|
||||
|
||||
tableRow.getCell(0).setText(fieldName);
|
||||
tableRow.getCell(1).setText(technologyTerritory);
|
||||
table.getRow(number).getCell(0).setText(fieldName);
|
||||
table.getRow(number).getCell(1).setText(technologyTerritory);
|
||||
}
|
||||
// private static void setCell(XWPFTableRow tableRow, String fieldName,String technologyTerritory) {
|
||||
//
|
||||
// tableRow.setHeight(500);
|
||||
// CTTblWidth ctTblWidth0 = tableRow.getCell(0).getCTTc().addNewTcPr().addNewTcW();
|
||||
// ctTblWidth0.setType(STTblWidth.DXA);
|
||||
// ctTblWidth0.setW(BigInteger.valueOf(3000));
|
||||
// CTTblWidth ctTblWidth1 = tableRow.getCell(1).getCTTc().addNewTcPr().addNewTcW();
|
||||
// ctTblWidth1.setType(STTblWidth.DXA);
|
||||
// ctTblWidth1.setW(BigInteger.valueOf(5000));
|
||||
//
|
||||
// tableRow.getCell(0).setText(fieldName);
|
||||
// tableRow.getCell(1).setText(technologyTerritory);
|
||||
// }
|
||||
|
||||
private static String getLawsContact(List<LoginUser> userList, String lawsContact) {
|
||||
if(com.jero.modules.system.util.StringUtils.isNotBlank(lawsContact)){
|
||||
List<LoginUser> collect = userList.stream().filter(e -> lawsContact.contains(e.getId())).collect(Collectors.toList());
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (String s : lawsContact.split(",")) {
|
||||
List<LoginUser> loginUserList = collect.stream().filter(e -> e.getId().equals(s)).collect(Collectors.toList());
|
||||
if(loginUserList.size() != 0){
|
||||
sb.append(loginUserList.get(0).getUsername()+",");
|
||||
}
|
||||
}
|
||||
if(com.jero.modules.system.util.StringUtils.isNotBlank(sb)){
|
||||
String substring = sb.substring(0, sb.length() - 1);
|
||||
return substring;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -41,9 +41,12 @@ import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
@@ -127,9 +130,63 @@ public class LawsWarnService {
|
||||
bussDocumentLibraryEOService.dictItem(sysDictItems, entry, cut, onlCgformFieldListTemp,null);
|
||||
bussDocumentLibraryEOService.treeDictItem(categoryList, entry, treeFieldList, cut,null);
|
||||
}
|
||||
//到期前6个月显示红色,到期前12个月显示黄色
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
String newCarTime = String.valueOf(record.get("xin1_che1_xing2_shi2_shi1_ri4_qi1"));
|
||||
String implementTime = String.valueOf(record.get("implement_time"));
|
||||
String currentTime = sdf.format(new Date());
|
||||
if(StringUtils.isNotBlank(newCarTime) && !"null".equals(newCarTime)){
|
||||
try {
|
||||
if(Integer.parseInt(String.valueOf(parameter.get("flag"))) == 0){
|
||||
Date newCarTimeDate = sdf.parse(newCarTime);
|
||||
//当前时间的前6个月
|
||||
String beforeTimeSix = beforeTime(6,new Date());
|
||||
String beforeTimeTwelve = beforeTime(12,new Date());
|
||||
Date parseSix = sdf.parse(beforeTimeSix);
|
||||
Date parseTwelve = sdf.parse(beforeTimeTwelve);
|
||||
if((newCarTimeDate.after(new Date()) && newCarTimeDate.before(parseSix)) || newCarTime.equals(beforeTimeSix)){
|
||||
record.put("new_colour","red");
|
||||
}
|
||||
if((newCarTimeDate.after(parseSix) && newCarTimeDate.before(parseTwelve)) || newCarTime.equals(beforeTimeTwelve)){
|
||||
record.put("new_colour","yellow");
|
||||
}
|
||||
}
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
if(StringUtils.isNotBlank(implementTime) && !"null".equals(implementTime)){
|
||||
try {
|
||||
if(Integer.parseInt(String.valueOf(parameter.get("flag"))) == 1){
|
||||
Date implementTimeDate = sdf.parse(implementTime);
|
||||
//当前时间的前6个月
|
||||
String beforeTimeSix = beforeTime(6,new Date());
|
||||
String beforeTimeTwelve = beforeTime(12,new Date());
|
||||
Date parseSix = sdf.parse(beforeTimeSix);
|
||||
Date parseTwelve = sdf.parse(beforeTimeTwelve);
|
||||
if((implementTimeDate.after(new Date()) && implementTimeDate.before(parseSix)) || implementTime.equals(beforeTimeSix)){
|
||||
record.put("implement_colour","red");
|
||||
}
|
||||
if((implementTimeDate.after(parseSix) && implementTimeDate.before(parseTwelve)) || implementTime.equals(beforeTimeTwelve)){
|
||||
record.put("implement_colour","yellow");
|
||||
}
|
||||
}
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
return infoPage;
|
||||
}
|
||||
private String beforeTime (int month, Date date){
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Calendar calendarBefore = Calendar.getInstance();
|
||||
calendarBefore.setTime(date);
|
||||
calendarBefore.add(Calendar.MONTH, month);
|
||||
Date dateBefore = calendarBefore.getTime();
|
||||
String beforeTime = sdf.format(dateBefore);
|
||||
return beforeTime;
|
||||
}
|
||||
|
||||
public void exportExcel(Map<String, Object> map, HttpServletResponse response, HttpServletRequest request) {
|
||||
String cut = (String) map.get("cut");
|
||||
|
||||
|
After Width: | Height: | Size: 68 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 5.5 KiB |
|
After Width: | Height: | Size: 94 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 178 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 58 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 7.1 KiB |