合并分支 'master' 到 'fix_bug_first_stage'
Master 查看合并请求 laws-nio/laws-weilai!152
@@ -927,3 +927,34 @@ UPDATE `laws_weilai`.`onl_cgform_field` SET `db_field_en_name` = 'Status' WHERE
|
||||
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`;
|
||||
|
||||
--- 用户表 删除工号唯一索引 2022-08-18
|
||||
ALTER TABLE `laws_weilai`.`sys_user`
|
||||
DROP INDEX `uniq_sys_user_work_no`;
|
||||
|
||||
|
||||
-- 工作流 流程表增加流程名称 英文字段 2022-08-19
|
||||
ALTER TABLE `laws_weilai_wkflow`.`bus_process_name`
|
||||
ADD COLUMN `PRC_NAME_EN` varchar(255) NULL COMMENT '流程名称(英文)' AFTER `PROJECT_LAWS_INVENTORY_ID`;
|
||||
|
||||
@@ -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);
|
||||
@@ -1389,6 +1440,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
sysAnnouncement.setSendStatus("0");
|
||||
sysAnnouncement.setSendTime(new Date());
|
||||
sysAnnouncement.setMsgCategory(MessageTypeEnum.HOMO_TASK.getValue());//消息类型
|
||||
sysAnnouncement.setInitiator(currentUser.getUsername()); // 发起人
|
||||
sysAnnouncement.setMsgType(CommonConstant.MSG_TYPE_UESR);//指定用户
|
||||
sysAnnouncement.setTitile(msgTitle);
|
||||
sysAnnouncement.setMsgContent(content);
|
||||
@@ -1516,6 +1568,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
sysAnnouncement.setSendStatus("0");
|
||||
sysAnnouncement.setSendTime(new Date());
|
||||
sysAnnouncement.setMsgCategory(MessageTypeEnum.HOMO_TASK.getValue());//消息类型
|
||||
sysAnnouncement.setInitiator(currentUser.getUsername()); // 发起人
|
||||
sysAnnouncement.setMsgType(CommonConstant.MSG_TYPE_UESR);//指定用户
|
||||
sysAnnouncement.setTitile(msgTitle);
|
||||
sysAnnouncement.setMsgContent(content);
|
||||
@@ -1649,6 +1702,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
sysAnnouncement.setSendStatus("0");
|
||||
sysAnnouncement.setSendTime(new Date());
|
||||
sysAnnouncement.setMsgCategory(MessageTypeEnum.HOMO_TASK.getValue());//消息类型
|
||||
sysAnnouncement.setInitiator(currentUser.getUsername()); // 发起人
|
||||
sysAnnouncement.setMsgType(CommonConstant.MSG_TYPE_UESR);//指定用户
|
||||
sysAnnouncement.setTitile(msgTitle);
|
||||
sysAnnouncement.setMsgContent(content);
|
||||
|
||||
@@ -21,6 +21,7 @@ import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -79,24 +80,26 @@ public class ParamsReportDetailEOController extends JeroController<ParamsReportD
|
||||
@ApiOperation(value="上报库参数项-列表查询", notes="上报库参数项-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
@RequiresPermissions("report:detail:list")
|
||||
public Result<?> queryList(ParamsReportDetailEO paramsReportDetailEO,
|
||||
public Result<?> queryList(ParamsReportDetailVO paramsReportDetailVO,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="100") Integer pageSize,
|
||||
@RequestParam(name = "cut") String cut) {
|
||||
if (StringUtils.isNotEmpty(paramsReportDetailEO.getNioNumber())) {
|
||||
paramsReportDetailEO.setNioNumber(paramsReportDetailEO.getNioNumber().replace("%","\\%"));
|
||||
if (StringUtils.isNotEmpty(paramsReportDetailVO.getNioNumber())) {
|
||||
paramsReportDetailVO.setNioNumber(paramsReportDetailVO.getNioNumber().replace("%","\\%"));
|
||||
}
|
||||
if (StringUtils.isNotEmpty(paramsReportDetailEO.getParamsName())) {
|
||||
paramsReportDetailEO.setParamsName(paramsReportDetailEO.getParamsName().replace("%","\\%"));
|
||||
if (StringUtils.isNotEmpty(paramsReportDetailVO.getParamsName())) {
|
||||
paramsReportDetailVO.setParamsName(paramsReportDetailVO.getParamsName().replace("%","\\%"));
|
||||
}
|
||||
if (StringUtils.isNotEmpty(paramsReportDetailEO.getSdt())) {
|
||||
paramsReportDetailEO.setSdt(paramsReportDetailEO.getSdt().replace("%","\\%"));
|
||||
if (StringUtils.isNotEmpty(paramsReportDetailVO.getSdtName())) {
|
||||
paramsReportDetailVO.setSdt(paramsReportDetailVO.getSdtName().replace("%","\\%"));
|
||||
}
|
||||
if (StringUtils.isNotEmpty(paramsReportDetailEO.getDre())) {
|
||||
paramsReportDetailEO.setDre(paramsReportDetailEO.getDre().replace("%","\\%"));
|
||||
if (StringUtils.isNotEmpty(paramsReportDetailVO.getDreName())) {
|
||||
paramsReportDetailVO.setDre(paramsReportDetailVO.getDreName().replace("%","\\%"));
|
||||
}
|
||||
|
||||
IPage page = new Page(pageNo, pageSize);
|
||||
ParamsReportDetailEO paramsReportDetailEO = new ParamsReportDetailEO();
|
||||
BeanUtils.copyProperties(paramsReportDetailVO, paramsReportDetailEO);
|
||||
IPage list = paramsReportDetailEOService.queryList(page, paramsReportDetailEO, cut);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
@@ -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)) {
|
||||
@@ -752,6 +802,8 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
}
|
||||
}
|
||||
if (CollectionUtil.isNotEmpty(allRelevFileList)) {
|
||||
allRelevFileList = allRelevFileList.stream().distinct().collect(Collectors.toList());
|
||||
|
||||
String exportFile = "导出文件";
|
||||
if (CutEnum.EN.getValue().equals(paramsReportDetailVO.getCut())) {
|
||||
exportFile = "Export file";
|
||||
@@ -884,6 +936,8 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
}
|
||||
}
|
||||
if (CollectionUtil.isNotEmpty(allRelevFileList)) {
|
||||
allRelevFileList = allRelevFileList.stream().distinct().collect(Collectors.toList());
|
||||
|
||||
String exportFile = "导出文件";
|
||||
if (CutEnum.EN.getValue().equals(paramsReportDetailVO.getCut())) {
|
||||
exportFile = "Export file";
|
||||
@@ -1040,12 +1094,12 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
String paramsConfigId = paramsConfigEO.getId();
|
||||
ParamsReportConfigDataEO paramsConfigDataEO = paramsReportConfigDataEOService.queryByConfigIdAndCollectManifestId(paramsConfigId, paramsCollectManifestId); // 参数配置数据
|
||||
StringBuilder configDataBuilder = new StringBuilder(); // 重新组合配置数据
|
||||
if (StringUtils.isNotEmpty(paramsConfigDataEO.getTextData())) {
|
||||
configDataBuilder.append(paramsConfigDataEO.getTextData()).append("#");
|
||||
}
|
||||
if (StringUtils.isNotEmpty(paramsConfigDataEO.getPullData())) {
|
||||
configDataBuilder.append(paramsConfigDataEO.getPullData()).append("#");
|
||||
}
|
||||
if (StringUtils.isNotEmpty(paramsConfigDataEO.getTextData())) {
|
||||
configDataBuilder.append(paramsConfigDataEO.getTextData()).append("#");
|
||||
}
|
||||
if (StringUtils.isNotEmpty(paramsConfigDataEO.getFileConnectId())) {
|
||||
List<OSSFile> ossFileList = ossFileService.getFileInfosByConnectId(paramsConfigDataEO.getFileConnectId());
|
||||
if (CollectionUtil.isNotEmpty(ossFileList)) {
|
||||
@@ -1078,7 +1132,7 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
.map(ParamsReportConfigDataEO::getPullData).distinct().collect(Collectors.joining(paramsReportDetailVO.getSeparator()));
|
||||
|
||||
List<String> fileNameList = new ArrayList<>();
|
||||
paramsReportConfigDataEOS.forEach(paramsReportConfigDataEO -> {
|
||||
for(ParamsReportConfigDataEO paramsReportConfigDataEO : paramsReportConfigDataEOS) {
|
||||
if (StringUtils.isNotEmpty(paramsReportConfigDataEO.getFileConnectId())) {
|
||||
List<OSSFile> ossFileList = ossFileService.getFileInfosByConnectId(paramsReportConfigDataEO.getFileConnectId());
|
||||
if (CollectionUtil.isNotEmpty(ossFileList)) {
|
||||
@@ -1087,16 +1141,17 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
fileList.addAll(ossFileList);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
StringBuilder configDataBuilder = new StringBuilder(); // 重新组合配置数据
|
||||
if (StringUtils.isNotEmpty(textDatas)) {
|
||||
configDataBuilder.append(textDatas).append("#");
|
||||
}
|
||||
if (StringUtils.isNotEmpty(pullDatas)) {
|
||||
configDataBuilder.append(pullDatas).append("#");
|
||||
}
|
||||
if (StringUtils.isNotEmpty(textDatas)) {
|
||||
configDataBuilder.append(textDatas).append("#");
|
||||
}
|
||||
if (CollectionUtil.isNotEmpty(fileNameList)) {
|
||||
fileNameList = fileNameList.stream().distinct().collect(Collectors.toList());
|
||||
configDataBuilder.append(StringUtils.join(fileNameList, paramsReportDetailVO.getSeparator())).append("#");
|
||||
}
|
||||
configData = configDataBuilder.toString();
|
||||
@@ -1210,12 +1265,12 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
begin += bytes.length;
|
||||
}
|
||||
|
||||
if (StringUtils.isNotEmpty(textDatas)) {
|
||||
configDataBuilder.append(textDatas).append("#"); //
|
||||
}
|
||||
if (StringUtils.isNotEmpty(pullDatas)) {
|
||||
configDataBuilder.append(pullDatas).append("#"); //
|
||||
}
|
||||
if (StringUtils.isNotEmpty(textDatas)) {
|
||||
configDataBuilder.append(textDatas).append("#"); //
|
||||
}
|
||||
configData = configDataBuilder.toString();
|
||||
if (configData.contains("#")) { //
|
||||
configData = configData.substring(0, configData.lastIndexOf("#"));
|
||||
@@ -1229,13 +1284,14 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
|
||||
} else {
|
||||
|
||||
if (StringUtils.isNotEmpty(textDatas)) {
|
||||
configDataBuilder.append(textDatas).append("#");
|
||||
}
|
||||
if (StringUtils.isNotEmpty(pullDatas)) {
|
||||
configDataBuilder.append(pullDatas).append("#");
|
||||
}
|
||||
if (StringUtils.isNotEmpty(textDatas)) {
|
||||
configDataBuilder.append(textDatas).append("#");
|
||||
}
|
||||
if (CollectionUtil.isNotEmpty(fileNameList)) {
|
||||
fileNameList = fileNameList.stream().distinct().collect(Collectors.toList()); // 去重
|
||||
configDataBuilder.append(StringUtils.join(fileNameList, ",")).append("#");
|
||||
}
|
||||
configData = configDataBuilder.toString();
|
||||
|
||||
@@ -25,10 +25,12 @@ public class ParamsReportDetailVO {
|
||||
/**工程接口人*/
|
||||
@ApiModelProperty(value = "工程接口人")
|
||||
private String sdt;
|
||||
private String sdtName; // 用于搜索条件
|
||||
|
||||
/**填写人*/
|
||||
@ApiModelProperty(value = "填写人")
|
||||
private String dre;
|
||||
private String dreName; // 用于搜索条件
|
||||
|
||||
|
||||
@ApiModelProperty(value = "参数清单id")
|
||||
|
||||
@@ -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!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,9 +8,14 @@ package com.jero.modules.document.enums;
|
||||
public enum SearchEnum {
|
||||
INDEX_NAME_DOCUMENT("文档库索引名称","documentLibrary"),
|
||||
TYPE_NAME_DOCUMENT("文档库类型","document"),
|
||||
INDEX_NAME_LAWS_MONTHLY_REPORT("法规月报索引名称","lawsMonthlyReportManage"),
|
||||
TYPE_NAME_LAWS_MONTHLY_REPORT("法规月报类型名称","lawsMonthlyReport"),
|
||||
FULL_TEXT_SEARCH("全部中文","fulltextsearchcn"),
|
||||
FULL_TEXT_SEARCH_CN("全部中文","fulltextsearchcn"),
|
||||
FULL_TEXT_SEARCH_EN("全部英文","fulltextsearchen");
|
||||
FULL_TEXT_SEARCH_EN("全部英文","fulltextsearchen"),
|
||||
INDEX_PROBLEM_KNOWLEDGE_BASE("问题知识库索引名称","problemKnowledgeBase"),
|
||||
TYPE_PROBLEM_KNOWLEDGE_BASE_CN("问题知识库类型","problemKnowledgeBaseTypeCn"),
|
||||
TYPE_PROBLEM_KNOWLEDGE_BASE_EN("问题知识库类型","problemKnowledgeBaseTypeEn");
|
||||
|
||||
String name;
|
||||
String value;
|
||||
|
||||
@@ -86,7 +86,7 @@ public class ExtRepoDataController extends JeroController<ExtRepoData, IExtRepoD
|
||||
if (StringUtils.isNotBlank(createTime)) {
|
||||
String[] createTimeArr = createTime.split(",");
|
||||
if (createTimeArr.length >= 2) {
|
||||
queryWrapper.between(ExtRepoData::getCreateTime, createTimeArr[0], createTimeArr[1]);
|
||||
queryWrapper.between(ExtRepoData::getCreateTime, createTimeArr[0]+" 00:00:00", createTimeArr[1]+" 23:59:59");
|
||||
}
|
||||
}
|
||||
queryWrapper.eq(ExtRepoData::getSupFolder, extRepoData.getSupFolder());
|
||||
|
||||
@@ -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";
|
||||
}
|
||||
|
||||
@@ -289,7 +292,7 @@ public class LawsTechnologyEvaluationItemResultEOServiceImpl extends ServiceImpl
|
||||
//创建表头
|
||||
String[] titleArr = title.split(",");
|
||||
for (int i=0; i<=10; i++){
|
||||
sheet.setColumnWidth(i,4000);
|
||||
sheet.setColumnWidth(i,5000);
|
||||
Cell cell = firstRow.createCell(i);
|
||||
cell.setCellStyle(titleCellStyle);
|
||||
cell.setCellValue(titleArr[i]);
|
||||
@@ -402,7 +405,7 @@ public class LawsTechnologyEvaluationItemResultEOServiceImpl extends ServiceImpl
|
||||
public String disposeDate(Date date){
|
||||
String result = "";
|
||||
try {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
if(date != null){
|
||||
result = sdf.format(date);
|
||||
}
|
||||
|
||||
@@ -111,8 +111,8 @@ public class ProblemKnowledgeBaseClassifyEOController extends JeroController<Pro
|
||||
@AutoLog(value = "问题知识库-分类表-通过id删除")
|
||||
@ApiOperation(value="问题知识库-分类表-通过id删除", notes="问题知识库-分类表-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||
problemKnowledgeBaseClassifyEOService.deleteById(id);
|
||||
public Result<?> delete(@RequestParam(name="id",required=true) String id,@RequestParam(name="cut",required=true) String cut) {
|
||||
problemKnowledgeBaseClassifyEOService.deleteById(id,cut);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
@@ -125,8 +125,8 @@ public class ProblemKnowledgeBaseClassifyEOController extends JeroController<Pro
|
||||
@AutoLog(value = "问题知识库-分类表-批量删除")
|
||||
@ApiOperation(value="问题知识库-分类表-批量删除", notes="问题知识库-分类表-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.problemKnowledgeBaseClassifyEOService.deleteByIds(Arrays.asList(ids.split(",")));
|
||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids,@RequestParam(name="cut",required=true) String cut) {
|
||||
this.problemKnowledgeBaseClassifyEOService.deleteByIds(Arrays.asList(ids.split(",")),cut);
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ 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"),
|
||||
GET_CREATE_APPLY_MARKET("获取所有自己已创建的countryCard的适用市场","","3"),
|
||||
;
|
||||
|
||||
String cnName;
|
||||
|
||||
@@ -34,7 +34,7 @@ public interface IProblemKnowledgeBaseClassifyEOService extends IService<Problem
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
void deleteById(String id);
|
||||
void deleteById(String id,String cut);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
@@ -42,7 +42,7 @@ public interface IProblemKnowledgeBaseClassifyEOService extends IService<Problem
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
void deleteByIds(List<String> ids);
|
||||
void deleteByIds(List<String> ids,String cut);
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
|
||||
@@ -6,6 +6,7 @@ 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;
|
||||
@@ -19,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;
|
||||
|
||||
@@ -257,13 +259,15 @@ public class CountryCardManageReleaseEOServiceImpl extends ServiceImpl<CountryCa
|
||||
}
|
||||
}
|
||||
}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())){
|
||||
if(StringUtils.equals(dictModel.getValue(),countryCardManageReleaseEO.getApplyMarket())
|
||||
&& StringUtils.equals(countryCardManageReleaseEO.getCreateBy(),currentUser.getUsername())){
|
||||
flag = true;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,13 @@
|
||||
package com.jero.modules.problemKnowledgeBase.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseClassifyEO;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseEO;
|
||||
import com.jero.modules.problemKnowledgeBase.mapper.ProblemKnowledgeBaseClassifyEOMapper;
|
||||
import com.jero.modules.problemKnowledgeBase.service.IProblemKnowledgeBaseClassifyEOService;
|
||||
import com.jero.modules.problemKnowledgeBase.service.IProblemKnowledgeBaseEOService;
|
||||
import com.jero.modules.project.entity.ConditionAssessmentEO;
|
||||
import com.jero.modules.system.entity.SysUser;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
@@ -30,6 +35,8 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
public class ProblemKnowledgeBaseClassifyEOServiceImpl extends ServiceImpl<ProblemKnowledgeBaseClassifyEOMapper, ProblemKnowledgeBaseClassifyEO> implements IProblemKnowledgeBaseClassifyEOService {
|
||||
@Autowired
|
||||
private ISysUserService sysUserService;
|
||||
@Autowired
|
||||
private IProblemKnowledgeBaseEOService problemKnowledgeBaseEOService;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
@@ -65,7 +72,8 @@ public class ProblemKnowledgeBaseClassifyEOServiceImpl extends ServiceImpl<Probl
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteById(String id) {
|
||||
public void deleteById(String id,String cut) {
|
||||
checkData(Arrays.asList(id.split(",")),cut);
|
||||
removeById(id);
|
||||
}
|
||||
|
||||
@@ -76,7 +84,8 @@ public class ProblemKnowledgeBaseClassifyEOServiceImpl extends ServiceImpl<Probl
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public void deleteByIds(List<String> ids) {
|
||||
public void deleteByIds(List<String> ids,String cut) {
|
||||
checkData(ids,cut);
|
||||
removeByIds(ids);
|
||||
}
|
||||
|
||||
@@ -144,4 +153,21 @@ public class ProblemKnowledgeBaseClassifyEOServiceImpl extends ServiceImpl<Probl
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id验证数据是否能被删除。
|
||||
* @param idList
|
||||
*/
|
||||
public void checkData(List<String> idList,String cut){
|
||||
QueryWrapper<ProblemKnowledgeBaseEO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.lambda().in(ProblemKnowledgeBaseEO::getProblemType,idList);
|
||||
List<ProblemKnowledgeBaseEO> problemKnowledgeBaseEOS = this.problemKnowledgeBaseEOService.list(queryWrapper);
|
||||
if(CollectionUtils.isNotEmpty(problemKnowledgeBaseEOS)){
|
||||
if(StringUtils.equals(cut, CutEnum.CN.getValue())){
|
||||
throw new JeroBootException("分类不能删除,已经被问题知识库引用!");
|
||||
}else if(StringUtils.equals(cut, CutEnum.EN.getValue())){
|
||||
throw new JeroBootException("Classification cannot be deleted, has been referenced by the problem knowledge base!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,22 +1,33 @@
|
||||
package com.jero.modules.problemKnowledgeBase.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.es.JeroElasticsearchTemplate;
|
||||
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.document.enums.SearchEnum;
|
||||
import com.jero.modules.document.utils.ReadPdfUtil;
|
||||
import com.jero.modules.document.utils.ReadWordUtil;
|
||||
import com.jero.modules.oss.entity.OSSFile;
|
||||
import com.jero.modules.oss.service.IOSSFileService;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.*;
|
||||
import com.jero.modules.problemKnowledgeBase.enums.CollectStatusEnum;
|
||||
import com.jero.modules.problemKnowledgeBase.enums.PraiseStatusEnum;
|
||||
import com.jero.modules.problemKnowledgeBase.enums.ShowPermissionsEnum;
|
||||
import com.jero.modules.problemKnowledgeBase.mapper.ProblemKnowledgeBaseEOMapper;
|
||||
import com.jero.modules.problemKnowledgeBase.service.*;
|
||||
import com.jero.modules.searchcenter.enums.ModuleTypeFlagEnum;
|
||||
import com.jero.modules.system.enums.DicCodeEnum;
|
||||
import com.jero.modules.system.service.ISysDictService;
|
||||
import com.jero.modules.system.util.StringUtils;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.*;
|
||||
@@ -50,6 +61,16 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
||||
private IProblemKnowledgeBaseClassifyEOService problemKnowledgeBaseClassifyEOService;
|
||||
@Autowired
|
||||
private ISysDictService sysDictService;
|
||||
@Autowired
|
||||
private IProblemKnowledgeBaseCommentEOService problemKnowledgeBaseCommentEOService;
|
||||
@Autowired
|
||||
private JeroElasticsearchTemplate jeroElasticsearchTemplate;
|
||||
@Autowired
|
||||
private IOSSFileService iOSSFileService;
|
||||
|
||||
public static final String SEARCH_FLAG = "魑";
|
||||
@Value(value = "${jero.path.upload}")
|
||||
private String uploadpath;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
@@ -66,10 +87,271 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
||||
|
||||
//如果该条问题知识库的展示权限为私密,则创建权限表数据
|
||||
if(StringUtils.equals(problemKnowledgeBaseEO.getShowPermissions(), ShowPermissionsEnum.PRIVACY.getValue())){
|
||||
batchInsertProblemKnowledgeBaseUserEO(problemKnowledgeBaseEO);
|
||||
this.batchInsertProblemKnowledgeBaseUserEO(problemKnowledgeBaseEO);
|
||||
}else {
|
||||
//如果展示权限是公开,则把该数据插入到搜索中心中。
|
||||
//this.addOrUpdateElasticsearch(problemKnowledgeBaseEO);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 将问题知识库数据添加或修改到es中
|
||||
* @param problemKnowledgeBaseEO
|
||||
*/
|
||||
public void addOrUpdateElasticsearch(ProblemKnowledgeBaseEO problemKnowledgeBaseEO){
|
||||
String problemKnowledgeBaseId = problemKnowledgeBaseEO.getId();
|
||||
|
||||
List<Map<String, Object>> mapListTempCn = new ArrayList<>();
|
||||
List<Map<String, Object>> mapListTempEn = new ArrayList<>();
|
||||
|
||||
//查询该数据的文件。
|
||||
StringBuffer fileTextSb = new StringBuffer();
|
||||
List<OSSFile> accessoryFileList = iOSSFileService.getFileInfos(problemKnowledgeBaseEO.getAccessoryFile());
|
||||
if(CollectionUtils.isNotEmpty(accessoryFileList)){
|
||||
for (OSSFile ossFile : accessoryFileList) {
|
||||
String fileText = "";
|
||||
// 读取文件内容
|
||||
if (ossFile.getFileName().endsWith(".doc")
|
||||
|| ossFile.getFileName().endsWith(".docx")
|
||||
|| ossFile.getFileName().endsWith(".DOC")
|
||||
|| ossFile.getFileName().endsWith(".DOCX")) {
|
||||
|
||||
String wordContent = null;
|
||||
try {
|
||||
wordContent = ReadWordUtil.readWord(ossFile.getUrl(),uploadpath);
|
||||
} catch (Exception e) {
|
||||
log.error("文档库: 读取word内容失败");
|
||||
}
|
||||
if (StringUtils.isNotBlank(wordContent)) {
|
||||
fileText = ossFile.getFileName() + " : " +wordContent;
|
||||
}
|
||||
} else if (ossFile.getFileName().endsWith(".pdf") || ossFile.getFileName().endsWith(".PDF")) {
|
||||
String pdfContent = null;
|
||||
try {
|
||||
pdfContent = ReadPdfUtil.readPdf(ossFile.getUrl());
|
||||
} catch (Exception e) {
|
||||
log.error("文档库: 读取PDF文件内容失败");
|
||||
}
|
||||
if (StringUtils.isNotBlank(pdfContent)) {
|
||||
fileText = ossFile.getFileName() + " : " + pdfContent;
|
||||
}
|
||||
}
|
||||
|
||||
fileTextSb.append(fileText);
|
||||
fileTextSb.append("\n");
|
||||
}
|
||||
}
|
||||
|
||||
//sbCn sbEn 这两个字段作为es中英文切换
|
||||
StringBuilder sbCn = new StringBuilder();
|
||||
esFullText(problemKnowledgeBaseEO,sbCn,null,CutEnum.CN.getValue(),fileTextSb.toString());
|
||||
StringBuilder sbEn = new StringBuilder();
|
||||
esFullText(problemKnowledgeBaseEO,null,sbEn,CutEnum.EN.getValue(),fileTextSb.toString());
|
||||
|
||||
Map<String, Object> stringMapCn = new HashMap<>();
|
||||
this.problemKnowledgeBaseEOConvertMapByCut(problemKnowledgeBaseEO,CutEnum.EN.getValue(),stringMapCn);
|
||||
|
||||
Map<String, Object> stringMapEn = new HashMap<>();
|
||||
this.problemKnowledgeBaseEOConvertMapByCut(problemKnowledgeBaseEO,CutEnum.EN.getValue(),stringMapEn);
|
||||
|
||||
this.putMap(problemKnowledgeBaseId,sbCn.toString(),CutEnum.CN.getValue(),stringMapCn,SEARCH_FLAG,"问题知识库");
|
||||
this.putMap(problemKnowledgeBaseId,sbEn.toString(),CutEnum.EN.getValue(),stringMapEn,SEARCH_FLAG,"Problem knowledge base");
|
||||
|
||||
Map<String, Object> stringMapCnBase = new HashMap<>();
|
||||
this.problemKnowledgeBaseEOConvertMapByCut(problemKnowledgeBaseEO,CutEnum.EN.getValue(),stringMapCnBase);
|
||||
Map<String, Object> stringMapEnBase = new HashMap<>();
|
||||
this.problemKnowledgeBaseEOConvertMapByCut(problemKnowledgeBaseEO,CutEnum.EN.getValue(),stringMapEnBase);
|
||||
this.putMap(problemKnowledgeBaseId,sbCn.toString(),CutEnum.CN.getValue(),stringMapCnBase,null,"问题知识库");
|
||||
this.putMap(problemKnowledgeBaseId,sbEn.toString(),CutEnum.EN.getValue(),stringMapEnBase,null,"Problem knowledge base");
|
||||
|
||||
mapListTempCn.add(stringMapCn);
|
||||
mapListTempEn.add(stringMapEn);
|
||||
|
||||
stringMapCnBase.put("id",problemKnowledgeBaseId + "base");
|
||||
mapListTempCn.add(stringMapCnBase);
|
||||
|
||||
stringMapEnBase.put("id",problemKnowledgeBaseId + "base");
|
||||
mapListTempEn.add(stringMapEnBase);
|
||||
|
||||
JSONObject jsonObjectCn = JSON.parseObject(JSON.toJSONString(stringMapCn));
|
||||
JSONObject jsonObjectEn = JSON.parseObject(JSON.toJSONString(stringMapEn));
|
||||
JSONArray arrayCn = JSONArray.parseArray(JSON.toJSONString(mapListTempCn));
|
||||
JSONArray arrayEn = JSONArray.parseArray(JSON.toJSONString(mapListTempEn));
|
||||
|
||||
try {
|
||||
this.deleteElasticsearchData(problemKnowledgeBaseId);
|
||||
|
||||
//问题知识库索引添加数据
|
||||
this.jeroElasticsearchTemplate.saveOrUpdate(SearchEnum.TYPE_PROBLEM_KNOWLEDGE_BASE_EN.getValue(), SearchEnum.TYPE_PROBLEM_KNOWLEDGE_BASE_EN.getValue(), problemKnowledgeBaseId, jsonObjectEn);
|
||||
this.jeroElasticsearchTemplate.saveOrUpdate(SearchEnum.TYPE_PROBLEM_KNOWLEDGE_BASE_CN.getValue(), SearchEnum.TYPE_PROBLEM_KNOWLEDGE_BASE_CN.getValue(), problemKnowledgeBaseId, jsonObjectCn);
|
||||
//全部索引添加数据
|
||||
this.jeroElasticsearchTemplate.saveBatch(SearchEnum.FULL_TEXT_SEARCH_CN.getValue(), SearchEnum.FULL_TEXT_SEARCH_CN.getValue(), arrayCn);
|
||||
this.jeroElasticsearchTemplate.saveBatch(SearchEnum.FULL_TEXT_SEARCH_EN.getValue(), SearchEnum.FULL_TEXT_SEARCH_EN.getValue(), arrayEn);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
log.error("问题知识库添加es失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据问题知识库id删除es中数据
|
||||
* @param problemKnowledgeBaseId
|
||||
*/
|
||||
public void deleteElasticsearchData(String problemKnowledgeBaseId){
|
||||
try {
|
||||
//根据id删除全部索引中数据
|
||||
this.jeroElasticsearchTemplate.delete(SearchEnum.FULL_TEXT_SEARCH_CN.getValue(), SearchEnum.FULL_TEXT_SEARCH_CN.getValue(), problemKnowledgeBaseId);
|
||||
this.jeroElasticsearchTemplate.delete(SearchEnum.FULL_TEXT_SEARCH_EN.getValue(), SearchEnum.FULL_TEXT_SEARCH_EN.getValue(), problemKnowledgeBaseId);
|
||||
|
||||
//根据id删除全部索引中数据
|
||||
this.jeroElasticsearchTemplate.delete(SearchEnum.FULL_TEXT_SEARCH_CN.getValue(), SearchEnum.FULL_TEXT_SEARCH_CN.getValue(), problemKnowledgeBaseId + "base");
|
||||
this.jeroElasticsearchTemplate.delete(SearchEnum.FULL_TEXT_SEARCH_EN.getValue(), SearchEnum.FULL_TEXT_SEARCH_EN.getValue(), problemKnowledgeBaseId + "base");
|
||||
|
||||
//根据id删除问题知识库索引中数据
|
||||
this.jeroElasticsearchTemplate.delete(SearchEnum.TYPE_PROBLEM_KNOWLEDGE_BASE_CN.getValue(), SearchEnum.TYPE_PROBLEM_KNOWLEDGE_BASE_CN.getValue(), problemKnowledgeBaseId);
|
||||
this.jeroElasticsearchTemplate.delete(SearchEnum.TYPE_PROBLEM_KNOWLEDGE_BASE_EN.getValue(), SearchEnum.TYPE_PROBLEM_KNOWLEDGE_BASE_EN.getValue(), problemKnowledgeBaseId);
|
||||
}catch (Exception ex){
|
||||
ex.printStackTrace();
|
||||
log.error("问题知识库根据id删除es数据失败,问题知识库id为:" + problemKnowledgeBaseId);
|
||||
}
|
||||
}
|
||||
|
||||
public void esFullText(ProblemKnowledgeBaseEO problemKnowledgeBaseEO,StringBuilder sbCn,StringBuilder sbEn,String cut,String fileText){
|
||||
if(StringUtils.equals(cut,CutEnum.CN.getValue())){
|
||||
if(StringUtils.isNotEmpty(problemKnowledgeBaseEO.getShowPermissions_dicText())){
|
||||
sbCn.append("展示权限" + ":" + problemKnowledgeBaseEO.getShowPermissions_dicText() + " ");
|
||||
}else {
|
||||
sbCn.append("展示权限" + ":" + "-- ");
|
||||
}
|
||||
|
||||
if(StringUtils.isNotEmpty(problemKnowledgeBaseEO.getTitle())){
|
||||
sbCn.append("标题" + ":" + problemKnowledgeBaseEO.getTitle() + " ");
|
||||
}else {
|
||||
sbCn.append("标题" + ":" + "-- ");
|
||||
}
|
||||
|
||||
if(StringUtils.isNotEmpty(problemKnowledgeBaseEO.getProblemTypeName())){
|
||||
sbCn.append("问题分类" + ":" + problemKnowledgeBaseEO.getProblemTypeName() + " ");
|
||||
}else {
|
||||
sbCn.append("问题分类" + ":" + "-- ");
|
||||
}
|
||||
|
||||
if(StringUtils.isNotEmpty(problemKnowledgeBaseEO.getTargetMarket_dicText())){
|
||||
sbCn.append("市场" + ":" + problemKnowledgeBaseEO.getTargetMarket_dicText() + " ");
|
||||
}else {
|
||||
sbCn.append("市场" + ":" + "-- ");
|
||||
}
|
||||
|
||||
if(StringUtils.isNotEmpty(problemKnowledgeBaseEO.getStandNumber())){
|
||||
sbCn.append("标准编号" + ":" + problemKnowledgeBaseEO.getStandNumber() + " ");
|
||||
}else {
|
||||
sbCn.append("标准编号" + ":" + "-- ");
|
||||
}
|
||||
|
||||
/*if(StringUtils.isNotEmpty(problemKnowledgeBaseEO.getStandTitle())){
|
||||
sbCn.append("标准标题" + ":" + problemKnowledgeBaseEO.getStandTitle() + " ");
|
||||
}else {
|
||||
sbCn.append("标准标题" + ":" + "-- ");
|
||||
}*/
|
||||
|
||||
if(StringUtils.isNotEmpty(problemKnowledgeBaseEO.getContent())){
|
||||
sbCn.append("内容" + ":" + problemKnowledgeBaseEO.getContent() + " ");
|
||||
}else {
|
||||
sbCn.append("内容" + ":" + "-- ");
|
||||
}
|
||||
|
||||
if(StringUtils.isNotEmpty(fileText)){
|
||||
sbCn.append("附件内容" + ":" + fileText + " ");
|
||||
}else {
|
||||
sbCn.append("附件内容" + ":" + "-- ");
|
||||
}
|
||||
}else if(StringUtils.equals(cut,CutEnum.EN.getValue())){
|
||||
|
||||
if(StringUtils.isNotEmpty(problemKnowledgeBaseEO.getShowPermissions())){
|
||||
sbEn.append("Display permission" + ":" + problemKnowledgeBaseEO.getShowPermissions() + " ");
|
||||
}else {
|
||||
sbEn.append("Display permission" + ":" + "-- ");
|
||||
}
|
||||
|
||||
if(StringUtils.isNotEmpty(problemKnowledgeBaseEO.getTitle())){
|
||||
sbEn.append("Title" + ":" + problemKnowledgeBaseEO.getTitle() + " ");
|
||||
}else {
|
||||
sbEn.append("Title" + ":" + "-- ");
|
||||
}
|
||||
|
||||
if(StringUtils.isNotEmpty(problemKnowledgeBaseEO.getProblemTypeName())){
|
||||
sbEn.append("Problem classification" + ":" + problemKnowledgeBaseEO.getProblemTypeName() + " ");
|
||||
}else {
|
||||
sbEn.append("Problem classification" + ":" + "-- ");
|
||||
}
|
||||
|
||||
if(StringUtils.isNotEmpty(problemKnowledgeBaseEO.getTargetMarket())){
|
||||
sbEn.append("Market" + ":" + problemKnowledgeBaseEO.getTargetMarket() + " ");
|
||||
}else {
|
||||
sbEn.append("Market" + ":" + "-- ");
|
||||
}
|
||||
|
||||
if(StringUtils.isNotEmpty(problemKnowledgeBaseEO.getStandNumber())){
|
||||
sbEn.append("Standard No" + ":" + problemKnowledgeBaseEO.getStandNumber() + " ");
|
||||
}else {
|
||||
sbEn.append("Standard No" + ":" + "-- ");
|
||||
}
|
||||
|
||||
/*if(StringUtils.isNotEmpty(problemKnowledgeBaseEO.getStandTitle())){
|
||||
sbEn.append("Standard Title" + ":" + problemKnowledgeBaseEO.getStandTitle() + " ");
|
||||
}else {
|
||||
sbEn.append("Standard Title" + ":" + "-- ");
|
||||
}*/
|
||||
|
||||
if(StringUtils.isNotEmpty(problemKnowledgeBaseEO.getContent())){
|
||||
sbEn.append("Content" + ":" + problemKnowledgeBaseEO.getContent() + " ");
|
||||
}else {
|
||||
sbEn.append("Content" + ":" + "-- ");
|
||||
}
|
||||
|
||||
if(StringUtils.isNotEmpty(fileText)){
|
||||
sbEn.append("Accessory File content" + ":" + fileText + " ");
|
||||
}else {
|
||||
sbEn.append("Accessory File content" + ":" + "-- ");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void putMap(String id,String content,String cut,Map<String, Object> map,String flag,String moduleType){
|
||||
map.put("id",id);
|
||||
map.put("module_type_flag", ModuleTypeFlagEnum.PROBLEM_KNOWLEDGE_BASE_CLASSIFY.getValue()); // 默认法规月报标识
|
||||
map.put("module_type", moduleType);
|
||||
map.put("content",content);
|
||||
map.put("flag",flag);
|
||||
}
|
||||
|
||||
/**
|
||||
* 问题知识库对象转Map,根据中英文切换字段转
|
||||
* @param problemKnowledgeBaseEO 问题知识库对象
|
||||
* @param cut 中英文切换标识 值对应CutEnum枚举类
|
||||
* @param convertAfterMap 转换后的Map
|
||||
*/
|
||||
public void problemKnowledgeBaseEOConvertMapByCut(ProblemKnowledgeBaseEO problemKnowledgeBaseEO,String cut,Map<String, Object> convertAfterMap){
|
||||
if(StringUtils.equals(cut,CutEnum.CN.getValue())){
|
||||
convertAfterMap.put("id",problemKnowledgeBaseEO.getId());
|
||||
convertAfterMap.put("标题",problemKnowledgeBaseEO.getTitle());
|
||||
convertAfterMap.put("问题分类",problemKnowledgeBaseEO.getProblemType());
|
||||
convertAfterMap.put("市场",problemKnowledgeBaseEO.getTargetMarket());
|
||||
convertAfterMap.put("标准编号",problemKnowledgeBaseEO.getStandNumber());
|
||||
//convertAfterMap.put("标准标题",problemKnowledgeBaseEO.getStandTitle());
|
||||
convertAfterMap.put("内容",problemKnowledgeBaseEO.getContent());
|
||||
}else if(StringUtils.equals(cut,CutEnum.EN.getValue())){
|
||||
convertAfterMap.put("id",problemKnowledgeBaseEO.getId());
|
||||
convertAfterMap.put("title",problemKnowledgeBaseEO.getTitle());
|
||||
convertAfterMap.put("problem_type",problemKnowledgeBaseEO.getProblemType());
|
||||
convertAfterMap.put("target_market",problemKnowledgeBaseEO.getTargetMarket());
|
||||
convertAfterMap.put("stand_number",problemKnowledgeBaseEO.getStandNumber());
|
||||
convertAfterMap.put("standard_title",problemKnowledgeBaseEO.getStandTitle());
|
||||
convertAfterMap.put("content",problemKnowledgeBaseEO.getContent());
|
||||
convertAfterMap.put("createTime",problemKnowledgeBaseEO.getCreateTime());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
@@ -84,7 +366,10 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
||||
|
||||
//如果该条问题知识库的展示权限为私密,则创建权限表数据
|
||||
if(StringUtils.equals(problemKnowledgeBaseEO.getShowPermissions(), ShowPermissionsEnum.PRIVACY.getValue())){
|
||||
batchInsertProblemKnowledgeBaseUserEO(problemKnowledgeBaseEO);
|
||||
this.batchInsertProblemKnowledgeBaseUserEO(problemKnowledgeBaseEO);
|
||||
//this.deleteElasticsearchData(problemKnowledgeBaseEO.getId());
|
||||
}else {
|
||||
//this.addOrUpdateElasticsearch(problemKnowledgeBaseEO);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -108,6 +393,22 @@ 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);
|
||||
|
||||
/*for (String problemKnowledgeBaseId : ids) {
|
||||
this.deleteElasticsearchData(problemKnowledgeBaseId);
|
||||
}*/
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -353,11 +654,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();
|
||||
|
||||
@@ -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]);
|
||||
@@ -360,66 +360,64 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi
|
||||
String cut = (String) params.get("cut");
|
||||
List<Map<String,Object>> exportData = this.lawsComplianceBoardMapper.queryComplianceResultList(params);
|
||||
this.disposeComplianceResult(exportData,cut);
|
||||
if(CollectionUtils.isNotEmpty(exportData)){
|
||||
String title = "";
|
||||
String fileName = "";
|
||||
if(StringUtils.equals(cut, CutEnum.CN.getValue())){
|
||||
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";
|
||||
fileName = "Compliance results" + ".xlsx";
|
||||
String title = "";
|
||||
String fileName = "";
|
||||
if(StringUtils.equals(cut, CutEnum.CN.getValue())){
|
||||
title = "责任领域,相关项目,设计符合性,Pre-Homo确认,验证符合性";
|
||||
fileName = "符合性结果" + ".xlsx";
|
||||
}else if(StringUtils.equals(cut,CutEnum.EN.getValue())){
|
||||
title = "Responsible Field,Relevant Project,Design Compliance Confirmation,Pre-Homo Confirmation,Validation Compliance Confirmation";
|
||||
fileName = "Compliance results" + ".xlsx";
|
||||
}
|
||||
OutputStream os = null;
|
||||
HSSFWorkbook workbook = new HSSFWorkbook();
|
||||
|
||||
try {
|
||||
response.setHeader("Content-Disposition",
|
||||
"attachment; filename=" + fileName);
|
||||
response.setContentType("application/force-download");
|
||||
|
||||
HSSFSheet sheet = workbook.createSheet("sheet1");
|
||||
|
||||
CellStyle titleCellStyle = workbook.createCellStyle();
|
||||
titleCellStyle.setAlignment(HorizontalAlignment.CENTER);//垂直居中
|
||||
titleCellStyle.setVerticalAlignment(VerticalAlignment.CENTER);//水平居中
|
||||
titleCellStyle.setWrapText(true);//自动换行
|
||||
|
||||
//创建表头
|
||||
String[] firstLineTitleArr = title.split(",");
|
||||
Row firstRow = sheet.createRow(0);
|
||||
|
||||
//设置居中、表头值。
|
||||
for (int i = 0; i < firstLineTitleArr.length; i++){
|
||||
sheet.setColumnWidth(i,8000);
|
||||
Cell cell = firstRow.createCell(i);
|
||||
cell.setCellStyle(titleCellStyle);
|
||||
cell.setCellValue(firstLineTitleArr[i]);
|
||||
}
|
||||
OutputStream os = null;
|
||||
HSSFWorkbook workbook = new HSSFWorkbook();
|
||||
|
||||
try {
|
||||
response.setHeader("Content-Disposition",
|
||||
"attachment; filename=" + fileName);
|
||||
response.setContentType("application/force-download");
|
||||
|
||||
HSSFSheet sheet = workbook.createSheet("sheet1");
|
||||
|
||||
CellStyle titleCellStyle = workbook.createCellStyle();
|
||||
titleCellStyle.setAlignment(HorizontalAlignment.CENTER);//垂直居中
|
||||
titleCellStyle.setVerticalAlignment(VerticalAlignment.CENTER);//水平居中
|
||||
titleCellStyle.setWrapText(true);//自动换行
|
||||
|
||||
//创建表头
|
||||
String[] firstLineTitleArr = title.split(",");
|
||||
Row firstRow = sheet.createRow(0);
|
||||
|
||||
//设置居中、表头值。
|
||||
for (int i = 0; i < firstLineTitleArr.length; i++){
|
||||
sheet.setColumnWidth(i,5000);
|
||||
Cell cell = firstRow.createCell(i);
|
||||
cell.setCellStyle(titleCellStyle);
|
||||
cell.setCellValue(firstLineTitleArr[i]);
|
||||
}
|
||||
|
||||
//设置导出数据
|
||||
if(CollectionUtils.isNotEmpty(exportData)) {
|
||||
int rowIndex = 1;
|
||||
for (int dataIndex = 0; dataIndex < exportData.size(); dataIndex++) {
|
||||
Row dataRow = sheet.createRow(rowIndex);
|
||||
dataRow.createCell(0).setCellValue(checkValueIsNotNull(exportData.get(dataIndex).get("dutyTerritory_dicText")));
|
||||
dataRow.createCell(1).setCellValue(checkValueIsNotNull(exportData.get(dataIndex).get("projectName")));
|
||||
dataRow.createCell(2).setCellValue(checkValueIsNotNull(exportData.get(dataIndex).get("designFlowTaskStatus_dicText")));
|
||||
dataRow.createCell(3).setCellValue(checkValueIsNotNull(exportData.get(dataIndex).get("prehomoFlowTaskStatus_dicText")));
|
||||
dataRow.createCell(4).setCellValue(checkValueIsNotNull(exportData.get(dataIndex).get("verifyFlowTaskStatus_dicText")));
|
||||
rowIndex ++;
|
||||
}
|
||||
}
|
||||
os = response.getOutputStream();
|
||||
workbook.write(os);
|
||||
os.flush();
|
||||
}catch (IOException ex){
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
throw new JeroBootException("下载文件失败");
|
||||
}else{
|
||||
throw new JeroBootException("Failed to download file");
|
||||
//设置导出数据
|
||||
if(CollectionUtils.isNotEmpty(exportData)) {
|
||||
int rowIndex = 1;
|
||||
for (int dataIndex = 0; dataIndex < exportData.size(); dataIndex++) {
|
||||
Row dataRow = sheet.createRow(rowIndex);
|
||||
dataRow.createCell(0).setCellValue(checkValueIsNotNull(exportData.get(dataIndex).get("dutyTerritory_dicText")));
|
||||
dataRow.createCell(1).setCellValue(checkValueIsNotNull(exportData.get(dataIndex).get("projectName")));
|
||||
dataRow.createCell(2).setCellValue(checkValueIsNotNull(exportData.get(dataIndex).get("designFlowTaskStatus_dicText")));
|
||||
dataRow.createCell(3).setCellValue(checkValueIsNotNull(exportData.get(dataIndex).get("prehomoFlowTaskStatus_dicText")));
|
||||
dataRow.createCell(4).setCellValue(checkValueIsNotNull(exportData.get(dataIndex).get("verifyFlowTaskStatus_dicText")));
|
||||
rowIndex ++;
|
||||
}
|
||||
}
|
||||
os = response.getOutputStream();
|
||||
workbook.write(os);
|
||||
os.flush();
|
||||
}catch (IOException ex){
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
throw new JeroBootException("下载文件失败");
|
||||
}else{
|
||||
throw new JeroBootException("Failed to download file");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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,11 @@ public class LawsMonthlyReportWriteEO implements Serializable {
|
||||
@TableField(exist = false)
|
||||
private String ids;
|
||||
|
||||
//新添字段
|
||||
private String relatedAreasCn;//相关领域中文
|
||||
private String relatedAreasEn;//相关领域英文
|
||||
private String sourceCn;//来源中文
|
||||
private String sourceEn;//来源英文
|
||||
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,10 @@
|
||||
<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_cn" property="sourceCn" />
|
||||
<result column="source_en" property="sourceEn" />
|
||||
<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查询
|
||||
*
|
||||
|
||||
@@ -1,20 +1,33 @@
|
||||
package com.jero.modules.report.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.es.JeroElasticsearchTemplate;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.modules.document.enums.SearchEnum;
|
||||
import com.jero.modules.document.utils.ReadPdfUtil;
|
||||
import com.jero.modules.document.utils.ReadWordUtil;
|
||||
import com.jero.modules.dummy.enums.InventoryStateEnum;
|
||||
import com.jero.modules.oss.entity.OSSFile;
|
||||
import com.jero.modules.oss.service.IOSSFileService;
|
||||
import com.jero.modules.report.entity.LawsMonthlyReportManageEO;
|
||||
import com.jero.modules.report.mapper.LawsMonthlyReportManageEOMapper;
|
||||
import com.jero.modules.report.service.ILawsMonthlyReportManageEOService;
|
||||
import com.jero.modules.searchcenter.enums.ModuleTypeFlagEnum;
|
||||
import com.jero.modules.system.service.ISysDictItemService;
|
||||
import com.jero.modules.system.util.StringUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @Description: 法规月报管理
|
||||
@@ -25,6 +38,21 @@ import java.util.List;
|
||||
@Service
|
||||
public class LawsMonthlyReportManageEOServiceImpl extends ServiceImpl<LawsMonthlyReportManageEOMapper, LawsMonthlyReportManageEO> implements ILawsMonthlyReportManageEOService {
|
||||
|
||||
@Autowired
|
||||
private ISysDictItemService sysDictItemService;
|
||||
|
||||
@Autowired
|
||||
private JeroElasticsearchTemplate jeroElasticsearchTemplate;
|
||||
|
||||
@Autowired
|
||||
private IOSSFileService iOSSFileService;
|
||||
|
||||
@Value(value = "${jero.path.upload}")
|
||||
private String uploadpath;
|
||||
|
||||
public static final String SEARCH_FLAG = "魑";//标识(es数据带此标识的代表全文和段落的数据,不带此标识的代表列表数据)
|
||||
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
@@ -110,6 +138,130 @@ public class LawsMonthlyReportManageEOServiceImpl extends ServiceImpl<LawsMonthl
|
||||
|
||||
@Override
|
||||
public void issue(LawsMonthlyReportManageEO lawsMonthlyReportManageEO) {
|
||||
String id = lawsMonthlyReportManageEO.getId();
|
||||
String issueStatus = lawsMonthlyReportManageEO.getIssueStatus();
|
||||
|
||||
Date issueTime = new Date();
|
||||
lawsMonthlyReportManageEO.setUpdateTime(issueTime);
|
||||
this.updateById(lawsMonthlyReportManageEO);
|
||||
|
||||
// 同步es
|
||||
// syncElasticsearch(id, issueStatus, issueTime);
|
||||
}
|
||||
|
||||
private void syncElasticsearch(String id, String issueStatus, Date issueTime) {
|
||||
LawsMonthlyReportManageEO monthlyReportManageEO = getById(id);
|
||||
|
||||
if ("1".equals(issueStatus)) { // 已发布---发布操作
|
||||
// 添加月报到es
|
||||
OSSFile ossFile = iOSSFileService.getById(monthlyReportManageEO.getFileId());
|
||||
String fileText = "";
|
||||
|
||||
// 读取月报文件内容
|
||||
if (ossFile.getFileName().endsWith(".doc")
|
||||
|| ossFile.getFileName().endsWith(".docx")
|
||||
|| ossFile.getFileName().endsWith(".DOC")
|
||||
|| ossFile.getFileName().endsWith(".DOCX")) {
|
||||
|
||||
String wordContent = null;
|
||||
try {
|
||||
wordContent = ReadWordUtil.readWord(ossFile.getUrl(),uploadpath);
|
||||
} catch (Exception e) {
|
||||
log.error("文档库: 读取word内容失败");
|
||||
}
|
||||
if (StringUtils.isNotBlank(wordContent)) {
|
||||
fileText = wordContent;
|
||||
}
|
||||
} else if (ossFile.getFileName().endsWith(".pdf") || ossFile.getFileName().endsWith(".PDF")) {
|
||||
String pdfContent = null;
|
||||
try {
|
||||
pdfContent = ReadPdfUtil.readPdf(ossFile.getUrl());
|
||||
} catch (Exception e) {
|
||||
log.error("文档库: 读取PDF文件内容失败");
|
||||
}
|
||||
if (StringUtils.isNotBlank(pdfContent)) {
|
||||
fileText = pdfContent;
|
||||
}
|
||||
}
|
||||
Map<String, Object> stringMapCn = new HashMap<>();
|
||||
Map<String, Object> stringMapEn = new HashMap<>();
|
||||
Map<String, Object> stringMapCnForSearch = new HashMap<>();
|
||||
Map<String, Object> stringMapEnForSearch = new HashMap<>();
|
||||
List<Map<String, Object>> mapListTempCn = new ArrayList<>();
|
||||
List<Map<String, Object>> mapListTempEn = new ArrayList<>();
|
||||
//文件相关封装中文的全文内容(es) 非搜索条件下的:flag---SEARCH_FLAG
|
||||
putMap(id, "法规月报",
|
||||
fileText, monthlyReportManageEO.getName(), fileText,
|
||||
ossFile.getFileName(), ossFile.getId(), issueTime, CutEnum.CN.getValue(), stringMapCn, SEARCH_FLAG);
|
||||
//文件相关封装英文的全文内容(es) 搜索条件下的: flag---null
|
||||
putMap(id, "monthly report",
|
||||
fileText, monthlyReportManageEO.getName(), fileText,
|
||||
ossFile.getFileName(), ossFile.getId(), issueTime, CutEnum.EN.getValue(), stringMapEn, SEARCH_FLAG);
|
||||
|
||||
//文件相关封装中文的全文内容(es)
|
||||
putMap(id + monthlyReportManageEO.getFileId(), "法规月报",
|
||||
fileText, monthlyReportManageEO.getName(), fileText,
|
||||
ossFile.getFileName(), ossFile.getId(), issueTime, CutEnum.CN.getValue(), stringMapCnForSearch, null);
|
||||
//文件相关封装英文的全文内容(es)
|
||||
putMap(id + monthlyReportManageEO.getFileId(), "monthly report",
|
||||
fileText, monthlyReportManageEO.getName(), fileText,
|
||||
ossFile.getFileName(), ossFile.getId(), issueTime, CutEnum.EN.getValue(), stringMapEnForSearch, null);
|
||||
|
||||
mapListTempCn.add(stringMapCn);
|
||||
mapListTempCn.add(stringMapCnForSearch);
|
||||
mapListTempEn.add(stringMapEn);
|
||||
mapListTempEn.add(stringMapEnForSearch);
|
||||
|
||||
//添加es
|
||||
JSONObject jsonObjectCn = JSON.parseObject(JSON.toJSONString(stringMapCn));
|
||||
JSONObject jsonObjectEn = JSON.parseObject(JSON.toJSONString(stringMapEn));
|
||||
JSONArray arrayCn = JSONArray.parseArray(JSON.toJSONString(mapListTempCn));
|
||||
JSONArray arrayEn = JSONArray.parseArray(JSON.toJSONString(mapListTempEn));
|
||||
|
||||
try {
|
||||
// 法规月报
|
||||
jeroElasticsearchTemplate.saveOrUpdate(SearchEnum.INDEX_NAME_LAWS_MONTHLY_REPORT.getValue(), SearchEnum.TYPE_NAME_LAWS_MONTHLY_REPORT.getValue(), id, jsonObjectCn);
|
||||
//全部
|
||||
jeroElasticsearchTemplate.saveBatch(SearchEnum.FULL_TEXT_SEARCH_CN.getValue(), SearchEnum.FULL_TEXT_SEARCH_CN.getValue(), arrayCn);
|
||||
jeroElasticsearchTemplate.saveBatch(SearchEnum.FULL_TEXT_SEARCH_EN.getValue(), SearchEnum.FULL_TEXT_SEARCH_EN.getValue(), arrayEn);
|
||||
} catch (Exception e) {
|
||||
log.error("文档库添加es失败");
|
||||
}
|
||||
|
||||
} else if ("2".equals(issueStatus)) { // 待发布---撤回操作
|
||||
// 删除es中的月报
|
||||
try {
|
||||
jeroElasticsearchTemplate.delete(SearchEnum.INDEX_NAME_LAWS_MONTHLY_REPORT.getValue(), SearchEnum.TYPE_NAME_LAWS_MONTHLY_REPORT.getValue(), id);
|
||||
//删除全部中文的
|
||||
jeroElasticsearchTemplate.delete(SearchEnum.FULL_TEXT_SEARCH.getValue(), SearchEnum.FULL_TEXT_SEARCH.getValue(), id);
|
||||
jeroElasticsearchTemplate.delete(SearchEnum.FULL_TEXT_SEARCH_CN.getValue(), SearchEnum.FULL_TEXT_SEARCH_CN.getValue(), id);
|
||||
jeroElasticsearchTemplate.delete(SearchEnum.FULL_TEXT_SEARCH_CN.getValue(), SearchEnum.FULL_TEXT_SEARCH_CN.getValue(), id + monthlyReportManageEO.getFileId());
|
||||
//删除全部英文的
|
||||
jeroElasticsearchTemplate.delete(SearchEnum.FULL_TEXT_SEARCH_EN.getValue(), SearchEnum.FULL_TEXT_SEARCH_EN.getValue(), id);
|
||||
jeroElasticsearchTemplate.delete(SearchEnum.FULL_TEXT_SEARCH_EN.getValue(), SearchEnum.FULL_TEXT_SEARCH_EN.getValue(), id + monthlyReportManageEO.getFileId());
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
log.error("文档库删除es失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
private void putMap(String id, String moduleType,
|
||||
String content, String title , String fileText,
|
||||
String fileName, String fileId, Date issueTime, String cut,
|
||||
Map<String, Object> stringMap,
|
||||
String flag){
|
||||
stringMap.put("id", id);
|
||||
stringMap.put("module_type", moduleType);
|
||||
stringMap.put("module_type_flag", ModuleTypeFlagEnum.LAWS_MONTHLY_REPORT.getValue()); // 默认法规月报标识
|
||||
stringMap.put("content", content);
|
||||
stringMap.put("title", title);
|
||||
stringMap.put("file_text", fileText);
|
||||
stringMap.put("file_name", fileName);
|
||||
stringMap.put("file_id", fileId);
|
||||
stringMap.put("issue_time", issueTime);
|
||||
stringMap.put("cut",cut);
|
||||
stringMap.put("flag",flag);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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());
|
||||
//新征求意见清单模板
|
||||
@@ -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();
|
||||
@@ -507,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文件
|
||||
@@ -516,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<>();
|
||||
@@ -585,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) {
|
||||
@@ -677,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();
|
||||
|
||||
@@ -755,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,164 @@ 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 sourceCn = lawsMonthlyReportWriteEO.getSourceCn();//来源
|
||||
String sourceEn = lawsMonthlyReportWriteEO.getSourceEn();
|
||||
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, "来源",sourceCn);
|
||||
//第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",sourceEn);
|
||||
//第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 +778,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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -104,4 +104,12 @@ public class DocumentSearchController {
|
||||
iDocumentSearchService.deleteAll();
|
||||
return Result.OK();
|
||||
}
|
||||
|
||||
@ApiOperation(value="列表查询问题知识库", notes="列表查询问题知识库")
|
||||
@PostMapping(value = "/getProblemKnowledgeBasePage")
|
||||
//@RequiresPermissions("document:search")
|
||||
public Result<?> getProblemKnowledgeBasePage(@RequestBody Map<String,Object> map) {
|
||||
IPage infoList = iDocumentSearchService.getProblemKnowledgeBasePage(map);
|
||||
return Result.OK(infoList);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.jero.modules.searchcenter.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.modules.searchcenter.service.ILawsMonthlyReportSearchService;
|
||||
import com.jero.modules.searchcenter.vo.SearchVO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @description 搜索中心-法规月报 控制层
|
||||
* @date 2022/8/17 15:03
|
||||
* @auth liyawei
|
||||
*/
|
||||
@Api(tags="搜索中心")
|
||||
@RestController
|
||||
@RequestMapping("/search/lawsMonthlyReport")
|
||||
@Slf4j
|
||||
public class LawsMonthlyReportSearchController {
|
||||
|
||||
@Autowired
|
||||
private ILawsMonthlyReportSearchService lawsMonthlyReportSearchService;
|
||||
|
||||
@ApiOperation(value="法规月报查询", notes="法规月报查询")
|
||||
@PostMapping(value = "/page")
|
||||
@RequiresPermissions("document:search")
|
||||
public Result<?> queryPageInfo(@RequestBody SearchVO searchVO) {
|
||||
IPage pageInfo = lawsMonthlyReportSearchService.pageInfo(searchVO);
|
||||
return Result.OK(pageInfo);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.jero.modules.searchcenter.enums;
|
||||
|
||||
public enum ModuleTypeFlagEnum {
|
||||
LAWS_MONTHLY_REPORT("法规月报","FGYB"),
|
||||
PROBLEM_KNOWLEDGE_BASE_CLASSIFY("问题知识库","WTZSK");
|
||||
|
||||
String name;
|
||||
String value;
|
||||
|
||||
private ModuleTypeFlagEnum(String name, String value) {
|
||||
this.name = name;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.jero.modules.searchcenter.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.jero.modules.searchcenter.vo.SearchVO;
|
||||
|
||||
/**
|
||||
* @description 搜索中心-法规月报 接口
|
||||
* @date 2022/8/17 15:03
|
||||
* @auth liyawei
|
||||
*/
|
||||
public interface ILawsMonthlyReportSearchService {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param searchVO
|
||||
* @return
|
||||
*/
|
||||
IPage pageInfo(SearchVO searchVO);
|
||||
}
|
||||
@@ -1073,6 +1073,246 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IPage getProblemKnowledgeBasePage(Map<String, Object> map) {
|
||||
|
||||
boolean flagTemp = true;
|
||||
String cut = (String) map.get("cut");
|
||||
if(StringUtils.equals(cut,CutEnum.CN.getValue())){
|
||||
flagTemp = jeroElasticsearchTemplate.indexExists(SearchEnum.TYPE_PROBLEM_KNOWLEDGE_BASE_CN.getValue());
|
||||
}else if(StringUtils.equals(cut,CutEnum.EN.getValue())){
|
||||
flagTemp = jeroElasticsearchTemplate.indexExists(SearchEnum.TYPE_PROBLEM_KNOWLEDGE_BASE_EN.getValue());
|
||||
}
|
||||
|
||||
if (!flagTemp) {
|
||||
return new Page(Integer.parseInt(map.get("pageNo").toString()), Integer.parseInt(map.get("pageSize").toString()));
|
||||
}
|
||||
JSONArray queryJsonMustNot = new JSONArray();
|
||||
|
||||
String selectValue = (String) map.get("selectValue");
|
||||
String selectValueTwo = (String) map.get("selectValueTwo");
|
||||
String problem_type = (String) map.get("problem_type");
|
||||
String target_market = (String) map.get("target_market");
|
||||
//1. 需要查询的字段
|
||||
List<String> fieldList = new ArrayList<>();
|
||||
fieldList.add("title");//权重5
|
||||
fieldList.add("content");//权重4
|
||||
// fieldList.add("problem_type");//权重3
|
||||
// fieldList.add("target_market"); //权重2
|
||||
fieldList.add("module_type");
|
||||
fieldList.add("id");
|
||||
fieldList.add("flag");
|
||||
|
||||
JSONArray queryMapJson = new JSONArray();
|
||||
JSONArray queryMapJsonTwo = new JSONArray();
|
||||
JSONArray queryMapJsonThree = new JSONArray();
|
||||
JSONArray queryMapJsonProblemType = new JSONArray();
|
||||
JSONArray queryMapJsonTargetMarket = new JSONArray();
|
||||
JSONArray queryMapJsonAll = new JSONArray();
|
||||
|
||||
Map<String,Object> mapHighlight = new HashMap<>();
|
||||
Map<String,Object> mapHighlight1 = new HashMap<>();
|
||||
//封装首次的条件
|
||||
if (StringUtils.isNotBlank(selectValue)) {
|
||||
for (String field : fieldList) {
|
||||
Map<String, Object> map2 = new HashMap<>();
|
||||
Map<String, Object> map3 = new HashMap<>();
|
||||
Map<String, Object> map4 = new HashMap<>();
|
||||
if("title".equals(field)){
|
||||
map3.put("boost",1);
|
||||
}else if("file_text".equals(field)){
|
||||
map3.put("boost",0.01);
|
||||
}else if("content".equals(field)){
|
||||
map3.put("boost",0.01);
|
||||
}else if("file_name".equals(field)){
|
||||
map3.put("boost",1);
|
||||
}
|
||||
|
||||
map3.put("query",selectValue);
|
||||
map2.put(field, map3);
|
||||
map4.put("match",map2);
|
||||
queryMapJson.add(map4);
|
||||
|
||||
//高亮
|
||||
if(!"flag".equals(field)){
|
||||
highlight(mapHighlight, field);
|
||||
}
|
||||
}
|
||||
mapHighlight1.put("fields",mapHighlight);
|
||||
}
|
||||
|
||||
//封装问题类型选择框查询条件。
|
||||
if (StringUtils.isNotBlank(problem_type)) {
|
||||
Map<String, Object> map2 = new HashMap<>();
|
||||
Map<String, Object> map3 = new HashMap<>();
|
||||
Map<String, Object> map4 = new HashMap<>();
|
||||
|
||||
map3.put("query",problem_type);
|
||||
map2.put("problem_type", map3);
|
||||
map4.put("match",map2);
|
||||
queryMapJson.add(map4);
|
||||
//高亮
|
||||
highlight(mapHighlight, problem_type);
|
||||
|
||||
mapHighlight1.put("fields",mapHighlight);
|
||||
}
|
||||
|
||||
//封装市场选择框查询条件。
|
||||
if (StringUtils.isNotBlank(target_market)) {
|
||||
Map<String, Object> map2 = new HashMap<>();
|
||||
Map<String, Object> map3 = new HashMap<>();
|
||||
Map<String, Object> map4 = new HashMap<>();
|
||||
|
||||
map3.put("query",target_market);
|
||||
map2.put("target_market", map3);
|
||||
map4.put("match",map2);
|
||||
queryMapJson.add(map4);
|
||||
//高亮
|
||||
highlight(mapHighlight, target_market);
|
||||
|
||||
mapHighlight1.put("fields",mapHighlight);
|
||||
}
|
||||
|
||||
|
||||
if(CollectionUtils.isNotEmpty(queryMapJson)){
|
||||
JSONObject jsonObject = jeroElasticsearchTemplate.buildBoolQuery(null, null, queryMapJson);
|
||||
queryMapJsonAll.add(jsonObject);
|
||||
}
|
||||
//封装二次的条件
|
||||
if (StringUtils.isNotBlank(selectValueTwo)) {
|
||||
for (String field : fieldList) {
|
||||
Map<String, Object> queryMap = new HashMap<>();
|
||||
Map<String, Object> map2 = new HashMap<>();
|
||||
Map<String, Object> map3 = new HashMap<>();
|
||||
if("title".equals(field)){
|
||||
map3.put("boost",1);
|
||||
}else if("file_text".equals(field)){
|
||||
map3.put("boost",0.01);
|
||||
}else if("content".equals(field)){
|
||||
map3.put("boost",0.01);
|
||||
}else if("file_name".equals(field)){
|
||||
map3.put("boost",1);
|
||||
}
|
||||
|
||||
//特殊处理编号字段
|
||||
map3.put("query",selectValueTwo);
|
||||
// map3.put("minimum_should_match",2);
|
||||
map2.put(field, map3);
|
||||
queryMap.put("match", map2);
|
||||
|
||||
queryMapJsonTwo.add(queryMap);
|
||||
//高亮
|
||||
if(!"flag".equals(field)){
|
||||
highlight(mapHighlight, field);
|
||||
}
|
||||
}
|
||||
mapHighlight1.put("fields",mapHighlight);
|
||||
}
|
||||
if(CollectionUtils.isNotEmpty(queryMapJsonTwo)){
|
||||
JSONObject jsonObjectTwo = jeroElasticsearchTemplate.buildBoolQuery(null, null, queryMapJsonTwo);
|
||||
queryMapJsonAll.add(jsonObjectTwo);
|
||||
}
|
||||
//ids进行三次封装
|
||||
String ids = (String) map.get("ids");
|
||||
if (StringUtils.isNotBlank(ids)) {
|
||||
for (String s : ids.split(",")) {
|
||||
Map<String, Object> queryMap = new HashMap<>();
|
||||
Map<String, Object> queryMapTemp = new HashMap<>();
|
||||
queryMapTemp.put("id", s);
|
||||
queryMap.put("match_phrase", queryMapTemp);
|
||||
queryMapJsonThree.add(queryMap);
|
||||
}
|
||||
}
|
||||
if(CollectionUtils.isNotEmpty(queryMapJsonThree)){
|
||||
JSONObject jsonObjectThree = jeroElasticsearchTemplate.buildBoolQuery(null, null, queryMapJsonThree);
|
||||
queryMapJsonAll.add(jsonObjectThree);
|
||||
}
|
||||
JSONObject sort = new JSONObject();
|
||||
Map<String,Object> createTime = new HashMap<>();
|
||||
Map<String,Object> createTime1 = new HashMap<>();
|
||||
createTime.put("order","desc");
|
||||
createTime1.put("createTime",createTime);
|
||||
sort.putAll(createTime1);
|
||||
|
||||
Integer pageNo = Integer.parseInt(map.get("pageNo").toString());
|
||||
Integer pageSize = Integer.parseInt(map.get("pageSize").toString());
|
||||
IPage page = this.getProblemKnowledgeBasePage(selectValue, selectValueTwo, queryMapJsonAll, mapHighlight1,null,
|
||||
pageNo, pageSize, null,(String) map.get("cut"),sort,queryJsonMustNot);
|
||||
return page;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private IPage getProblemKnowledgeBasePage(String selectValue, String selectValueTwo, JSONArray queryMapJson,Map<String,Object> highlightMap,
|
||||
JSONArray should, Integer pageNo, Integer pageSize, String paragraphFlag,
|
||||
String cut,JSONObject querySort,JSONArray queryMustNot) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
//基础添加封装
|
||||
if ("paragraphFlag".equals(paragraphFlag)) {
|
||||
jsonObject = jeroElasticsearchTemplate.buildBoolQuery(queryMapJson, queryMustNot, null);
|
||||
} else {
|
||||
jsonObject = jeroElasticsearchTemplate.buildBoolQuery(queryMapJson, queryMustNot, null);
|
||||
}
|
||||
JSONArray jsonArraySort = new JSONArray();
|
||||
jsonArraySort.add(querySort);
|
||||
|
||||
//1. 条件,分页
|
||||
JSONObject queryObject = jeroElasticsearchTemplate.buildQuery(null,
|
||||
jsonObject,
|
||||
highlightMap,
|
||||
jsonArraySort,
|
||||
pageNo-1,
|
||||
pageSize);
|
||||
//2. 数据查询
|
||||
JSONObject search = new JSONObject();
|
||||
|
||||
if(CutEnum.CN.getValue().equals(cut)){
|
||||
search = jeroElasticsearchTemplate.search(SearchEnum.TYPE_PROBLEM_KNOWLEDGE_BASE_CN.getValue(),
|
||||
SearchEnum.TYPE_PROBLEM_KNOWLEDGE_BASE_CN.getValue(),
|
||||
queryObject);
|
||||
}else{
|
||||
search = jeroElasticsearchTemplate.search(SearchEnum.TYPE_PROBLEM_KNOWLEDGE_BASE_EN.getValue(),
|
||||
SearchEnum.TYPE_PROBLEM_KNOWLEDGE_BASE_EN.getValue(),
|
||||
queryObject);
|
||||
}
|
||||
|
||||
List<Map<String, Object>> list = (List<Map<String, Object>>) (((Map) search.get("hits")).get("hits"));
|
||||
List<Map<String, Object>> mapList = new ArrayList<>();
|
||||
for (Map<String, Object> map : list) {
|
||||
Map<String, Object> mapSource = (Map<String, Object>) map.get("_source");
|
||||
Map<String, Object> mapHighlight = (Map<String, Object>) map.get("highlight");
|
||||
if(ObjectUtils.isNotEmpty(mapHighlight)){
|
||||
for (Map.Entry<String, Object> entry : mapHighlight.entrySet()) {
|
||||
String key = entry.getKey();
|
||||
List<String> value = (List<String>) entry.getValue();
|
||||
String fieldConyent= "";
|
||||
for (String s : value) {
|
||||
fieldConyent += s;
|
||||
}
|
||||
mapSource.put(key,fieldConyent);
|
||||
}
|
||||
//如果这一条数据中有高亮字段值,但是file_text中没有高亮值, 则赋控制,否则列表中会展示所有的文件内容, 赋空后,则展示基础数据
|
||||
String fileText = (String) mapSource.get("content");
|
||||
if(StringUtils.isNotBlank(fileText) && !fileText.contains("<text class='highlight-class'>")){
|
||||
mapSource.put("content","");
|
||||
}
|
||||
}
|
||||
mapList.add(mapSource);
|
||||
}
|
||||
|
||||
//处理分页
|
||||
IPage page = new Page(pageNo, pageSize);
|
||||
if (StringUtils.isNotBlank(selectValueTwo)) {
|
||||
//二次搜索的结果
|
||||
page.setTotal(Long.parseLong(String.valueOf(((Map) search.get("hits")).get("total"))));
|
||||
page.setRecords(mapList);
|
||||
} else {
|
||||
//首次搜索的结果
|
||||
page.setTotal(Long.parseLong(String.valueOf(((Map) search.get("hits")).get("total"))));
|
||||
page.setRecords(mapList);
|
||||
}
|
||||
return page;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -27,4 +27,5 @@ public interface IDocumentSearchService {
|
||||
|
||||
void deleteAll();
|
||||
|
||||
IPage getProblemKnowledgeBasePage(Map<String, Object> map);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,261 @@
|
||||
package com.jero.modules.searchcenter.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jero.common.es.JeroElasticsearchTemplate;
|
||||
import com.jero.modules.document.enums.SearchEnum;
|
||||
import com.jero.modules.searchcenter.service.ILawsMonthlyReportSearchService;
|
||||
import com.jero.modules.searchcenter.vo.SearchVO;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @description 搜索中心-法规月报 服务层
|
||||
* @date 2022/8/17 15:03
|
||||
* @auth liyawei
|
||||
*/
|
||||
@Component
|
||||
public class LawsMonthlyReportSearchServiceImpl implements ILawsMonthlyReportSearchService {
|
||||
|
||||
@Autowired
|
||||
private JeroElasticsearchTemplate jeroElasticsearchTemplate;
|
||||
public static final String SEARCH_FLAG = "魑";//标识(es数据带此标识的代表全文和段落的数据,不带此标识的代表列表数据)
|
||||
|
||||
/**
|
||||
* 全文
|
||||
* @param searchVO
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public IPage pageInfo(SearchVO searchVO) {
|
||||
JSONArray queryJsonMustNot = new JSONArray();
|
||||
// if(StringUtils.isNotBlank(searchVO.getSelectValue())){
|
||||
// Map<String,Object> map = new HashMap<>();
|
||||
// Map<String,Object> map1 = new HashMap<>();
|
||||
// Map<String,Object> map2 = new HashMap<>();
|
||||
// map.put("query",SEARCH_FLAG);
|
||||
// map1.put("flag",map);
|
||||
// map2.put("match",map1);
|
||||
// queryJsonMustNot.add(map2);
|
||||
// }
|
||||
if(StringUtils.isBlank(searchVO.getSelectValue())){
|
||||
searchVO.setSelectValue(SEARCH_FLAG);
|
||||
}
|
||||
|
||||
//判断索引是否存在
|
||||
boolean flagTemp = true;
|
||||
flagTemp = jeroElasticsearchTemplate.indexExists(SearchEnum.INDEX_NAME_LAWS_MONTHLY_REPORT.getValue());
|
||||
if (!flagTemp) {
|
||||
return new Page(searchVO.getPageNo(), searchVO.getPageSize());
|
||||
}
|
||||
|
||||
String selectValue = searchVO.getSelectValue();
|
||||
String selectValueTwo = searchVO.getSelectValueTwo();
|
||||
//1. 需要查询的字段
|
||||
List<String> fieldList = new ArrayList<>();
|
||||
fieldList.add("title");//权重5
|
||||
fieldList.add("file_text");//权重4
|
||||
fieldList.add("content");//权重3
|
||||
fieldList.add("file_name"); //权重2
|
||||
fieldList.add("module_type");
|
||||
fieldList.add("id");
|
||||
fieldList.add("flag");
|
||||
|
||||
JSONArray queryMapJson = new JSONArray();
|
||||
JSONArray queryMapJsonTwo = new JSONArray();
|
||||
JSONArray queryMapJsonThree = new JSONArray();
|
||||
JSONArray queryMapJsonAll = new JSONArray();
|
||||
|
||||
Map<String,Object> mapHighlight = new HashMap<>();
|
||||
Map<String,Object> mapHighlight1 = new HashMap<>();
|
||||
//封装首次的条件
|
||||
if (StringUtils.isNotBlank(selectValue)) {
|
||||
for (String field : fieldList) {
|
||||
Map<String, Object> map2 = new HashMap<>();
|
||||
Map<String, Object> map3 = new HashMap<>();
|
||||
Map<String, Object> map4 = new HashMap<>();
|
||||
if("title".equals(field)){
|
||||
map3.put("boost",1);
|
||||
}else if("file_text".equals(field)){
|
||||
map3.put("boost",0.01);
|
||||
}else if("content".equals(field)){
|
||||
map3.put("boost",0.01);
|
||||
}else if("file_name".equals(field)){
|
||||
map3.put("boost",1);
|
||||
}
|
||||
|
||||
map3.put("query",selectValue);
|
||||
map2.put(field, map3);
|
||||
map4.put("match",map2);
|
||||
queryMapJson.add(map4);
|
||||
|
||||
//高亮
|
||||
if(!"flag".equals(field)){
|
||||
highlight(mapHighlight, field);
|
||||
}
|
||||
}
|
||||
mapHighlight1.put("fields",mapHighlight);
|
||||
}
|
||||
if(CollectionUtils.isNotEmpty(queryMapJson)){
|
||||
JSONObject jsonObject = jeroElasticsearchTemplate.buildBoolQuery(null, null, queryMapJson);
|
||||
queryMapJsonAll.add(jsonObject);
|
||||
}
|
||||
//封装二次的条件
|
||||
if (StringUtils.isNotBlank(selectValueTwo)) {
|
||||
for (String field : fieldList) {
|
||||
Map<String, Object> queryMap = new HashMap<>();
|
||||
Map<String, Object> map2 = new HashMap<>();
|
||||
Map<String, Object> map3 = new HashMap<>();
|
||||
if("title".equals(field)){
|
||||
map3.put("boost",1);
|
||||
}else if("file_text".equals(field)){
|
||||
map3.put("boost",0.01);
|
||||
}else if("content".equals(field)){
|
||||
map3.put("boost",0.01);
|
||||
}else if("file_name".equals(field)){
|
||||
map3.put("boost",1);
|
||||
}
|
||||
|
||||
//特殊处理编号字段
|
||||
map3.put("query",selectValueTwo);
|
||||
// map3.put("minimum_should_match",2);
|
||||
map2.put(field, map3);
|
||||
queryMap.put("match", map2);
|
||||
|
||||
queryMapJsonTwo.add(queryMap);
|
||||
//高亮
|
||||
if(!"flag".equals(field)){
|
||||
highlight(mapHighlight, field);
|
||||
}
|
||||
}
|
||||
mapHighlight1.put("fields",mapHighlight);
|
||||
}
|
||||
if(CollectionUtils.isNotEmpty(queryMapJsonTwo)){
|
||||
JSONObject jsonObjectTwo = jeroElasticsearchTemplate.buildBoolQuery(null, null, queryMapJsonTwo);
|
||||
queryMapJsonAll.add(jsonObjectTwo);
|
||||
}
|
||||
//ids进行三次封装
|
||||
if (StringUtils.isNotBlank(searchVO.getIds())) {
|
||||
for (String s : searchVO.getIds().split(",")) {
|
||||
Map<String, Object> queryMap = new HashMap<>();
|
||||
Map<String, Object> queryMapTemp = new HashMap<>();
|
||||
queryMapTemp.put("id", s);
|
||||
queryMap.put("match_phrase", queryMapTemp);
|
||||
queryMapJsonThree.add(queryMap);
|
||||
}
|
||||
}
|
||||
if(CollectionUtils.isNotEmpty(queryMapJsonThree)){
|
||||
JSONObject jsonObjectThree = jeroElasticsearchTemplate.buildBoolQuery(null, null, queryMapJsonThree);
|
||||
queryMapJsonAll.add(jsonObjectThree);
|
||||
}
|
||||
JSONObject sort = new JSONObject();
|
||||
Map<String,Object> issueTime = new HashMap<>();
|
||||
Map<String,Object> issueTime1 = new HashMap<>();
|
||||
issueTime.put("order","desc");
|
||||
issueTime1.put("issue_time",issueTime);
|
||||
sort.putAll(issueTime1);
|
||||
|
||||
// Map<String,Object> mapSort = new HashMap<>();
|
||||
// Map<String,Object> mapSortTemp = new HashMap<>();
|
||||
// mapSort.put("order","asc");
|
||||
// mapSortTemp.put("file_sort.keyword",mapSort);
|
||||
// sort.putAll(mapSortTemp);
|
||||
|
||||
Integer pageNo = searchVO.getPageNo();
|
||||
Integer pageSize = searchVO.getPageSize();
|
||||
IPage page = getiPage(selectValue, selectValueTwo, queryMapJsonAll, mapHighlight1,null,
|
||||
pageNo, pageSize, null,searchVO.getCut(),sort,queryJsonMustNot);
|
||||
return page;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private IPage getiPage(String selectValue, String selectValueTwo, JSONArray queryMapJson,Map<String,Object> highlightMap,
|
||||
JSONArray should, Integer pageNo, Integer pageSize, String paragraphFlag,
|
||||
String cut,JSONObject querySort,JSONArray queryMustNot) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
//基础添加封装
|
||||
if ("paragraphFlag".equals(paragraphFlag)) {
|
||||
jsonObject = jeroElasticsearchTemplate.buildBoolQuery(queryMapJson, queryMustNot, null);
|
||||
} else {
|
||||
jsonObject = jeroElasticsearchTemplate.buildBoolQuery(queryMapJson, queryMustNot, null);
|
||||
}
|
||||
JSONArray jsonArraySort = new JSONArray();
|
||||
jsonArraySort.add(querySort);
|
||||
|
||||
//1. 条件,分页
|
||||
JSONObject queryObject = jeroElasticsearchTemplate.buildQuery(null,
|
||||
jsonObject,
|
||||
highlightMap,
|
||||
jsonArraySort,
|
||||
pageNo-1,
|
||||
pageSize);
|
||||
//2. 数据查询
|
||||
JSONObject search = new JSONObject();
|
||||
search = jeroElasticsearchTemplate.search(SearchEnum.INDEX_NAME_LAWS_MONTHLY_REPORT.getValue(),
|
||||
SearchEnum.TYPE_NAME_LAWS_MONTHLY_REPORT.getValue(),
|
||||
queryObject);
|
||||
|
||||
List<Map<String, Object>> list = (List<Map<String, Object>>) (((Map) search.get("hits")).get("hits"));
|
||||
List<Map<String, Object>> mapList = new ArrayList<>();
|
||||
for (Map<String, Object> map : list) {
|
||||
Map<String, Object> mapSource = (Map<String, Object>) map.get("_source");
|
||||
Map<String, Object> mapHighlight = (Map<String, Object>) map.get("highlight");
|
||||
if(ObjectUtils.isNotEmpty(mapHighlight)){
|
||||
for (Map.Entry<String, Object> entry : mapHighlight.entrySet()) {
|
||||
String key = entry.getKey();
|
||||
List<String> value = (List<String>) entry.getValue();
|
||||
String fieldConyent= "";
|
||||
for (String s : value) {
|
||||
fieldConyent += s;
|
||||
}
|
||||
mapSource.put(key,fieldConyent);
|
||||
}
|
||||
//如果这一条数据中有高亮字段值,但是file_text中没有高亮值, 则赋空值,否则列表中会展示所有的文件内容, 赋空后,则展示基础数据
|
||||
String fileText = (String) mapSource.get("file_text");
|
||||
if(StringUtils.isNotBlank(fileText) && !fileText.contains("<text class='highlight-class'>")){
|
||||
mapSource.put("file_text","");
|
||||
}
|
||||
}
|
||||
mapList.add(mapSource);
|
||||
}
|
||||
|
||||
//处理分页
|
||||
IPage page = new Page(pageNo, pageSize);
|
||||
if (StringUtils.isNotBlank(selectValueTwo)) {
|
||||
//二次搜索的结果
|
||||
page.setTotal(Long.parseLong(String.valueOf(((Map) search.get("hits")).get("total"))));
|
||||
page.setRecords(mapList);
|
||||
} else {
|
||||
//首次搜索的结果
|
||||
page.setTotal(Long.parseLong(String.valueOf(((Map) search.get("hits")).get("total"))));
|
||||
page.setRecords(mapList);
|
||||
}
|
||||
return page;
|
||||
}
|
||||
|
||||
private void highlight(Map<String, Object> mapHighlight, String key) {
|
||||
Map<String, Object> mapTemp = new HashMap<>();
|
||||
List<String> list = new ArrayList<>();
|
||||
list.add("<text class='highlight-class'>");
|
||||
List<String> list1 = new ArrayList<>();
|
||||
list1.add("</text>");
|
||||
mapTemp.put("pre_tags", list);
|
||||
mapTemp.put("post_tags", list1);
|
||||
mapTemp.put("fragment_size", 200);//高亮字段内容长度,去除html样式标签,统计字数,设置为200
|
||||
mapTemp.put("number_of_fragments", 1);//高亮内容默认分为5段, 此处设置为一段
|
||||
mapTemp.put("type", "plain");
|
||||
mapHighlight.put(key, mapTemp);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -144,10 +144,10 @@ public class LawsWarnService {
|
||||
String beforeTimeTwelve = beforeTime(12,new Date());
|
||||
Date parseSix = sdf.parse(beforeTimeSix);
|
||||
Date parseTwelve = sdf.parse(beforeTimeTwelve);
|
||||
if(newCarTimeDate.after(new Date()) && newCarTimeDate.before(parseSix)){
|
||||
if((newCarTimeDate.after(new Date()) && newCarTimeDate.before(parseSix)) || newCarTime.equals(beforeTimeSix)){
|
||||
record.put("new_colour","red");
|
||||
}
|
||||
if(newCarTimeDate.after(parseSix) && newCarTimeDate.before(parseTwelve)){
|
||||
if((newCarTimeDate.after(parseSix) && newCarTimeDate.before(parseTwelve)) || newCarTime.equals(beforeTimeTwelve)){
|
||||
record.put("new_colour","yellow");
|
||||
}
|
||||
}
|
||||
@@ -158,16 +158,16 @@ public class LawsWarnService {
|
||||
if(StringUtils.isNotBlank(implementTime) && !"null".equals(implementTime)){
|
||||
try {
|
||||
if(Integer.parseInt(String.valueOf(parameter.get("flag"))) == 1){
|
||||
Date newCarTimeDate = sdf.parse(implementTime);
|
||||
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(newCarTimeDate.after(new Date()) && newCarTimeDate.before(parseSix)){
|
||||
if((implementTimeDate.after(new Date()) && implementTimeDate.before(parseSix)) || implementTime.equals(beforeTimeSix)){
|
||||
record.put("implement_colour","red");
|
||||
}
|
||||
if(newCarTimeDate.after(parseSix) && newCarTimeDate.before(parseTwelve)){
|
||||
if((implementTimeDate.after(parseSix) && implementTimeDate.before(parseTwelve)) || implementTime.equals(beforeTimeTwelve)){
|
||||
record.put("implement_colour","yellow");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.jero.modules.wkflow.controller;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.modules.wkflow.entity.BusMes;
|
||||
import com.jero.modules.wkflow.entity.BusProcessName;
|
||||
|
||||
@@ -21,6 +21,8 @@ public class BusProcessName implements Serializable {
|
||||
|
||||
private String prcName;
|
||||
|
||||
private String prcNameEn;
|
||||
|
||||
private String prcId;
|
||||
|
||||
private String prcMes;
|
||||
|
||||
@@ -137,10 +137,10 @@ spring:
|
||||
|
||||
|
||||
# url: jdbc:mysql://10.0.3.44:3306/jero-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||
# url: jdbc:mysql://10.10.10.44:3306/laws_weilai_test?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai&useSSL=false
|
||||
# username: root
|
||||
# password: 123456
|
||||
# driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
# url: jdbc:mysql://10.10.10.44:3306/laws_weilai?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai&useSSL=false
|
||||
# username: root
|
||||
# password: 123456
|
||||
# driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
# url: jdbc:mysql://121.36.69.172:3307/laws_weilai?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai&useSSL=false
|
||||
url: jdbc:mysql://121.36.69.172:3307/laws_weilai?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||
username: root
|
||||
@@ -158,7 +158,7 @@ spring:
|
||||
allow-bean-definition-overriding: true
|
||||
#redis 配置
|
||||
redis:
|
||||
database: 6
|
||||
database: 13
|
||||
host: 121.36.69.172
|
||||
lettuce:
|
||||
pool:
|
||||
|
||||
|
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 |
@@ -531,7 +531,7 @@ module.exports = {
|
||||
newClause: 'New Clause',
|
||||
clauseNo: 'Item No.',
|
||||
functionalAreas: 'Functional Areas',
|
||||
technicalField: 'Tech field',
|
||||
technicalField: 'Tech Field',
|
||||
informationCategory: 'Info Type',
|
||||
contentValidity: 'Content Validity',
|
||||
content: 'Content',
|
||||
@@ -822,7 +822,7 @@ module.exports = {
|
||||
sendBack: 'Reject',
|
||||
taskConfirmationProcess: 'Task confirmation process',
|
||||
notFinished: 'Assigned',
|
||||
Finished: 'Complete',
|
||||
Finished: 'Completed',
|
||||
theRequirementst: 'The engineering interface person confirms the compliance requirements',
|
||||
dataLoading: 'Data loading...',
|
||||
Submitting: 'Submitting',
|
||||
@@ -1051,7 +1051,7 @@ module.exports = {
|
||||
ParameterNo: 'Number',
|
||||
NRequired: 'Required',
|
||||
NParameterName: 'Para Name',
|
||||
NtechnicalField: 'Tech field',
|
||||
NtechnicalField: 'Tech Field',
|
||||
NparameterBatch: 'Params Batch',
|
||||
NareaOfResponsibility: 'Responsible Field',
|
||||
NParameterDescription: 'Description',
|
||||
@@ -1122,7 +1122,7 @@ module.exports = {
|
||||
RelevantMaterials: 'RelevantMaterials',
|
||||
evaluatorFeedback: 'Evaluator Feedback',
|
||||
nameTechnicalDocument: 'Name of technical document',
|
||||
chapter: 'chapter',
|
||||
chapter: 'Chapter',
|
||||
problemDescription: 'Problem Description',
|
||||
filingExternalOpinions: 'Filing of external opinions',
|
||||
regulatoryTechnicalEvaluationResults: 'Regulatory technical evaluation results',
|
||||
@@ -1168,7 +1168,7 @@ module.exports = {
|
||||
exportComparisonReport: 'Export Comparison Report',
|
||||
comparisonDifferenceComment: 'Comparison Difference Comment',
|
||||
fullTextComments: 'Full text comments',
|
||||
fileDeclaration: 'file Declaration',
|
||||
fileDeclaration: 'File Declaration',
|
||||
FileForDetails: 'File For Details',
|
||||
Converting: 'Converting',
|
||||
convertNetwork: 'Convert Network',
|
||||
@@ -1193,7 +1193,7 @@ module.exports = {
|
||||
Fileuploaded: 'File uploaded, please wait',
|
||||
uploadedbyyourself: 'You can only delete files and data uploaded by yourself',
|
||||
Fileuploaded: 'File uploading, please wait',
|
||||
doNotHavePermissionDeleteData: 'Do not have permission to delete this data,',
|
||||
doNotHavePermissionDeleteData: 'Do not have permission to delete this data',
|
||||
Parametercollection: 'Parameter Collection',
|
||||
Collectlist: 'Colle Ctlist',
|
||||
Statisticalmodels: 'Statisti Calmodels',
|
||||
@@ -1250,7 +1250,7 @@ module.exports = {
|
||||
Parabatch: 'Para Batch',
|
||||
freeze:'Please select the configuration you want to freeze',
|
||||
optionDropDownBox:'Option drop - down box',
|
||||
attachmentUpload:'file',
|
||||
attachmentUpload:'File',
|
||||
textInput:'Text Input',
|
||||
deleteNode:'If there is any file information, the file will be deleted. Are you sure to delete this data?',
|
||||
HaveReleased:'Have released',
|
||||
@@ -1262,4 +1262,11 @@ module.exports = {
|
||||
currentlyTheLastOneCannotmovedDown:'Currently the last one cannot be moved down',
|
||||
weilaiRegulationMonthlyReport:'Weilai Regulation Monthly Report',
|
||||
onlyTheDataWhoseStatusNotInitiatedAcceptedChanged:'Only the data whose list confirmation status is accepted and the task list status is not initiated or the task list status is accepted can be changed',
|
||||
thereTitleWhichCannotBeDeleted:'There are new contents under this title, which cannot be deleted',
|
||||
industryInformationDynamicTemplate:'Industry information dynamic template',
|
||||
relatedFields:'Related fields',
|
||||
relatedFieldsEn:'Related fields (English)',
|
||||
source:'Source',
|
||||
sourceEn:'Source (English)',
|
||||
onlyone:'Only one merge delimiter can be entered',
|
||||
}
|
||||
@@ -874,7 +874,7 @@ module.exports = {
|
||||
experimentFailed: '实验失败',
|
||||
toBeStarted: '待开始',
|
||||
inProgress: '进行中',
|
||||
Underway:'进行中',
|
||||
Underway: '进行中',
|
||||
green: '绿',
|
||||
red: '红',
|
||||
blue: '蓝',
|
||||
@@ -1302,55 +1302,55 @@ module.exports = {
|
||||
Inthecollection: '收集中',
|
||||
Notatthe: '未开始',
|
||||
Thepercentage: '百分比',
|
||||
problemKnowledgeBase:'问题知识库',
|
||||
recentHotSpots:'近期热点',
|
||||
disseminationMaterials:'传播物料',
|
||||
informationSafety:'信息安全',
|
||||
blueBook:'蓝皮书',
|
||||
invoiceCollection:'发票合集',
|
||||
productHighlights:'产品亮点',
|
||||
financialReimbursement:'财务报销',
|
||||
classificationMaintenance:'分类维护',
|
||||
managePublishing:'管理发布',
|
||||
displayPermission:'展示权限',
|
||||
authorizedUser:'权限用户',
|
||||
problemClassification:'问题分类',
|
||||
market:'市场',
|
||||
documentNumber:'文档编号',
|
||||
documentTitle:'文档标题',
|
||||
bringInDocumentInformation:'带入文档信息',
|
||||
thereWhichCannotDeleted:'该标题下存在子标题无法进行删除',
|
||||
sdt:'工程接口人',
|
||||
dre:'填写人',
|
||||
applicableInstructionsMarketList:'市场清单适用说明',
|
||||
pleaseSelectTheDataCompared:'请选择需要对比的数据',
|
||||
problemLabel:'问题标签',
|
||||
personCharge:'负责人',
|
||||
addLabel:'新增标签',
|
||||
editLabel:'编辑标签',
|
||||
applicableMarket:'适用市场',
|
||||
templateMaintenance:'模板维护',
|
||||
associatedWebsite:'关联网址',
|
||||
dropDownOptions:'下拉选项',
|
||||
dropDownOptionMaintenance:'下拉选项维护',
|
||||
displayInformation:'展示信息',
|
||||
addComparison:'添加对比',
|
||||
showOrNot:'是否展示',
|
||||
comparisonMarket:'对比市场',
|
||||
share:'分享',
|
||||
simplifiedChinese:'简体中文',
|
||||
uploadOnly:'只能上传',
|
||||
turnOnAutoMatch:'打开自动匹配',
|
||||
Adjustareasofresponsibility:'调整责任领域',
|
||||
regulatoryTechnicalAssessment:'法规技术评估',
|
||||
OpenOne:'公开',
|
||||
Privacy:'私密',
|
||||
punctuationmark:'只能输入除#号和逗号外的英文标点符号',
|
||||
problemKnowledgeBase: '问题知识库',
|
||||
recentHotSpots: '近期热点',
|
||||
disseminationMaterials: '传播物料',
|
||||
informationSafety: '信息安全',
|
||||
blueBook: '蓝皮书',
|
||||
invoiceCollection: '发票合集',
|
||||
productHighlights: '产品亮点',
|
||||
financialReimbursement: '财务报销',
|
||||
classificationMaintenance: '分类维护',
|
||||
managePublishing: '管理发布',
|
||||
displayPermission: '展示权限',
|
||||
authorizedUser: '权限用户',
|
||||
problemClassification: '问题分类',
|
||||
market: '市场',
|
||||
documentNumber: '文档编号',
|
||||
documentTitle: '文档标题',
|
||||
bringInDocumentInformation: '带入文档信息',
|
||||
thereWhichCannotDeleted: '该标题下存在子标题无法进行删除',
|
||||
sdt: '工程接口人',
|
||||
dre: '填写人',
|
||||
applicableInstructionsMarketList: '市场清单适用说明',
|
||||
pleaseSelectTheDataCompared: '请选择需要对比的数据',
|
||||
problemLabel: '问题标签',
|
||||
personCharge: '负责人',
|
||||
addLabel: '新增标签',
|
||||
editLabel: '编辑标签',
|
||||
applicableMarket: '适用市场',
|
||||
templateMaintenance: '模板维护',
|
||||
associatedWebsite: '关联网址',
|
||||
dropDownOptions: '下拉选项',
|
||||
dropDownOptionMaintenance: '下拉选项维护',
|
||||
displayInformation: '展示信息',
|
||||
addComparison: '添加对比',
|
||||
showOrNot: '是否展示',
|
||||
comparisonMarket: '对比市场',
|
||||
share: '分享',
|
||||
simplifiedChinese: '简体中文',
|
||||
uploadOnly: '只能上传',
|
||||
turnOnAutoMatch: '打开自动匹配',
|
||||
Adjustareasofresponsibility: '调整责任领域',
|
||||
regulatoryTechnicalAssessment: '法规技术评估',
|
||||
OpenOne: '公开',
|
||||
Privacy: '私密',
|
||||
punctuationmark: '只能输入除#号和逗号外的英文标点符号',
|
||||
created: '创建时间',
|
||||
updated:'更新时间',
|
||||
optionDropDownBox:'下拉选择',
|
||||
attachmentUpload:'附件上传',
|
||||
textInput:'文本输入',
|
||||
updated: '更新时间',
|
||||
optionDropDownBox: '下拉选择',
|
||||
attachmentUpload: '附件上传',
|
||||
textInput: '文本输入',
|
||||
Paraname: '参数名称',
|
||||
Parabatch: '参数批次',
|
||||
freeze:'请选择冻结配置',
|
||||
@@ -1364,4 +1364,11 @@ module.exports = {
|
||||
currentlyTheLastOneCannotmovedDown:'当前已是最后一个无法进行下移',
|
||||
weilaiRegulationMonthlyReport:'蔚来法规月报',
|
||||
onlyTheDataWhoseStatusNotInitiatedAcceptedChanged:'只能变更清单确认状态为接受并且任务清单状态为未发起或任务清单状态为接受的数据',
|
||||
thereTitleWhichCannotBeDeleted: '该标题下存在新增内容,不能删除',
|
||||
industryInformationDynamicTemplate: '行业资讯动态模板',
|
||||
relatedFields: '相关领域',
|
||||
relatedFieldsEn: '相关领域(英文)',
|
||||
source: '来源',
|
||||
sourceEn: '来源(英文)',
|
||||
onlyone:'只能输入一个合并分隔符',
|
||||
}
|
||||
@@ -279,6 +279,11 @@ export default {
|
||||
/deep/.add-input{
|
||||
min-height: 135px!important;
|
||||
}
|
||||
::v-deep .page{
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
</style>
|
||||
<style lang='less'>
|
||||
.area-module {
|
||||
@@ -292,9 +297,4 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
.page{
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
</style>
|
||||
@@ -240,6 +240,11 @@ export default {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
::v-deep .page{
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
</style>
|
||||
<style lang='less'>
|
||||
.area-module {
|
||||
@@ -253,9 +258,4 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
.page{
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
</style>
|
||||
@@ -278,6 +278,18 @@
|
||||
<!-- 文本+下拉多选-->
|
||||
<div v-else-if='detailDate.controlType === "6"' class='add_flex'>
|
||||
<div v-for='(item,index) in detailDate.list' :key='index' class='add-width'>
|
||||
<div v-if='item.type==="pull_more"'>
|
||||
<a-select v-model="item.dataValue"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
mode="multiple" class='selectWid'
|
||||
:disabled="item.isLock == '1' ? true: false" allowClear>
|
||||
<a-select-option v-for="(item, key) in item.controlValue" :key="key" :value="item.value">
|
||||
<span style="display: inline-block;width: 100%" :title=" item.label ">
|
||||
{{ item.label }}
|
||||
</span>
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</div>
|
||||
<div v-if='item.type==="text"'>
|
||||
<!-- 文本校验 分情况-->
|
||||
<!-- 1 无-->
|
||||
@@ -369,18 +381,7 @@
|
||||
v-model="item.dataValue"/>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if='item.type==="pull_more"'>
|
||||
<a-select v-model="item.dataValue"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
mode="multiple" class='selectWid'
|
||||
:disabled="item.isLock == '1' ? true: false" allowClear>
|
||||
<a-select-option v-for="(item, key) in item.controlValue" :key="key" :value="item.value">
|
||||
<span style="display: inline-block;width: 100%" :title=" item.label ">
|
||||
{{ item.label }}
|
||||
</span>
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- 文本+附件-->
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
</a-table>
|
||||
<div class="page" v-if="dataList.length > 0">
|
||||
<a-pagination
|
||||
:show-total="total => $t('total')+`${total}`+$t('strip')"
|
||||
:show-total="total => $t('total')+` ${total} `+$t('strip')"
|
||||
show-quick-jumper
|
||||
show-size-changer
|
||||
:page-size.sync="pageSize"
|
||||
|
||||
@@ -150,6 +150,11 @@ export default {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
::v-deep .page{
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
</style>
|
||||
<style lang='less'>
|
||||
.area-module {
|
||||
@@ -163,9 +168,4 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
.page{
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
</style>
|
||||
@@ -348,6 +348,11 @@ export default {
|
||||
border: 1px #00B3BE solid;
|
||||
color: #00B3BE;
|
||||
}
|
||||
::v-deep .page{
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
</style>
|
||||
<style lang='less'>
|
||||
.area-module {
|
||||
@@ -361,9 +366,4 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
.page{
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
</style>
|
||||
@@ -348,6 +348,11 @@ export default {
|
||||
border: 1px #00B3BE solid;
|
||||
color: #00B3BE;
|
||||
}
|
||||
::v-deep .page{
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
</style>
|
||||
<style lang='less'>
|
||||
.area-module {
|
||||
@@ -361,9 +366,4 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
.page{
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
</style>
|
||||
@@ -31,7 +31,7 @@
|
||||
</a-table>
|
||||
<div class="page" v-if="dataSource.length > 0">
|
||||
<a-pagination
|
||||
:show-total="total => $t('total')+`${total}`+$t('strip')"
|
||||
:show-total="total => $t('total')+` ${total} `+$t('strip')"
|
||||
show-quick-jumper
|
||||
show-size-changer
|
||||
:page-size.sync="pageSize "
|
||||
|
||||
@@ -56,12 +56,19 @@
|
||||
|
||||
<a-row style="margin-bottom: 12px;">
|
||||
<a-col :md="12" :xs="24">
|
||||
<a-form-item :label="$t('FilterMatching')" :labelCol="{md: 6,xs:24}" :wrapperCol="{md: 18,xs:24}" style="width: 100%;">
|
||||
<a-select v-model="matchType" :getPopupContainer="node=>node.parentNode" style="width: 100%;">
|
||||
<a-select-option value="and">AND{{$t('AllMatching')}}</a-select-option>
|
||||
<a-select-option value="or">OR{{$t('AnyOneMatches')}}</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('FilterMatching')">
|
||||
<span>{{$t('FilterMatching')}}</span>
|
||||
</div>
|
||||
<!-- :label="$t('FilterMatching')" :labelCol="{md: 6,xs:24}" :wrapperCol="{md: 18,xs:24}" style="width: 100%;"-->
|
||||
<a-form-item class='box-input'>
|
||||
<a-select v-model="matchType" :getPopupContainer="node=>node.parentNode" style="width: 100%;">
|
||||
<a-select-option value="and">AND{{$t('AllMatching')}}</a-select-option>
|
||||
<a-select-option value="or">OR{{$t('AnyOneMatches')}}</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</div>
|
||||
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
@@ -627,7 +634,33 @@
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.box-title-text {
|
||||
line-height: 1.4;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.title-text {
|
||||
width: 110px;
|
||||
color: #000F16;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
margin-right: 16px;
|
||||
margin-top: 3px;
|
||||
text-align: right;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.box-input {
|
||||
display: inline-block;
|
||||
width: 70%;
|
||||
height: 38px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
.j-super-query-box {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
@@ -132,6 +132,7 @@
|
||||
if (routeTitle) {
|
||||
currentRoute.meta.title = routeTitle
|
||||
}
|
||||
console.log(currentRoute)
|
||||
// update-end-author:sunjianlei date:20191223 for: 修复刷新后菜单Tab名字显示异常
|
||||
this.pageList.push(currentRoute)
|
||||
this.linkList.push(currentRoute.fullPath)
|
||||
@@ -212,13 +213,13 @@
|
||||
|
||||
// update-begin-author:sunjianlei date:20200120 for: 动态更改页面标题
|
||||
changeTitle(title) {
|
||||
let projectTitle = '蔚来全球法规平台'
|
||||
// 首页特殊处理
|
||||
if (this.$route.path === indexKey) {
|
||||
document.title = projectTitle
|
||||
} else {
|
||||
document.title = title + ' · ' + projectTitle
|
||||
}
|
||||
// let projectTitle = '蔚来全球法规平台'
|
||||
// // 首页特殊处理
|
||||
// if (this.$route.path === indexKey) {
|
||||
// document.title = projectTitle
|
||||
// } else {
|
||||
// document.title = title + ' · ' + projectTitle
|
||||
// }
|
||||
},
|
||||
// update-end-author:sunjianlei date:20200120 for: 动态更改页面标题
|
||||
|
||||
|
||||
@@ -41,12 +41,15 @@
|
||||
this.$route.meta.title === ' Home Page') {
|
||||
this.Navigation = this.$route.meta.title
|
||||
this.subNavigation = null
|
||||
let projectTitle = '蔚来全球法规平台'
|
||||
document.title = projectTitle
|
||||
} else {
|
||||
this.updateMenu()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
updateMenu() {
|
||||
let projectTitle = '蔚来全球法规平台'
|
||||
const routes = this.$route.matched.concat()
|
||||
const { hidden } = this.$route.meta
|
||||
if (routes.length >= 3 && hidden) {
|
||||
@@ -61,6 +64,7 @@
|
||||
})
|
||||
this.Navigation = this.openKeys[1].meta.title
|
||||
this.subNavigation = this.$route.meta.title
|
||||
document.title = this.subNavigation + ' · ' + projectTitle
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -189,6 +189,14 @@
|
||||
},
|
||||
methods: {
|
||||
searchQuery() {
|
||||
if (this.isDefault) {
|
||||
let startTime = moment(new Date()).format('YYYY-MM-DD')
|
||||
let endTime = this.haflYear()
|
||||
if (this.queryParam['WarnTime'].length == 0) {
|
||||
this.queryParam['WarnTime'] = [startTime, endTime]
|
||||
}
|
||||
this.queryParam = { ...this.queryParam }
|
||||
}
|
||||
eventBUs.$emit('searchQuery', JSON.parse(JSON.stringify(this.queryParam)))
|
||||
},
|
||||
searchReset() {
|
||||
@@ -298,8 +306,7 @@
|
||||
}
|
||||
|
||||
.title-text {
|
||||
width: 20%;
|
||||
min-width: 100px;
|
||||
width: 100px;
|
||||
color: #000F16;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
@@ -315,7 +322,7 @@
|
||||
.box-input {
|
||||
/*min-width: 200px;*/
|
||||
display: inline-block;
|
||||
width: 70%;
|
||||
width: calc(100% - 116px);
|
||||
height: 38px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
@@ -324,4 +331,16 @@
|
||||
height: 38px;
|
||||
/*margin-top: 2px;*/
|
||||
}
|
||||
|
||||
::v-deep .ant-select-tree {
|
||||
width: auto;
|
||||
height: 300px;
|
||||
overflow: auto;
|
||||
position: absolute;
|
||||
/*background: #fff;*/
|
||||
}
|
||||
|
||||
::v-deep .ant-select-tree-dropdown {
|
||||
min-height: 320px;
|
||||
}
|
||||
</style>
|
||||
@@ -7,7 +7,7 @@
|
||||
rowKey="id"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
:pagination="false"
|
||||
:scroll="{x: '100%',y:'calc(100vh - 230px)'}"
|
||||
:scroll="{x: '100%',y:'calc(100vh - 330px)'}"
|
||||
:data-source="dataSource"
|
||||
:loading="loading"
|
||||
sticky
|
||||
@@ -25,6 +25,9 @@
|
||||
<span style='padding-right: 10px;margin-left: -16px'>{{ item.db_field_txt }} </span>
|
||||
<a-button @click='onClickSee(item)'>{{$t('See')}}</a-button>
|
||||
</div>
|
||||
<span slot="ParameterDescription" slot-scope="text,record" :title="text">
|
||||
{{ text && text.length > 8 ? text.slice(0, 7) + '...' : text }}
|
||||
</span>
|
||||
|
||||
<span slot="operationbtn" slot-scope="record">
|
||||
<span v-if='currentPersonRole === "homo"'>
|
||||
@@ -452,6 +455,7 @@
|
||||
console.log(res)
|
||||
if (res.data.success) {
|
||||
_this.$message.success(_this.$t('OperationSuccessful'))
|
||||
// this.$refs['ruleFormOne'].resetFields()
|
||||
_this.areaVisiblezr = false
|
||||
this.getLoginUserType()
|
||||
} else {
|
||||
@@ -492,6 +496,7 @@
|
||||
console.log(res)
|
||||
if (res.data.success) {
|
||||
_this.$message.success(_this.$t('OperationSuccessful'))
|
||||
this.$refs['ruleForm'].resetFields()
|
||||
_this.areaVisible = false
|
||||
this.getLoginUserType()
|
||||
} else {
|
||||
@@ -515,23 +520,25 @@
|
||||
},
|
||||
// 点击工程接口人的详情人员 有权限
|
||||
areaOfResponsibility(record) {
|
||||
this.areaVisible = true
|
||||
|
||||
// this.$refs.ruleForm.clearValidate()
|
||||
this.$nextTick(() => {
|
||||
this.Dateline = { ...this.Dateline }
|
||||
this.getquerySdtList(record)
|
||||
this.$refs.ruleForm.clearValidate()
|
||||
})
|
||||
this.areaVisible = true
|
||||
},
|
||||
// 点击责任领域的详情人员 有权限
|
||||
ondataValueTobe(record) {
|
||||
this.areaVisiblezr = true
|
||||
|
||||
// this.$refs.ruleForm.clearValidate()
|
||||
this.$nextTick(() => {
|
||||
this.Dateline = { ...this.Dateline }
|
||||
this.getquerySdtId = record.id
|
||||
this.$refs.ruleFormOne.clearValidate()
|
||||
})
|
||||
this.areaVisiblezr = true
|
||||
},
|
||||
dataValueTobeinitiated() {
|
||||
this.$message.warning(this.$t('certifiedEngineer') + this.$t('and') + this.$t('Statusis') + this.$t('CollectionInitiated') + this.$t('ReturnedPerson') + this.$t('alteration') + this.$t('toHavePermission'))
|
||||
@@ -627,7 +634,7 @@
|
||||
title: res.db_field_txt,
|
||||
dataIndex: res.db_field_name,
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
// ellipsis: true,
|
||||
sorter: res.sort,
|
||||
width: 160
|
||||
})
|
||||
@@ -640,6 +647,11 @@
|
||||
customRender: 'operationzr'
|
||||
}
|
||||
}
|
||||
if(res.click2){
|
||||
this.columns[index].scopedSlots = {
|
||||
customRender: 'ParameterDescription'
|
||||
}
|
||||
}
|
||||
if (res.click) {
|
||||
// 工程接口人列表修改
|
||||
this.columns[index].scopedSlots = {
|
||||
@@ -900,6 +912,13 @@
|
||||
border: none !important;
|
||||
padding: 0 !important;
|
||||
}
|
||||
::v-deep .ant-table-row:first-child {
|
||||
background: #fff!important;
|
||||
}
|
||||
|
||||
::v-deep .ant-table-body {
|
||||
background: transparent!important;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.resize-table-th {
|
||||
@@ -926,4 +945,5 @@
|
||||
.rowClassRedYellow {
|
||||
background: yellow;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
rowKey="id"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
:pagination="false"
|
||||
:scroll="{x: '100%',y:'calc(100vh - 230px)'}"
|
||||
:scroll="{x: '100%',y:'calc(100vh - 330px)'}"
|
||||
:data-source="dataSource"
|
||||
:loading="loading"
|
||||
sticky
|
||||
@@ -728,6 +728,13 @@
|
||||
border: none !important;
|
||||
padding: 0 !important;
|
||||
}
|
||||
::v-deep .ant-table-row:first-child {
|
||||
background: #fff!important;
|
||||
}
|
||||
|
||||
::v-deep .ant-table-body {
|
||||
background: transparent!important;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.resize-table-th {
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
size="middle"
|
||||
:loading="loading"
|
||||
:pagination="false"
|
||||
:scroll="{x: '100%'}"
|
||||
:scroll="{x: '100%',y:'calc(100vh - 320px)'}"
|
||||
:data-source="dataSource"
|
||||
:columns="columns"
|
||||
>
|
||||
@@ -263,4 +263,11 @@
|
||||
color: #040B29;
|
||||
margin-right: 4px;
|
||||
}
|
||||
::v-deep .ant-table-row:first-child {
|
||||
background: #fff!important;
|
||||
}
|
||||
|
||||
::v-deep .ant-table-body {
|
||||
background: transparent!important;
|
||||
}
|
||||
</style>
|
||||
@@ -32,7 +32,6 @@
|
||||
:maxTagCount="1"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
class="box-input"
|
||||
style="width: 100%"
|
||||
:tree-data="CategoryTreeList"
|
||||
tree-checkable
|
||||
:placeholder="$t('PleaseSelect')+$t('technicalField')"
|
||||
@@ -320,8 +319,7 @@
|
||||
}
|
||||
|
||||
.title-text {
|
||||
width: 20%;
|
||||
min-width: 110px;
|
||||
width: 110px;
|
||||
color: #000F16;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
@@ -336,7 +334,7 @@
|
||||
|
||||
.box-input {
|
||||
display: inline-block;
|
||||
width: 70%;
|
||||
width: calc(100% - 126px);
|
||||
height: 38px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
@@ -349,4 +347,11 @@
|
||||
.text-operation {
|
||||
margin-right: 8px;
|
||||
}
|
||||
::v-deep .ant-table-row:first-child {
|
||||
background: #fff!important;
|
||||
}
|
||||
|
||||
::v-deep .ant-table-body {
|
||||
background: transparent!important;
|
||||
}
|
||||
</style>
|
||||
@@ -29,7 +29,7 @@
|
||||
</a-table>
|
||||
<div class="page" v-if="dataList.length > 0">
|
||||
<a-pagination
|
||||
:show-total="total => $t('total')+`${total}`+$t('strip')"
|
||||
:show-total="total => $t('total')+` ${total} `+$t('strip')"
|
||||
show-quick-jumper
|
||||
show-size-changer
|
||||
:page-size.sync="pageSize"
|
||||
@@ -137,7 +137,7 @@
|
||||
_this.$message.success(_this.$t('OperationSuccessful'))
|
||||
_this.replacePage()
|
||||
} else {
|
||||
_this.$message.warning(_this.$t('operationFailed'))
|
||||
_this.$message.warning(res.success)
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -207,4 +207,11 @@
|
||||
color: #040B29;
|
||||
display: inline-block;
|
||||
}
|
||||
::v-deep .ant-table-row:first-child {
|
||||
background: #fff!important;
|
||||
}
|
||||
|
||||
::v-deep .ant-table-body {
|
||||
background: transparent!important;
|
||||
}
|
||||
</style>
|
||||
@@ -235,6 +235,7 @@
|
||||
let query = {
|
||||
pageNo: this.pageNo,
|
||||
pageSize: this.pageSize,
|
||||
createBy: this.userInfo().username,
|
||||
...queryParam
|
||||
}
|
||||
this.loading = true
|
||||
@@ -476,7 +477,8 @@
|
||||
.text-operation {
|
||||
margin-right: 8px;
|
||||
}
|
||||
::v-deep .ant-select-dropdown{
|
||||
|
||||
::v-deep .ant-select-dropdown {
|
||||
z-index: 100;
|
||||
}
|
||||
</style>
|
||||
@@ -357,5 +357,11 @@
|
||||
color: red;
|
||||
margin-right: 4px;
|
||||
}
|
||||
::v-deep .ant-table-row:first-child {
|
||||
background: #fff!important;
|
||||
}
|
||||
|
||||
::v-deep .ant-table-body {
|
||||
background: transparent!important;
|
||||
}
|
||||
</style>
|
||||
@@ -34,7 +34,7 @@
|
||||
</a-table>
|
||||
<div class="page" v-if="dataList.length > 0">
|
||||
<a-pagination
|
||||
:show-total="total => $t('total')+`${total}`+$t('strip')"
|
||||
:show-total="total => $t('total')+` ${total} `+$t('strip')"
|
||||
show-quick-jumper
|
||||
show-size-changer
|
||||
:page-size.sync="pageSize"
|
||||
@@ -215,4 +215,11 @@
|
||||
color: #040B29;
|
||||
display: inline-block;
|
||||
}
|
||||
::v-deep .ant-table-row:first-child {
|
||||
background: #fff!important;
|
||||
}
|
||||
|
||||
::v-deep .ant-table-body {
|
||||
background: transparent!important;
|
||||
}
|
||||
</style>
|
||||
@@ -30,9 +30,9 @@
|
||||
<img class="content-box-box-img" style="display: inline-block;width: auto" v-if="index2 == 0">
|
||||
<img :src="item2.img" v-else class="content-box-box-img" alt="">
|
||||
<span v-if="index2 == 0" class="content-box-box-text"></span>
|
||||
<span v-else class="content-box-box-text">
|
||||
<div v-else class="content-box-box-text">
|
||||
{{item2.applyMarket_dictText}}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="content-box-box" v-else>
|
||||
@@ -116,6 +116,7 @@
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
document.title = 'Country Card'+ '-' + this.$t('details')
|
||||
this.queryCountry(() => {
|
||||
this.replacePage()
|
||||
})
|
||||
@@ -186,7 +187,6 @@
|
||||
})
|
||||
}
|
||||
if (content && content.length > 0) {
|
||||
console.log(content)
|
||||
content.forEach((res, index) => {
|
||||
this.contentList[index + 1] = { name: res.lableName }
|
||||
this.contentList[index + 1].list = []
|
||||
@@ -228,7 +228,15 @@
|
||||
}
|
||||
postAction(this.list, query).then((res) => {
|
||||
if (res.success) {
|
||||
this.queryCountryList = res.result || []
|
||||
this.queryCountryList = []
|
||||
applyMarkets.split(',').forEach(val => {
|
||||
res.result.forEach(ol => {
|
||||
if (val == ol.applyMarket) {
|
||||
this.queryCountryList.push(ol)
|
||||
}
|
||||
})
|
||||
})
|
||||
// this.queryCountryList = res.result || []
|
||||
this.isTrue = false
|
||||
this.$nextTick(() => {
|
||||
this.clientWidth = 340 * (this.queryCountryList.length + 1) + 'px'
|
||||
@@ -345,22 +353,28 @@
|
||||
display: inline-block;
|
||||
cursor: pointer;
|
||||
background: #fff;
|
||||
position: relative;
|
||||
border-right: 1px #d9d9d9 solid;
|
||||
border-top: 1px #d9d9d9 solid;
|
||||
border-bottom: 1px #d9d9d9 solid;
|
||||
|
||||
.content-box-box-img {
|
||||
width: 70%;
|
||||
width: 238px;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.content-box-box-text {
|
||||
display: inline-block;
|
||||
width: 30%;
|
||||
width: calc(100% - 238px);
|
||||
text-align: center;
|
||||
font-size: 18px;
|
||||
font-weight: 500;
|
||||
color: #040B29;
|
||||
word-break: break-word;
|
||||
white-space: pre-line;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translateY(-66%);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -380,17 +394,18 @@
|
||||
cursor: pointer;
|
||||
|
||||
.content-box-box-img {
|
||||
width: 70%;
|
||||
width: 238px;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.content-box-box-text {
|
||||
display: inline-block;
|
||||
width: 30%;
|
||||
width: calc(100% - 238px);
|
||||
text-align: center;
|
||||
font-size: 18px;
|
||||
font-weight: 500;
|
||||
color: #040B29;
|
||||
word-break: break-word;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -54,6 +54,7 @@
|
||||
v-if="(formInline.dataList.length-1) == index && formInline.dataList.length < 5"
|
||||
type="plus-circle"/>
|
||||
<a-icon class="icon-size"
|
||||
style="margin-left: 8px"
|
||||
@click="deleteData"
|
||||
v-if="formInline.dataList.length > 1 && (formInline.dataList.length - 1) == index"
|
||||
type="minus-circle"/>
|
||||
@@ -252,6 +253,5 @@
|
||||
.icon-size {
|
||||
font-size: 18px;
|
||||
margin-top: 14px;
|
||||
margin-right: 4px;
|
||||
}
|
||||
</style>
|
||||
@@ -186,4 +186,11 @@
|
||||
.text-operation {
|
||||
margin-right: 8px;
|
||||
}
|
||||
::v-deep .ant-table-row:first-child {
|
||||
background: #fff!important;
|
||||
}
|
||||
|
||||
::v-deep .ant-table-body {
|
||||
background: transparent!important;
|
||||
}
|
||||
</style>
|
||||
@@ -65,7 +65,7 @@
|
||||
</a-table>
|
||||
<div class="page" v-if="dataList.length > 0">
|
||||
<a-pagination
|
||||
:show-total="total => $t('total')+`${total}`+$t('strip')"
|
||||
:show-total="total => $t('total')+` ${total} `+$t('strip')"
|
||||
show-quick-jumper
|
||||
show-size-changer
|
||||
:page-size.sync="pageSize"
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
</a-table>
|
||||
<div class="page" v-if="dataList.length > 0">
|
||||
<a-pagination
|
||||
:show-total="total => $t('total')+`${total}`+$t('strip')"
|
||||
:show-total="total => $t('total')+` ${total} `+$t('strip')"
|
||||
show-quick-jumper
|
||||
show-size-changer
|
||||
:page-size.sync="pageSize"
|
||||
@@ -209,4 +209,11 @@
|
||||
color: #040B29;
|
||||
display: inline-block;
|
||||
}
|
||||
::v-deep .ant-table-row:first-child {
|
||||
background: #fff!important;
|
||||
}
|
||||
|
||||
::v-deep .ant-table-body {
|
||||
background: transparent!important;
|
||||
}
|
||||
</style>
|
||||
@@ -278,10 +278,12 @@
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
document.title = this.$t('problemKnowledgeBase') + this.$t('newlyAdded')
|
||||
this.getBase()
|
||||
if (this.$route.query.id) {
|
||||
this.queryById()
|
||||
document.title = this.$t('problemKnowledgeBase') + this.$t('edit')
|
||||
} else {
|
||||
document.title = this.$t('problemKnowledgeBase') + this.$t('newlyAdded')
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -587,7 +589,12 @@
|
||||
::v-deep .itemModel-explain .ant-form-explain {
|
||||
margin-top: 60px
|
||||
}
|
||||
|
||||
::v-deep .ql-tooltip {
|
||||
z-index: 10 !important;
|
||||
}
|
||||
|
||||
::v-deep .ql-snow .ql-picker {
|
||||
height: 36px;
|
||||
}
|
||||
</style>
|
||||
@@ -26,15 +26,15 @@
|
||||
</template>
|
||||
</div>
|
||||
<div class="box-content-right">
|
||||
<div @click="classificationClick" class="operator-text" v-has="'virtual:set:creater'">
|
||||
<div @click="classificationClick" class="operator-text">
|
||||
<a-icon type="setting"/>
|
||||
{{$t('classificationMaintenance')}}
|
||||
</div>
|
||||
<div @click="managePublishingClick" class="operator-text" v-has="'virtual:set:creater'">
|
||||
<div @click="managePublishingClick" class="operator-text">
|
||||
<a-icon type="carry-out"/>
|
||||
{{$t('managePublishing')}}
|
||||
</div>
|
||||
<div @click="newlyAddedClick" class="operator-text" v-has="'virtual:set:creater'">
|
||||
<div @click="newlyAddedClick" class="operator-text">
|
||||
<a-icon type="plus"/>
|
||||
{{$t('newlyAdded')}}
|
||||
</div>
|
||||
|
||||
@@ -95,6 +95,7 @@
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
document.title = this.$t('managePublishing')
|
||||
},
|
||||
methods: {
|
||||
...mapGetters(['userInfo']),
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
|
||||
<div class="page" v-if="dataList.length > 0">
|
||||
<a-pagination
|
||||
:show-total="total => $t('total')+`${total}`+$t('strip')"
|
||||
:show-total="total => $t('total')+` ${total} `+$t('strip')"
|
||||
show-quick-jumper
|
||||
show-size-changer
|
||||
:page-size.sync="pageSize"
|
||||
|
||||
@@ -53,7 +53,6 @@
|
||||
@change="changeTree"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
class="box-input"
|
||||
style="width: 100%"
|
||||
:tree-data="chapterContentsList"
|
||||
tree-checkable
|
||||
:placeholder="$t('PleaseSelect')+$t('chapterContents')"
|
||||
@@ -93,6 +92,8 @@
|
||||
v-else-if="formInline.contentTemplate == '2' && isTrue"/>
|
||||
<releaseStandard :formInlineQuery="formInline" ref="releaseStandardRef" :disabled="disabled"
|
||||
v-else-if="formInline.contentTemplate == '3' && isTrue"/>
|
||||
<industryTemplate :formInlineQuery="formInline" ref="industryTemplateRef" :disabled="disabled"
|
||||
v-else-if="formInline.contentTemplate == '4' && isTrue"/>
|
||||
</a-form-model>
|
||||
</a-spin>
|
||||
<div class="drawer-bootom-button">
|
||||
@@ -109,6 +110,7 @@
|
||||
import defaultTemplate from './defaultTemplate'
|
||||
import solicitOpinions from './solicitOpinions'
|
||||
import releaseStandard from './releaseStandard'
|
||||
import industryTemplate from './industryTemplate'
|
||||
import addModel from './addModel'
|
||||
import { getAction, postAction, downloadFile } from '@/api/manage'
|
||||
import moment from 'moment'
|
||||
@@ -119,6 +121,7 @@
|
||||
defaultTemplate,
|
||||
solicitOpinions,
|
||||
releaseStandard,
|
||||
industryTemplate,
|
||||
addModel
|
||||
},
|
||||
data() {
|
||||
@@ -166,6 +169,10 @@
|
||||
{
|
||||
id: '3',
|
||||
text: this.$t('NewReleasedStandardTemplate')
|
||||
},
|
||||
{
|
||||
id: '4',
|
||||
text: this.$t('industryInformationDynamicTemplate')
|
||||
}
|
||||
],
|
||||
url: {
|
||||
@@ -266,6 +273,8 @@
|
||||
text = 'solicitOpinionsRef'
|
||||
} else if (this.$refs.releaseStandardRef) {
|
||||
text = 'releaseStandardRef'
|
||||
}else if (this.$refs.industryTemplateRef) {
|
||||
text = 'industryTemplateRef'
|
||||
}
|
||||
this.$refs[text].getData((val) => {
|
||||
this.confirmLoading = true
|
||||
@@ -400,5 +409,6 @@
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
word-break: break-word;
|
||||
}
|
||||
</style>
|
||||
@@ -37,7 +37,7 @@
|
||||
</a-table>
|
||||
<div class="page" v-if="dataSource.length > 0">
|
||||
<a-pagination
|
||||
:show-total="total => $t('total')+`${total}`+$t('strip')"
|
||||
:show-total="total => $t('total')+` ${total} `+$t('strip')"
|
||||
show-quick-jumper
|
||||
show-size-changer
|
||||
:page-size.sync="pageSize "
|
||||
@@ -205,6 +205,15 @@
|
||||
this.$message.warning(this.$t('thereWhichCannotDeleted'))
|
||||
return
|
||||
}
|
||||
getAction('/report/lawsMonthlyReportTitleTemplateEO/verifyDelete', { ids: val.id }).then((res) => {
|
||||
if (res.result == 'true') {
|
||||
this.deleteBatch(val)
|
||||
} else {
|
||||
this.$message.warning(this.$t('thereTitleWhichCannotBeDeleted'))
|
||||
}
|
||||
})
|
||||
},
|
||||
deleteBatch(val) {
|
||||
let _this = this
|
||||
this.$confirm({
|
||||
content: _this.$t('ConfirmDelete'),
|
||||
|
||||
@@ -0,0 +1,326 @@
|
||||
<template>
|
||||
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text"
|
||||
:title="$t('title')">{{$t('title')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="titleCn">
|
||||
<a-input class="box-input"
|
||||
:disabled="disabled"
|
||||
v-model.trim="formInline.titleCn"
|
||||
:placeholder="$t('PleaseEnter')+$t('title')"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text"
|
||||
:title="$t('englishTitle')">{{$t('englishTitle')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="titleEn">
|
||||
<a-input class="box-input"
|
||||
:disabled="disabled"
|
||||
v-model.trim="formInline.titleEn"
|
||||
:placeholder="$t('PleaseEnter')+$t('englishTitle')"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text"
|
||||
:title="$t('relatedFields')">{{$t('relatedFields')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="relatedAreasCn">
|
||||
<a-input class="box-input"
|
||||
:disabled="disabled"
|
||||
v-model.trim="formInline.relatedAreasCn"
|
||||
:placeholder="$t('PleaseEnter')+$t('relatedFields')"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text"
|
||||
:title="$t('relatedFieldsEn')">{{$t('relatedFieldsEn')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="relatedAreasEn">
|
||||
<a-input class="box-input"
|
||||
:disabled="disabled"
|
||||
v-model.trim="formInline.relatedAreasEn"
|
||||
:placeholder="$t('PleaseEnter')+$t('relatedFieldsEn')"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text"
|
||||
:title="$t('source')">{{$t('source')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="sourceCn">
|
||||
<a-input class="box-input"
|
||||
:disabled="disabled"
|
||||
v-model.trim="formInline.sourceCn"
|
||||
:placeholder="$t('PleaseEnter')+$t('source')"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text"
|
||||
:title="$t('sourceEn')">{{$t('sourceEn')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="sourceEn">
|
||||
<a-input class="box-input"
|
||||
:disabled="disabled"
|
||||
v-model.trim="formInline.sourceEn"
|
||||
:placeholder="$t('PleaseEnter')+$t('sourceEn')"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text"
|
||||
:title="$t('date')">{{$t('date')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="time">
|
||||
<a-input class="box-input"
|
||||
:disabled="disabled"
|
||||
v-model.trim="formInline.time"
|
||||
:placeholder="$t('PleaseEnter')+$t('date')"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="24">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text" :title="$t('primaryCoverageCn')">{{$t('primaryCoverageCn')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="contentCn">
|
||||
<a-textarea
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('PleaseEnter')+$t('primaryCoverageCn')"
|
||||
v-model.trim="formInline.contentCn" :rows="4"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="24">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text" :title="$t('primaryCoverageEn')">{{$t('primaryCoverageEn')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="contentEn">
|
||||
<a-textarea
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('PleaseEnter')+$t('primaryCoverageEn')"
|
||||
v-model.trim="formInline.contentEn" :rows="4"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="24">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text" :title="$t('link')">{{$t('link')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="link">
|
||||
<a-input class="box-input"
|
||||
:disabled="disabled"
|
||||
v-model.trim="formInline.link"
|
||||
:placeholder="$t('PleaseEnter')+$t('link')"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form-model>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
import { getAction, postAction, downloadFile } from '@/api/manage'
|
||||
|
||||
export default {
|
||||
name: 'industryTemplate',
|
||||
props: ['formInlineQuery', 'disabled'],
|
||||
data() {
|
||||
return {
|
||||
rules: {
|
||||
titleCn: [
|
||||
{
|
||||
max: 500,
|
||||
message: this.$t('title') + this.$t('cannotExceed') + 500 + this.$t('Characters'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
titleEn: [
|
||||
{
|
||||
max: 500,
|
||||
message: this.$t('englishTitle') + this.$t('cannotExceed') + 500 + this.$t('Characters'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
relatedAreasEn: [
|
||||
{
|
||||
max: 100,
|
||||
message: this.$t('relatedFieldsEn') + this.$t('cannotExceed') + 100 + this.$t('Characters'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
relatedAreasCn: [
|
||||
{
|
||||
max: 100,
|
||||
message: this.$t('relatedFields') + this.$t('cannotExceed') + 100 + this.$t('Characters'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
sourceCn: [
|
||||
{
|
||||
max: 100,
|
||||
message: this.$t('source') + this.$t('cannotExceed') + 100 + this.$t('Characters'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
sourceEn: [
|
||||
{
|
||||
max: 100,
|
||||
message: this.$t('sourceEn') + this.$t('cannotExceed') + 100 + this.$t('Characters'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
time: [
|
||||
{
|
||||
max: 100,
|
||||
message: this.$t('date') + this.$t('cannotExceed') + 100 + this.$t('Characters'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
link: [
|
||||
{
|
||||
max: 100,
|
||||
message: this.$t('link') + this.$t('cannotExceed') + 100 + this.$t('Characters'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
contentEn: [
|
||||
{
|
||||
max: 300,
|
||||
message: this.$t('primaryCoverageEn') + this.$t('cannotExceed') + 300 + this.$t('Characters'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
contentCn: [
|
||||
{
|
||||
max: 300,
|
||||
message: this.$t('primaryCoverageCn') + this.$t('cannotExceed') + 300 + this.$t('Characters'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
]
|
||||
},
|
||||
formInline: {},
|
||||
CategoryTreeList: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
if (this.formInlineQuery.id) {
|
||||
this.formInline = JSON.parse(JSON.stringify(this.formInlineQuery))
|
||||
this.formInline = { ...this.formInline }
|
||||
} else {
|
||||
this.formInline = {}
|
||||
this.formInline = { ...this.formInline }
|
||||
}
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
...mapGetters(['userInfo']),
|
||||
getData(callback) {
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
let formInline = JSON.parse(JSON.stringify(this.formInline))
|
||||
Object.keys(formInline).forEach(res => {
|
||||
if (formInline[res] && formInline[res] instanceof Array) {
|
||||
formInline[res] = formInline[res].join(',')
|
||||
}
|
||||
})
|
||||
callback && callback(formInline)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<style scoped>
|
||||
.box-title-text {
|
||||
line-height: 1.4;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.title-text {
|
||||
width: 114px;
|
||||
text-align: right;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
margin-right: 16px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
height: 42px;
|
||||
line-height: 42px;
|
||||
}
|
||||
|
||||
.box-input {
|
||||
display: inline-block;
|
||||
height: 38px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.itemModel {
|
||||
width: calc(100% - 130px);
|
||||
display: inline-block;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.title-text-text {
|
||||
margin-top: 9px;
|
||||
}
|
||||
|
||||
.formAdd {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
.Required {
|
||||
color: red;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.title-text-text {
|
||||
margin-top: 9px;
|
||||
}
|
||||
|
||||
.formAdd {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -423,6 +423,13 @@
|
||||
text-justify: inter-ideograph;
|
||||
word-break: break-all
|
||||
}
|
||||
::v-deep .ant-table-row:first-child {
|
||||
background: #fff!important;
|
||||
}
|
||||
|
||||
::v-deep .ant-table-body {
|
||||
background: transparent!important;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.box-clause .ant-card-body {
|
||||
|
||||
@@ -44,8 +44,10 @@
|
||||
<span class="title-text-text" :title="$t('selectedStandard')">{{$t('selectedStandard')}}</span>
|
||||
</div>
|
||||
<div class="title-text-content"
|
||||
:title="selectedRowKeysRecord[0] ? selectedRowKeysRecord[0].serialNumber+' - '+selectedRowKeysRecord[0].title:''"
|
||||
:class="{'title-text-content-one':!isTrue}">
|
||||
{{selectedRowKeysRecord[0] ? selectedRowKeysRecord[0].serialNumber+' - '+selectedRowKeysRecord[0].title:''}}
|
||||
{{selectedRowKeysRecord[0] ?
|
||||
selectedRowKeysRecord[0].serialNumber+'-'+selectedRowKeysRecord[0].title:''}}
|
||||
</div>
|
||||
<div class="title-text-right" v-if="isTrue">
|
||||
<span :title="$t('standardDecompositionDocument')" @click="standardDecompositionDocumentClick">
|
||||
@@ -323,7 +325,7 @@
|
||||
this.formInline.lawsTechnologyEvaluationId = this.$route.query.lawsTechnologyEvaluationId
|
||||
this.formInline.remark = this.$route.query.remark
|
||||
this.formInline.standId = this.$route.query.standId
|
||||
this.formInline = {...this.formInline}
|
||||
this.formInline = { ...this.formInline }
|
||||
this.getListOne()
|
||||
}
|
||||
eventBUs.$on('searchQuery', search => {
|
||||
@@ -697,6 +699,9 @@
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
word-break: break-word;
|
||||
padding: 0 14px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.title-text-right {
|
||||
@@ -710,6 +715,9 @@
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
word-break: break-word;
|
||||
padding: 0 14px;
|
||||
box-sizing: border-box;
|
||||
color: #21c9cc;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
</a-table>
|
||||
<div class="page" v-if="dataList.length > 0">
|
||||
<a-pagination
|
||||
:show-total="total => $t('total')+`${total}`+$t('strip')"
|
||||
:show-total="total => $t('total')+` ${total} `+$t('strip')"
|
||||
show-quick-jumper
|
||||
show-size-changer
|
||||
:page-size.sync="pageSize"
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
size="middle"
|
||||
:loading="loading"
|
||||
:pagination="false"
|
||||
:scroll="{x: '100%',y:'calc(100vh - 130px)'}"
|
||||
:scroll="{x: '100%',y:'calc(100vh - 140px)'}"
|
||||
rowKey="id"
|
||||
:data-source="dataSource"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
@@ -203,7 +203,7 @@
|
||||
gatherResultList: [
|
||||
{
|
||||
value: 'Underway',
|
||||
name: this.$t('inProgress')
|
||||
name: this.$t('Underway')
|
||||
},
|
||||
{
|
||||
value: 'Completed',
|
||||
@@ -462,4 +462,11 @@
|
||||
color: red;
|
||||
margin-right: 4px;
|
||||
}
|
||||
::v-deep .ant-table-row:first-child {
|
||||
background: #fff!important;
|
||||
}
|
||||
|
||||
::v-deep .ant-table-body {
|
||||
background: transparent!important;
|
||||
}
|
||||
</style>
|
||||
@@ -191,7 +191,7 @@
|
||||
</a-table>
|
||||
<div class="page" v-if="dataSource.length > 0">
|
||||
<a-pagination
|
||||
:show-total="total => $t('total')+`${total}`+$t('strip')"
|
||||
:show-total="total => $t('total')+` ${total} `+$t('strip')"
|
||||
show-quick-jumper
|
||||
show-size-changer
|
||||
:page-size.sync="pageSize "
|
||||
|
||||
@@ -47,7 +47,8 @@
|
||||
<div class="detail-content-content" v-for="(item,index) in resultData.resList">
|
||||
<a-checkbox :value="item.id" class="detail-checkbox">
|
||||
</a-checkbox>
|
||||
<div class="detail-content-content-text">
|
||||
<div class="detail-content-content-text"
|
||||
:class="{'detail-content-content-text-color':checkboxList.join(',').includes(item.id)}">
|
||||
<div class="detail-content-content-text-left"
|
||||
:class="{'detail-content-content-text-dis':isDisplay}">
|
||||
<div class="detail-content-left">
|
||||
@@ -64,7 +65,7 @@
|
||||
</div>
|
||||
<div class="detail-content-left-button" v-html="item.itemsTextRight"></div>
|
||||
</div>
|
||||
<div class="detail-content-bottom">
|
||||
<div class="detail-content-bottom" :class="{'detail-content-bottom-color':checkboxList.join(',').includes(item.id)}">
|
||||
<div class="detail-content-bottom-left"
|
||||
:class="{'detail-content-bottom-left-text':language == 'en-us' ? true:false}"
|
||||
:title="$t('comparisonDifferenceComment')">
|
||||
@@ -89,7 +90,7 @@
|
||||
<div class="detail-content-content">
|
||||
<a-checkbox @change="fullCheckboxChange" v-model="fullCheckbox" class="detail-checkbox">
|
||||
</a-checkbox>
|
||||
<div class="detail-content-content-text">
|
||||
<div class="detail-content-content-text" :class="{'detail-content-content-text-color':fullCheckbox}">
|
||||
<div class="detail-content-content-text-left"
|
||||
:class="{'detail-content-content-text-dis':isDisplay}">
|
||||
<div class="detail-content-content-text-left-text" :title="resultData.comments">
|
||||
@@ -533,6 +534,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
.detail-content-content-text-color {
|
||||
border: 1px solid #00B3BE;
|
||||
background: rgba(0,179,190,0.0300);
|
||||
}
|
||||
|
||||
.detail-content-left {
|
||||
width: 50%;
|
||||
display: inline-block;
|
||||
@@ -571,7 +577,9 @@
|
||||
border-radius: 4px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.detail-content-bottom-color{
|
||||
background: rgba(0,179,190,0.0300);
|
||||
}
|
||||
.detail-content-bottom-left {
|
||||
width: 115px;
|
||||
font-size: 14px;
|
||||
|
||||
@@ -327,7 +327,7 @@
|
||||
if (detailRightColor && detailRightColor.length > 0) {
|
||||
detailRightColor[0].classList.remove('detail-content-content-right-data-color-right')
|
||||
}
|
||||
if (item.targetStand && item.targetStand >= 0) {
|
||||
if (item.targetStand > -1) {
|
||||
let detailContent = document.getElementsByClassName('detail-content-content-right-right-top')
|
||||
let detailRight = document.getElementsByClassName('detail-content-content-right-data-right')
|
||||
this.dataRight = this.resultData.textRight[item.targetStand]
|
||||
@@ -357,7 +357,7 @@
|
||||
if (detailLeftColor && detailLeftColor.length > 0) {
|
||||
detailLeftColor[0].classList.remove('detail-content-content-right-data-color')
|
||||
}
|
||||
if (item.targetStand && item.targetStand >= 0) {
|
||||
if (item.targetStand > -1) {
|
||||
this.dataLeft = this.resultData.textLeft[item.targetStand]
|
||||
let detailContent = document.getElementsByClassName('detail-content-content-right-top')
|
||||
let detailLeft = document.getElementsByClassName('detail-content-content-right-data')
|
||||
|
||||
@@ -355,7 +355,7 @@
|
||||
},
|
||||
initiatingProcessClick() {
|
||||
this.$router.push({
|
||||
path:'/initiateDocumentComparison'
|
||||
path: '/initiateDocumentComparison'
|
||||
})
|
||||
// let newUrl = this.$router.resolve({
|
||||
// path: '/initiateDocumentComparison'
|
||||
@@ -489,4 +489,12 @@
|
||||
color: red;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
::v-deep .ant-table-row:first-child {
|
||||
background: #fff!important;
|
||||
}
|
||||
|
||||
::v-deep .ant-table-body {
|
||||
background: transparent!important;
|
||||
}
|
||||
</style>
|
||||
@@ -51,7 +51,7 @@
|
||||
</a-table>
|
||||
<div class="page" v-if="dataList.length > 0">
|
||||
<a-pagination
|
||||
:show-total="total => $t('total')+`${total}`+$t('strip')"
|
||||
:show-total="total => $t('total')+` ${total} `+$t('strip')"
|
||||
show-quick-jumper
|
||||
show-size-changer
|
||||
:page-size.sync="pageSize"
|
||||
@@ -382,4 +382,11 @@
|
||||
.Required-One {
|
||||
color: red;
|
||||
}
|
||||
::v-deep .ant-table-row:first-child {
|
||||
background: #fff!important;
|
||||
}
|
||||
|
||||
::v-deep .ant-table-body {
|
||||
background: transparent!important;
|
||||
}
|
||||
</style>
|
||||
@@ -65,7 +65,7 @@
|
||||
</a-table>
|
||||
<div class="page" v-if="dataList.length > 0">
|
||||
<a-pagination
|
||||
:show-total="total => $t('total')+`${total}`+$t('strip')"
|
||||
:show-total="total => $t('total')+` ${total} `+$t('strip')"
|
||||
show-quick-jumper
|
||||
show-size-changer
|
||||
:page-size.sync="pageSize"
|
||||
|
||||