Merge branch 'master' into SecondStage
This commit is contained in:
File diff suppressed because one or more lines are too long
+64
-5
@@ -277,11 +277,6 @@ CREATE INDEX lds_idx_standard_id ON laws_document_split (standard_id);
|
|||||||
-- 2024-09-03 修改标签管理条款在高级检索中搜索条件与导出全部数据
|
-- 2024-09-03 修改标签管理条款在高级检索中搜索条件与导出全部数据
|
||||||
update laws_tag set is_show_search = 1 where table_name = 'laws_document_split';
|
update laws_tag set is_show_search = 1 where table_name = 'laws_document_split';
|
||||||
|
|
||||||
-- 2024-09-04 修改外部标准实施日期为多选日期
|
|
||||||
# UPDATE laws_tag SET `db_length` = 200,`field_show_type` = '4' WHERE `id` = '1695991006579912706';
|
|
||||||
# ALTER TABLE `laws_domestic_standard`
|
|
||||||
# MODIFY COLUMN `implementation_date` varchar(200) NULL DEFAULT NULL COMMENT '实施日期';
|
|
||||||
|
|
||||||
-- 2024-09-04 条款添加标题译文
|
-- 2024-09-04 条款添加标题译文
|
||||||
ALTER TABLE laws_document_split ADD title_translation longtext NULL DEFAULT NULL COMMENT '标题译文';
|
ALTER TABLE laws_document_split ADD title_translation longtext NULL DEFAULT NULL COMMENT '标题译文';
|
||||||
INSERT INTO `laws_tag`(`id`, `table_name`, `db_field_name`, `db_field_en_name`, `db_field_txt`, `order_num`, `db_field_name_old`, `db_is_key`, `db_is_null`, `db_type`, `db_length`, `db_point_length`, `db_default_val`, `dict_field`, `dict_table`, `dict_text`, `field_show_type`, `field_href`, `field_length`, `field_valid_type`, `field_must_input`, `field_extend_json`, `field_default_value`, `is_show_form_create`, `is_query`, `is_show_form`, `is_show_list`, `is_read_only`, `query_mode`, `main_table`, `main_field`, `update_by`, `update_time`, `create_time`, `create_by`, `converter`, `query_def_val`, `query_dict_text`, `query_dict_field`, `query_dict_table`, `query_show_type`, `query_config_flag`, `query_valid_type`, `query_must_input`, `sort_flag`, `show_area`, `is_show_laws_list`, `is_show_search`, `del_flag`, `is_model`, `dict_id`, `home_search_context_order`, `home_search_file_order`, `dict_field_search`, `dict_table_search`, `dict_text_search`, `usable_range`, `tree_first_href`, `import_sort`) VALUES ('1701142687771348923', 'laws_document_split', 'title_translation', 'Title Translation', '标题译文', 3, 'title_translation', 0, 1, 'String', 500, NULL, NULL, NULL, NULL, NULL, '9', NULL, NULL, NULL, '0', NULL, NULL, 1, 1, 1, 1, 1, NULL, NULL, NULL, 'admin', '2023-10-30 13:36:07', '2023-09-11 15:56:37', 'admin', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, 0, '4', NULL, NULL, NULL, NULL, NULL, NULL, '1,3', NULL, 2);
|
INSERT INTO `laws_tag`(`id`, `table_name`, `db_field_name`, `db_field_en_name`, `db_field_txt`, `order_num`, `db_field_name_old`, `db_is_key`, `db_is_null`, `db_type`, `db_length`, `db_point_length`, `db_default_val`, `dict_field`, `dict_table`, `dict_text`, `field_show_type`, `field_href`, `field_length`, `field_valid_type`, `field_must_input`, `field_extend_json`, `field_default_value`, `is_show_form_create`, `is_query`, `is_show_form`, `is_show_list`, `is_read_only`, `query_mode`, `main_table`, `main_field`, `update_by`, `update_time`, `create_time`, `create_by`, `converter`, `query_def_val`, `query_dict_text`, `query_dict_field`, `query_dict_table`, `query_show_type`, `query_config_flag`, `query_valid_type`, `query_must_input`, `sort_flag`, `show_area`, `is_show_laws_list`, `is_show_search`, `del_flag`, `is_model`, `dict_id`, `home_search_context_order`, `home_search_file_order`, `dict_field_search`, `dict_table_search`, `dict_text_search`, `usable_range`, `tree_first_href`, `import_sort`) VALUES ('1701142687771348923', 'laws_document_split', 'title_translation', 'Title Translation', '标题译文', 3, 'title_translation', 0, 1, 'String', 500, NULL, NULL, NULL, NULL, NULL, '9', NULL, NULL, NULL, '0', NULL, NULL, 1, 1, 1, 1, 1, NULL, NULL, NULL, 'admin', '2023-10-30 13:36:07', '2023-09-11 15:56:37', 'admin', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, 0, '4', NULL, NULL, NULL, NULL, NULL, NULL, '1,3', NULL, 2);
|
||||||
@@ -336,3 +331,67 @@ update process_node set node_name = '部门接口人分发' where node_name = '
|
|||||||
UPDATE `sys_permission` SET `name` = '市场法规清单发布流程' WHERE `id` = '897f89d790485b5c0190485b5c110000';
|
UPDATE `sys_permission` SET `name` = '市场法规清单发布流程' WHERE `id` = '897f89d790485b5c0190485b5c110000';
|
||||||
UPDATE `sys_permission` SET `name` = '市场法规清单发布流程' WHERE `id` = '897f89d790485b5c0190485ca6e10001';
|
UPDATE `sys_permission` SET `name` = '市场法规清单发布流程' WHERE `id` = '897f89d790485b5c0190485ca6e10001';
|
||||||
UPDATE `sys_dict_item` SET `item_text` = '市场法规清单发布流程' WHERE `id` = '1808773975469953026';
|
UPDATE `sys_dict_item` SET `item_text` = '市场法规清单发布流程' WHERE `id` = '1808773975469953026';
|
||||||
|
|
||||||
|
-- 2024-09-11 修改外部标准实施日期为多选日期
|
||||||
|
UPDATE laws_tag SET `db_length` = 200,`field_show_type` = '4' WHERE `id` = '1695991006579912706';
|
||||||
|
ALTER TABLE `laws_domestic_standard`
|
||||||
|
MODIFY COLUMN `implementation_date` varchar(200) NULL DEFAULT NULL COMMENT '实施日期';
|
||||||
|
|
||||||
|
-- 2024-09-11 外来标准
|
||||||
|
ALTER TABLE `laws_domestic_standard`
|
||||||
|
MODIFY COLUMN `applicable_market` longtext NULL DEFAULT NULL COMMENT '适用市场';
|
||||||
|
|
||||||
|
-- 2024-09-12 修改主控部门字段长度
|
||||||
|
ALTER TABLE `laws_market_standard_detail`
|
||||||
|
MODIFY COLUMN `main_dept` longtext NULL DEFAULT NULL COMMENT '主控部门';
|
||||||
|
ALTER TABLE `laws_domestic_standard`
|
||||||
|
MODIFY COLUMN `main_dept` longtext NULL DEFAULT NULL COMMENT '主控部门';
|
||||||
|
UPDATE `laws_tag` SET `field_show_type` = '7' WHERE `id` = '1800826537491943426';
|
||||||
|
|
||||||
|
-- 2024-09-12 市场法规清单发布流程添加附件
|
||||||
|
ALTER TABLE `process_market_standard_release`
|
||||||
|
ADD COLUMN `file` varchar(2000) NULL DEFAULT NULL COMMENT '附件';
|
||||||
|
|
||||||
|
|
||||||
|
-- 2024-09-13 增加辅助说明材料字段
|
||||||
|
ALTER TABLE `process_standard_compliance_check_detail`
|
||||||
|
ADD COLUMN `unsatisfied_require_attach` varchar(500) NULL COMMENT '辅助说明材料' AFTER `assessor`;
|
||||||
|
-- 2024-09-13 增加辅助说明材料字段
|
||||||
|
ALTER TABLE `laws_evaluation_not_met_library`
|
||||||
|
ADD COLUMN `unsatisfied_require_attach` varchar(500) NULL COMMENT '辅助说明材料';
|
||||||
|
-- 2024-09-13 增加辅助说明材料字段
|
||||||
|
ALTER TABLE `laws_conformity_assessment_library_detail`
|
||||||
|
ADD COLUMN `unsatisfied_require_attach` varchar(500) NULL COMMENT '辅助说明材料';
|
||||||
|
|
||||||
|
-- 2024-09-13 增加评估发起人
|
||||||
|
ALTER TABLE `laws_conformity_assessment_library_detail`
|
||||||
|
ADD COLUMN `assessor_initiator` varchar(500) NULL COMMENT '评估发起人' AFTER `bind_id`;
|
||||||
|
|
||||||
|
-- 2024年9月13日15:38:30 拆分目录表字段长度和标签库改为一致
|
||||||
|
ALTER TABLE `sar_file_split_menu`
|
||||||
|
MODIFY COLUMN `item_name` varchar(500) NULL COMMENT '条款名称';
|
||||||
|
ALTER TABLE `sar_file_split_info`
|
||||||
|
MODIFY COLUMN `title` varchar(500) NULL COMMENT '标题-条款名称';
|
||||||
|
|
||||||
|
-- 2024-09-13 不符合项增加关闭人、关闭时间
|
||||||
|
ALTER TABLE `laws_evaluation_not_met_library`
|
||||||
|
ADD COLUMN `close_user` varchar(50) NULL COMMENT '关闭人' AFTER `all_approval_user`,
|
||||||
|
ADD COLUMN `close_time` datetime NULL COMMENT '关闭时间' AFTER `close_user`;
|
||||||
|
|
||||||
|
|
||||||
|
-- 2024-09-14 IAM同步的时候 修改部门ID的长度为 64
|
||||||
|
ALTER TABLE sys_depart MODIFY COLUMN `id` varchar(64) NOT NULL COMMENT 'ID';
|
||||||
|
ALTER TABLE sys_depart MODIFY COLUMN `parent_id` varchar(64) NULL COMMENT '父机构ID';
|
||||||
|
ALTER TABLE laws_club_join_team MODIFY COLUMN `depart_id` varchar(64) NULL COMMENT '部门id';
|
||||||
|
ALTER TABLE laws_club_meeting MODIFY COLUMN `notify_depart_id` varchar(64) NULL COMMENT '通知部门id';
|
||||||
|
ALTER TABLE laws_club_research_information MODIFY COLUMN `feedback_depart` varchar(64) NULL COMMENT '反馈部门';
|
||||||
|
ALTER TABLE laws_conformity_assessment_library_detail MODIFY COLUMN `auth_dept` varchar(64) NULL COMMENT '反馈部门';
|
||||||
|
ALTER TABLE laws_enterprise_standard_inspect_content MODIFY COLUMN `rectification_department` varchar(64) NULL COMMENT '整改部门';
|
||||||
|
ALTER TABLE laws_evaluation_not_met_library MODIFY COLUMN `auth_dept` varchar(64) NULL COMMENT '责任部门';
|
||||||
|
ALTER TABLE laws_solicitation_clause MODIFY COLUMN `department` varchar(64) NULL COMMENT '提出部门';
|
||||||
|
ALTER TABLE process_es_recheck MODIFY COLUMN `main_drafting_unit` varchar(64) NULL COMMENT '起草部门';
|
||||||
|
ALTER TABLE sys_depart_permission MODIFY COLUMN `depart_id` varchar(64) NULL COMMENT '部门id';
|
||||||
|
ALTER TABLE sys_user_agent MODIFY COLUMN `sys_org_code` varchar(64) NULL COMMENT '所属部门';
|
||||||
|
|
||||||
|
-- 2024-09-14 IAM同步的时候 用户管理-人员类型修改长度为 64
|
||||||
|
ALTER TABLE sys_user MODIFY COLUMN `type_id` varchar(64) NULL COMMENT '人员类型,000正式员工、002外部用户、001劳务工等';
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
<module>jero-system-local-api</module>
|
<module>jero-system-local-api</module>
|
||||||
<!-- <module>jero-system-cloud-api</module>-->
|
<module>jero-system-cloud-api</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|||||||
+2
-1
@@ -187,7 +187,8 @@ public class SysAnnouncementSendController {
|
|||||||
LambdaUpdateWrapper<SysAnnouncementSend> updateWrapper = new LambdaUpdateWrapper<>();
|
LambdaUpdateWrapper<SysAnnouncementSend> updateWrapper = new LambdaUpdateWrapper<>();
|
||||||
updateWrapper.set(SysAnnouncementSend::getReadFlag, CommonConstant.HAS_READ_FLAG);
|
updateWrapper.set(SysAnnouncementSend::getReadFlag, CommonConstant.HAS_READ_FLAG);
|
||||||
updateWrapper.set(SysAnnouncementSend::getReadTime, new Date());
|
updateWrapper.set(SysAnnouncementSend::getReadTime, new Date());
|
||||||
updateWrapper.last("where annt_id ='"+anntId+"' and user_id ='"+userId+"'");
|
updateWrapper.eq(SysAnnouncementSend::getAnntId,anntId);
|
||||||
|
updateWrapper.eq(SysAnnouncementSend::getUserId,userId);
|
||||||
SysAnnouncementSend announcementSend = new SysAnnouncementSend();
|
SysAnnouncementSend announcementSend = new SysAnnouncementSend();
|
||||||
sysAnnouncementSendService.update(announcementSend, updateWrapper);
|
sysAnnouncementSendService.update(announcementSend, updateWrapper);
|
||||||
result.setSuccess(true);
|
result.setSuccess(true);
|
||||||
|
|||||||
+28
-6
@@ -135,7 +135,9 @@ public class SysDictItemController {
|
|||||||
if(!CollectionUtils.isEmpty(listSub)){
|
if(!CollectionUtils.isEmpty(listSub)){
|
||||||
sysDictItem.setChildren(listSub);
|
sysDictItem.setChildren(listSub);
|
||||||
}
|
}
|
||||||
listAll.add(sysDictItem);
|
if(!listAll.contains(sysDictItem)){
|
||||||
|
listAll.add(sysDictItem);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return listAll;
|
return listAll;
|
||||||
@@ -221,7 +223,7 @@ public class SysDictItemController {
|
|||||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize) {
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize) {
|
||||||
QueryWrapper<SysDictItem> queryWrapper = QueryGenerator.initQueryWrapper(sysDictItem, req.getParameterMap());
|
QueryWrapper<SysDictItem> queryWrapper = QueryGenerator.initQueryWrapper(sysDictItem, req.getParameterMap());
|
||||||
queryWrapper.select("del_flag","description","dict_id","en_name","id","is_read_only","is_tag_dict","item_text",
|
queryWrapper.select("del_flag","description","dict_id","en_name","id","is_read_only","is_tag_dict","item_text",
|
||||||
"item_value","item_text as name","parent_id as pId","parent_id","sort_order","status");
|
"item_value","item_text as name","parent_id as pId","parent_id","sort_order","status","en_base");
|
||||||
List<SysDictItem> listSysDictItem = sysDictItemService.list(queryWrapper);
|
List<SysDictItem> listSysDictItem = sysDictItemService.list(queryWrapper);
|
||||||
List<SysDictItem> listAll = new ArrayList<>();
|
List<SysDictItem> listAll = new ArrayList<>();
|
||||||
// 树形查询手动封装分页
|
// 树形查询手动封装分页
|
||||||
@@ -232,11 +234,25 @@ public class SysDictItemController {
|
|||||||
listSelectAll.add(dictItem);
|
listSelectAll.add(dictItem);
|
||||||
List<SysDictItem> sub = getParentData(dictItem.getParentId());
|
List<SysDictItem> sub = getParentData(dictItem.getParentId());
|
||||||
if(!CollectionUtils.isEmpty(sub)){
|
if(!CollectionUtils.isEmpty(sub)){
|
||||||
listSelectAll.addAll(sub);
|
for (SysDictItem item : sub) {
|
||||||
|
if(!listSelectAll.contains(item)){
|
||||||
|
listSelectAll.add(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
listSysDictItem = new ArrayList<>();
|
||||||
if(!CollectionUtils.isEmpty(listSelectAll)){
|
if(!CollectionUtils.isEmpty(listSelectAll)){
|
||||||
listSysDictItem = listSelectAll.stream().distinct().collect(Collectors.toList());
|
for (SysDictItem dictItem : listSelectAll) {
|
||||||
|
if(!CollectionUtils.isEmpty(listSysDictItem)){
|
||||||
|
long l = listSysDictItem.stream().filter(o->Objects.equals(o.getId(),dictItem.getId())).count();
|
||||||
|
if(l == 0){
|
||||||
|
listSysDictItem.add(dictItem);
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
listSysDictItem.add(dictItem);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
List<SysDictItem> listSysDictItemParent = listSysDictItem.stream().filter(o->Objects.equals(o.getParentId(),"0")).collect(Collectors.toList());
|
List<SysDictItem> listSysDictItemParent = listSysDictItem.stream().filter(o->Objects.equals(o.getParentId(),"0")).collect(Collectors.toList());
|
||||||
@@ -245,7 +261,9 @@ public class SysDictItemController {
|
|||||||
if(!CollectionUtils.isEmpty(listRes)){
|
if(!CollectionUtils.isEmpty(listRes)){
|
||||||
dictItem.setChildren(listRes);
|
dictItem.setChildren(listRes);
|
||||||
}
|
}
|
||||||
listAll.add(dictItem);
|
if(!listAll.contains(dictItem)){
|
||||||
|
listAll.add(dictItem);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -264,7 +282,11 @@ public class SysDictItemController {
|
|||||||
&& !Objects.equals(dictItemChildren.getParentId(),"0")){
|
&& !Objects.equals(dictItemChildren.getParentId(),"0")){
|
||||||
List<SysDictItem> sub = getParentData(dictItemChildren.getParentId());
|
List<SysDictItem> sub = getParentData(dictItemChildren.getParentId());
|
||||||
if(!CollectionUtils.isEmpty(sub)){
|
if(!CollectionUtils.isEmpty(sub)){
|
||||||
listSelectAll.addAll(sub);
|
for (SysDictItem item : sub) {
|
||||||
|
if(!listSelectAll.contains(item)){
|
||||||
|
listSelectAll.add(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
@@ -786,6 +786,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
|||||||
lambdaUpdateWrapper.set(SysUser::getUpdateTime,user.getUpdateTime());
|
lambdaUpdateWrapper.set(SysUser::getUpdateTime,user.getUpdateTime());
|
||||||
lambdaUpdateWrapper.set(SysUser::getUpdateBy,user.getUpdateBy());
|
lambdaUpdateWrapper.set(SysUser::getUpdateBy,user.getUpdateBy());
|
||||||
lambdaUpdateWrapper.set(SysUser::getBirthday,user.getBirthday());
|
lambdaUpdateWrapper.set(SysUser::getBirthday,user.getBirthday());
|
||||||
|
lambdaUpdateWrapper.set(SysUser::getStatus,user.getStatus());
|
||||||
lambdaUpdateWrapper.set(SysUser::getEntryTime,user.getEntryTime());
|
lambdaUpdateWrapper.set(SysUser::getEntryTime,user.getEntryTime());
|
||||||
lambdaUpdateWrapper.set(SysUser::getResignationTime,user.getResignationTime());
|
lambdaUpdateWrapper.set(SysUser::getResignationTime,user.getResignationTime());
|
||||||
lambdaUpdateWrapper.set(SysUser::getFeishuId,user.getFeishuId());
|
lambdaUpdateWrapper.set(SysUser::getFeishuId,user.getFeishuId());
|
||||||
|
|||||||
+15
-3
@@ -253,9 +253,21 @@ public class SyncIamService {
|
|||||||
// 获取角色(多个逗号分隔),针对大部分角用户默认写死一般用户
|
// 获取角色(多个逗号分隔),针对大部分角用户默认写死一般用户
|
||||||
// (TODO 需要根据实际情况再沟通一遍角色怎么自动赋予),需要和角色接口那边沟通,确认具体情况
|
// (TODO 需要根据实际情况再沟通一遍角色怎么自动赋予),需要和角色接口那边沟通,确认具体情况
|
||||||
String selectedRoles = defaultRoleIds; // 一般用户的角色ID
|
String selectedRoles = defaultRoleIds; // 一般用户的角色ID
|
||||||
// 存储到用户表中
|
LambdaQueryWrapper<SysUser> querySysUser = new LambdaQueryWrapper<>();
|
||||||
this.sysUserService.saveUser(sysUser, selectedRoles, selectedDeparts);
|
querySysUser.eq(SysUser::getUsername,sysUser.getUsername());
|
||||||
iamUserCreateResponse.setUid(sysUser.getId());
|
querySysUser.eq(SysUser::getStatus,"2");
|
||||||
|
SysUser oldSysUser = sysUserService.getOne(querySysUser,false);
|
||||||
|
if(!Objects.isNull(oldSysUser)){
|
||||||
|
// 编辑用户
|
||||||
|
sysUser.setId(oldSysUser.getId());
|
||||||
|
sysUser.setStatus(1);
|
||||||
|
this.sysUserService.editUser(sysUser, null, selectedDeparts);
|
||||||
|
iamUserCreateResponse.setUid(oldSysUser.getId());
|
||||||
|
}else{
|
||||||
|
// 存储到用户表中
|
||||||
|
this.sysUserService.saveUser(sysUser, selectedRoles, selectedDeparts);
|
||||||
|
iamUserCreateResponse.setUid(sysUser.getId());
|
||||||
|
}
|
||||||
return iamUserCreateResponse;
|
return iamUserCreateResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+5
@@ -88,6 +88,11 @@ public class ProcessMarketStandardRelease implements Serializable {
|
|||||||
@ApiModelProperty(value = "清单说明")
|
@ApiModelProperty(value = "清单说明")
|
||||||
private String manifestDesc;
|
private String manifestDesc;
|
||||||
|
|
||||||
|
|
||||||
|
/**附件*/
|
||||||
|
@ApiModelProperty(value = "附件")
|
||||||
|
private String file;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 标准详情列表
|
* 标准详情列表
|
||||||
*/
|
*/
|
||||||
|
|||||||
+61
-15
@@ -6,7 +6,9 @@ import com.jero.common.aspect.annotation.AutoLog;
|
|||||||
import com.jero.common.aspect.annotation.DictPoint;
|
import com.jero.common.aspect.annotation.DictPoint;
|
||||||
import com.jero.common.aspect.annotation.Translation;
|
import com.jero.common.aspect.annotation.Translation;
|
||||||
import com.jero.common.constant.enums.YesOrNoEnum;
|
import com.jero.common.constant.enums.YesOrNoEnum;
|
||||||
|
import com.jero.common.system.api.ISysBaseAPI;
|
||||||
import com.jero.common.system.base.controller.JeroController;
|
import com.jero.common.system.base.controller.JeroController;
|
||||||
|
import com.jero.common.system.vo.DictModel;
|
||||||
import com.jero.common.util.MessageUtils;
|
import com.jero.common.util.MessageUtils;
|
||||||
import com.jero.modules.activiti.enums.ProcessTypeEnum;
|
import com.jero.modules.activiti.enums.ProcessTypeEnum;
|
||||||
import com.jero.modules.activiti.process.common.entity.ProcessDraft;
|
import com.jero.modules.activiti.process.common.entity.ProcessDraft;
|
||||||
@@ -14,6 +16,7 @@ import com.jero.modules.activiti.process.common.service.ActFlowCommonService;
|
|||||||
import com.jero.modules.activiti.process.fb.vo.ProcessInfoVO;
|
import com.jero.modules.activiti.process.fb.vo.ProcessInfoVO;
|
||||||
import com.jero.modules.activiti.process.standardComplianceCheck.entity.ProcessStandardComplianceCheck;
|
import com.jero.modules.activiti.process.standardComplianceCheck.entity.ProcessStandardComplianceCheck;
|
||||||
import com.jero.modules.activiti.process.standardComplianceCheck.entity.ProcessStandardComplianceCheckDetail;
|
import com.jero.modules.activiti.process.standardComplianceCheck.entity.ProcessStandardComplianceCheckDetail;
|
||||||
|
import com.jero.modules.activiti.process.standardComplianceCheck.entity.vo.DictExcelVO;
|
||||||
import com.jero.modules.activiti.process.standardComplianceCheck.entity.vo.ModelExcelVO;
|
import com.jero.modules.activiti.process.standardComplianceCheck.entity.vo.ModelExcelVO;
|
||||||
import com.jero.modules.activiti.process.standardComplianceCheck.entity.vo.ProcessSccVO;
|
import com.jero.modules.activiti.process.standardComplianceCheck.entity.vo.ProcessSccVO;
|
||||||
import com.jero.modules.activiti.process.standardComplianceCheck.entity.vo.SplitExcelVO;
|
import com.jero.modules.activiti.process.standardComplianceCheck.entity.vo.SplitExcelVO;
|
||||||
@@ -25,6 +28,8 @@ import io.swagger.annotations.ApiParam;
|
|||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.poi.ss.formula.functions.T;
|
import org.apache.poi.ss.formula.functions.T;
|
||||||
|
import org.apache.poi.ss.usermodel.Workbook;
|
||||||
|
import org.jeecgframework.poi.excel.ExcelExportUtil;
|
||||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||||
import org.jeecgframework.poi.excel.entity.enmus.ExcelType;
|
import org.jeecgframework.poi.excel.entity.enmus.ExcelType;
|
||||||
@@ -37,10 +42,11 @@ import javax.annotation.Resource;
|
|||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.io.OutputStream;
|
||||||
import java.util.Arrays;
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.util.List;
|
import java.net.URLEncoder;
|
||||||
import java.util.Map;
|
import java.nio.charset.StandardCharsets;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 流程-测试流程(process_demo)表控制层
|
* 流程-测试流程(process_demo)表控制层
|
||||||
@@ -60,6 +66,9 @@ public class ProcessStandardComplianceCheckController extends JeroController<Pro
|
|||||||
@Resource
|
@Resource
|
||||||
private ActFlowCommonService actFlowCommonService;
|
private ActFlowCommonService actFlowCommonService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ISysBaseAPI sysBaseAPI;
|
||||||
|
|
||||||
@AutoLog(value = "法规符合性排查流程-发起流程")
|
@AutoLog(value = "法规符合性排查流程-发起流程")
|
||||||
@ApiOperation(value = "法规符合性排查流程-发起流程", notes = "法规符合性排查流程-发起流程")
|
@ApiOperation(value = "法规符合性排查流程-发起流程", notes = "法规符合性排查流程-发起流程")
|
||||||
@PostMapping(value = "/start")
|
@PostMapping(value = "/start")
|
||||||
@@ -141,19 +150,56 @@ public class ProcessStandardComplianceCheckController extends JeroController<Pro
|
|||||||
@GetMapping("/modelTemplateDownload")
|
@GetMapping("/modelTemplateDownload")
|
||||||
@ApiOperation(value = "法规符合性排查流程-车型导入模板下载", notes = "法规符合性排查流程-车型导入模板下载")
|
@ApiOperation(value = "法规符合性排查流程-车型导入模板下载", notes = "法规符合性排查流程-车型导入模板下载")
|
||||||
@AutoLog(value = "法规符合性排查流程-车型导入模板下载")
|
@AutoLog(value = "法规符合性排查流程-车型导入模板下载")
|
||||||
public ModelAndView modelTemplateDownload() {
|
public void modelTemplateDownload(HttpServletResponse response) {
|
||||||
// AutoPoi 导出Excel
|
// AutoPoi 导出Excel
|
||||||
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
|
|
||||||
String title = "车型批量导入模板";
|
String title = "车型批量导入模板";
|
||||||
//此处设置的filename无效 ,前端会重更新设置一下
|
|
||||||
mv.addObject(FILE_NAME);
|
List<Map<String, Object>> list = new ArrayList<>();
|
||||||
mv.addObject(CLASS, ModelExcelVO.class);
|
Map<String, Object> map = new HashMap<>();
|
||||||
ExportParams exportParams = new ExportParams(null, title);
|
map.put("title",new ExportParams(null, title));
|
||||||
// 导出xls
|
map.put(CLASS,ModelExcelVO.class);
|
||||||
exportParams.setType(ExcelType.HSSF);
|
map.put(NormalExcelConstants.DATA_LIST,new ArrayList<>());
|
||||||
mv.addObject(PARAMS, exportParams);
|
list.add(map);
|
||||||
mv.addObject(NormalExcelConstants.DATA_LIST, new ArrayList<T>());
|
Map<String, Object> map1 = new HashMap<>();
|
||||||
return mv;
|
map1.put("title",new ExportParams(null, "车型状态"));
|
||||||
|
map1.put(CLASS, DictExcelVO.class);
|
||||||
|
List<DictModel> dictItems = sysBaseAPI.getDictItems("model_status");
|
||||||
|
ArrayList<DictExcelVO> dictExcelVOS = new ArrayList<>();
|
||||||
|
for (DictModel dictItem : dictItems) {
|
||||||
|
DictExcelVO dictExcelVO = new DictExcelVO();
|
||||||
|
dictExcelVO.setModelState(dictItem.getText());
|
||||||
|
dictExcelVOS.add(dictExcelVO);
|
||||||
|
}
|
||||||
|
map1.put(NormalExcelConstants.DATA_LIST,dictExcelVOS);
|
||||||
|
list.add(map1);
|
||||||
|
ExcelType type = ExcelType.HSSF;
|
||||||
|
Workbook workbook = ExcelExportUtil.exportExcel(list, type);
|
||||||
|
// 设置HTTP响应头
|
||||||
|
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
|
||||||
|
response.setCharacterEncoding("UTF-8"); // 这行确保响应流使用UTF-8编码
|
||||||
|
|
||||||
|
// 处理文件名乱码问题
|
||||||
|
String encodedFileName = null;
|
||||||
|
try {
|
||||||
|
encodedFileName = URLEncoder.encode("车型批量导入模板", StandardCharsets.UTF_8.name()).replace("+", "%20");
|
||||||
|
} catch (UnsupportedEncodingException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
response.setHeader("Content-Disposition", "attachment; filename*=UTF-8''" + encodedFileName + ".xlsx");
|
||||||
|
|
||||||
|
// 获取响应输出流并写入Excel
|
||||||
|
try (OutputStream out = response.getOutputStream()) {
|
||||||
|
workbook.write(out);
|
||||||
|
out.flush();
|
||||||
|
} catch (IOException e) {
|
||||||
|
log.error("导出Excel失败", e);
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
workbook.close();
|
||||||
|
} catch (IOException e) {
|
||||||
|
log.error("导出Excel失败", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+1
-1
@@ -118,7 +118,7 @@ public class ProcessStandardComplianceCheck implements Serializable {
|
|||||||
* 适用市场
|
* 适用市场
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "适用市场")
|
@ApiModelProperty(value = "适用市场")
|
||||||
@Dict(dictTable = "laws_market_standard", dicText = "manifest_name", dicCode = "id")
|
@Dict(dicCode = "market_state")
|
||||||
private String applicableMarket;
|
private String applicableMarket;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+20
-1
@@ -222,6 +222,13 @@ public class ProcessStandardComplianceCheckDetail implements Serializable, Compa
|
|||||||
@ApiModelProperty(value = "分发批次唯一Id")
|
@ApiModelProperty(value = "分发批次唯一Id")
|
||||||
private String batchId;
|
private String batchId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 辅助说明材料
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "辅助说明材料")
|
||||||
|
@Dict(dictTable = "oss_file", dicCode = "id", dicText = "file_name")
|
||||||
|
private String unsatisfiedRequireAttach;
|
||||||
|
|
||||||
@ApiModelProperty(value = "是否与上一版相同(字典:1:是,0:否)")
|
@ApiModelProperty(value = "是否与上一版相同(字典:1:是,0:否)")
|
||||||
@Dict(dicCode = "yn")
|
@Dict(dicCode = "yn")
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
@@ -233,12 +240,24 @@ public class ProcessStandardComplianceCheckDetail implements Serializable, Compa
|
|||||||
@ApiModelProperty(value = "佐证材料")
|
@ApiModelProperty(value = "佐证材料")
|
||||||
@ExcelCollection(name = "", orderNum = "16")
|
@ExcelCollection(name = "", orderNum = "16")
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private List<ExcelExportUtilPro.FileDetails> fileList = Collections.emptyList();
|
private List<ExcelExportUtilPro.MaterialFile> fileList = Collections.emptyList();
|
||||||
|
|
||||||
public List<String> obtainFileIds() {
|
public List<String> obtainFileIds() {
|
||||||
return material != null ? Arrays.asList(material.split(",")) : Collections.emptyList();
|
return material != null ? Arrays.asList(material.split(",")) : Collections.emptyList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 附件
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "辅助说明材料")
|
||||||
|
@ExcelCollection(name = "", orderNum = "17")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private List<ExcelExportUtilPro.UnsatisfiedRequireAttachFile> fileListTwo = Collections.emptyList();
|
||||||
|
|
||||||
|
public List<String> obtainFileTwoIds() {
|
||||||
|
return unsatisfiedRequireAttach != null ? Arrays.asList(unsatisfiedRequireAttach.split(",")) : Collections.emptyList();
|
||||||
|
}
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|||||||
+17
@@ -0,0 +1,17 @@
|
|||||||
|
package com.jero.modules.activiti.process.standardComplianceCheck.entity.vo;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.jero.common.aspect.annotation.Dict;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class DictExcelVO {
|
||||||
|
|
||||||
|
@Excel(name = "车型状态")
|
||||||
|
private String modelState;
|
||||||
|
|
||||||
|
}
|
||||||
+8
-12
@@ -119,14 +119,6 @@ public class WithoutDistributeExcelTemplate {
|
|||||||
@Excel(name = "备注", width = 15, orderNum = "13")
|
@Excel(name = "备注", width = 15, orderNum = "13")
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
/**
|
|
||||||
* 附件
|
|
||||||
*/
|
|
||||||
// @ApiModelProperty(value = "佐证材料")
|
|
||||||
// @ExcelCollection(name = "", orderNum = "14")
|
|
||||||
// @TableField(exist = false)
|
|
||||||
// private List<ExcelExportUtilPro.FileDetails> fileList = Collections.emptyList();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 佐证材料
|
* 佐证材料
|
||||||
*/
|
*/
|
||||||
@@ -135,11 +127,15 @@ public class WithoutDistributeExcelTemplate {
|
|||||||
@Dict(dictTable = "oss_file", dicCode = "id", dicText = "file_name")
|
@Dict(dictTable = "oss_file", dicCode = "id", dicText = "file_name")
|
||||||
private String material;
|
private String material;
|
||||||
|
|
||||||
private String sort;
|
/**
|
||||||
|
* 佐证材料
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "辅助说明材料")
|
||||||
|
@Excel(name = "辅助说明材料", width = 15, orderNum = "14")
|
||||||
|
@Dict(dictTable = "oss_file", dicCode = "id", dicText = "file_name")
|
||||||
|
private String unsatisfiedRequireAttach;
|
||||||
|
|
||||||
// public List<String> obtainFileIds() {
|
private String sort;
|
||||||
// return material != null ? Arrays.asList(material.split(",")) : Collections.emptyList();
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+6
@@ -7,6 +7,7 @@ import com.jero.modules.activiti.process.standardComplianceCheck.entity.ProcessS
|
|||||||
import com.jero.modules.activiti.process.standardComplianceCheck.entity.ProcessStandardComplianceCheckDetail;
|
import com.jero.modules.activiti.process.standardComplianceCheck.entity.ProcessStandardComplianceCheckDetail;
|
||||||
import com.jero.modules.activiti.process.standardComplianceCheck.service.IProcessStandardComplianceCheckDetailService;
|
import com.jero.modules.activiti.process.standardComplianceCheck.service.IProcessStandardComplianceCheckDetailService;
|
||||||
import com.jero.modules.activiti.process.standardComplianceCheck.service.IProcessStandardComplianceCheckService;
|
import com.jero.modules.activiti.process.standardComplianceCheck.service.IProcessStandardComplianceCheckService;
|
||||||
|
import com.jero.modules.activiti.service.ProcessAllService;
|
||||||
import com.jero.modules.activiti.service.ProcessApprovalRecordService;
|
import com.jero.modules.activiti.service.ProcessApprovalRecordService;
|
||||||
import com.jero.modules.assessmentLibrary.entity.LawsConformityAssessmentLibrary;
|
import com.jero.modules.assessmentLibrary.entity.LawsConformityAssessmentLibrary;
|
||||||
import com.jero.modules.assessmentLibrary.entity.LawsConformityAssessmentLibraryDetail;
|
import com.jero.modules.assessmentLibrary.entity.LawsConformityAssessmentLibraryDetail;
|
||||||
@@ -61,6 +62,9 @@ public class ProcessSCCEndListener implements ExecutionListener {
|
|||||||
@Resource
|
@Resource
|
||||||
private ProcessApprovalRecordService processApprovalRecordService;
|
private ProcessApprovalRecordService processApprovalRecordService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ProcessAllService paService;
|
||||||
|
|
||||||
public static final String TO_BE_RECTIFIED = "1";
|
public static final String TO_BE_RECTIFIED = "1";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -140,10 +144,12 @@ public class ProcessSCCEndListener implements ExecutionListener {
|
|||||||
calService.updateById(lawsConformityAssessmentLibrary);
|
calService.updateById(lawsConformityAssessmentLibrary);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String processInitiator = paService.getByProcessInstanceId(processInstanceId).getCreateUserId();
|
||||||
List<LawsConformityAssessmentLibraryDetail> lawsConformityAssessmentLibraryDetails = BeanCopyUtils.copyBeanList(list, LawsConformityAssessmentLibraryDetail.class);
|
List<LawsConformityAssessmentLibraryDetail> lawsConformityAssessmentLibraryDetails = BeanCopyUtils.copyBeanList(list, LawsConformityAssessmentLibraryDetail.class);
|
||||||
LawsConformityAssessmentLibrary finalLawsConformityAssessmentLibrary = lawsConformityAssessmentLibrary;
|
LawsConformityAssessmentLibrary finalLawsConformityAssessmentLibrary = lawsConformityAssessmentLibrary;
|
||||||
lawsConformityAssessmentLibraryDetails.forEach(detail -> {
|
lawsConformityAssessmentLibraryDetails.forEach(detail -> {
|
||||||
detail.setBindId(finalLawsConformityAssessmentLibrary.getId());
|
detail.setBindId(finalLawsConformityAssessmentLibrary.getId());
|
||||||
|
detail.setAssessorInitiator(processInitiator);
|
||||||
});
|
});
|
||||||
calDetailService.saveBatch(lawsConformityAssessmentLibraryDetails);
|
calDetailService.saveBatch(lawsConformityAssessmentLibraryDetails);
|
||||||
// 找出不符合和待验证的存入不符合项库
|
// 找出不符合和待验证的存入不符合项库
|
||||||
|
|||||||
+30
-7
@@ -546,6 +546,7 @@ public class ProcessStandardComplianceCheckServiceImpl extends ServiceImpl<Proce
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void exportXls(String taskId, HttpServletResponse response) {
|
public void exportXls(String taskId, HttpServletResponse response) {
|
||||||
|
List<SysDictItemCore> listDict = commonAPI.getDictItemAll();
|
||||||
ProcessInfoVO<ProcessSccVO> handleData = this.getHandleData(taskId);
|
ProcessInfoVO<ProcessSccVO> handleData = this.getHandleData(taskId);
|
||||||
ProcessSccVO businessInfoDTO = handleData.getBusinessInfoDTO();
|
ProcessSccVO businessInfoDTO = handleData.getBusinessInfoDTO();
|
||||||
ProcessStandardComplianceCheck standardInfo = businessInfoDTO.getStandardInfo();
|
ProcessStandardComplianceCheck standardInfo = businessInfoDTO.getStandardInfo();
|
||||||
@@ -565,9 +566,13 @@ public class ProcessStandardComplianceCheckServiceImpl extends ServiceImpl<Proce
|
|||||||
}
|
}
|
||||||
try (FileOutputStream fos = new FileOutputStream(url + File.separator + fileName + ".xls")) {
|
try (FileOutputStream fos = new FileOutputStream(url + File.separator + fileName + ".xls")) {
|
||||||
// 获取数据
|
// 获取数据
|
||||||
excelExportUtilPro.settleDocuments(url, "附件", detailInfoList,
|
excelExportUtilPro.settleDocuments(url, "佐证材料", detailInfoList,
|
||||||
ProcessStandardComplianceCheckDetail::obtainFileIds,
|
ProcessStandardComplianceCheckDetail::obtainFileIds,
|
||||||
ProcessStandardComplianceCheckDetail::setFileList);
|
ProcessStandardComplianceCheckDetail::setFileList, ExcelExportUtilPro.MaterialFile.class);
|
||||||
|
// 获取数据
|
||||||
|
excelExportUtilPro.settleDocuments(url, "辅助说明材料", detailInfoList,
|
||||||
|
ProcessStandardComplianceCheckDetail::obtainFileTwoIds,
|
||||||
|
ProcessStandardComplianceCheckDetail::setFileListTwo, ExcelExportUtilPro.UnsatisfiedRequireAttachFile.class);
|
||||||
// 生成excel
|
// 生成excel
|
||||||
ExportParams exportParams = new ExportParams();
|
ExportParams exportParams = new ExportParams();
|
||||||
exportParams.setType(ExcelType.HSSF);
|
exportParams.setType(ExcelType.HSSF);
|
||||||
@@ -584,9 +589,17 @@ public class ProcessStandardComplianceCheckServiceImpl extends ServiceImpl<Proce
|
|||||||
newRecordsExport.sort(new ProcessStandardComplianceCheckDetail());
|
newRecordsExport.sort(new ProcessStandardComplianceCheckDetail());
|
||||||
Workbook workbook = ExcelExportUtil
|
Workbook workbook = ExcelExportUtil
|
||||||
.exportExcel(exportParams, ProcessStandardComplianceCheckDetail.class, detailInfoList);
|
.exportExcel(exportParams, ProcessStandardComplianceCheckDetail.class, detailInfoList);
|
||||||
// 生成超链接
|
// 翻译评估结果和佐证材料字段
|
||||||
excelExportUtilPro.generateHyperlink("附件", newRecordsExport, workbook,
|
newRecordsExport.parallelStream().forEach(item -> {
|
||||||
ProcessStandardComplianceCheckDetail::getFileList, 15);
|
String material = excelUtils.translateDictValue("id", "file_name", "oss_file", item.getMaterial(), listDict);
|
||||||
|
if (StrUtil.isNotBlank(material)) {
|
||||||
|
item.setMaterial("佐证材料/" + material);
|
||||||
|
}
|
||||||
|
String unsatisfiedRequireAttach = excelUtils.translateDictValue("id", "file_name", "oss_file", item.getUnsatisfiedRequireAttach(), listDict);
|
||||||
|
if (StrUtil.isNotBlank(unsatisfiedRequireAttach)) {
|
||||||
|
item.setUnsatisfiedRequireAttach("辅助说明材料/" + unsatisfiedRequireAttach);
|
||||||
|
}
|
||||||
|
});
|
||||||
// 导出excel
|
// 导出excel
|
||||||
workbook.write(fos);
|
workbook.write(fos);
|
||||||
// 生成并导出zip
|
// 生成并导出zip
|
||||||
@@ -626,7 +639,11 @@ public class ProcessStandardComplianceCheckServiceImpl extends ServiceImpl<Proce
|
|||||||
// 获取数据
|
// 获取数据
|
||||||
excelExportUtilPro.settleDocuments(url, "佐证材料", detailInfoList,
|
excelExportUtilPro.settleDocuments(url, "佐证材料", detailInfoList,
|
||||||
ProcessStandardComplianceCheckDetail::obtainFileIds,
|
ProcessStandardComplianceCheckDetail::obtainFileIds,
|
||||||
ProcessStandardComplianceCheckDetail::setFileList);
|
ProcessStandardComplianceCheckDetail::setFileList, ExcelExportUtilPro.MaterialFile.class);
|
||||||
|
// 获取数据
|
||||||
|
excelExportUtilPro.settleDocuments(url, "辅助说明材料", detailInfoList,
|
||||||
|
ProcessStandardComplianceCheckDetail::obtainFileTwoIds,
|
||||||
|
ProcessStandardComplianceCheckDetail::setFileListTwo, ExcelExportUtilPro.UnsatisfiedRequireAttachFile.class);
|
||||||
|
|
||||||
// 去除文本的<p>
|
// 去除文本的<p>
|
||||||
String regex = "<[^>]*>";
|
String regex = "<[^>]*>";
|
||||||
@@ -650,6 +667,10 @@ public class ProcessStandardComplianceCheckServiceImpl extends ServiceImpl<Proce
|
|||||||
if (StrUtil.isNotBlank(material)) {
|
if (StrUtil.isNotBlank(material)) {
|
||||||
item.setMaterial("佐证材料/" + material);
|
item.setMaterial("佐证材料/" + material);
|
||||||
}
|
}
|
||||||
|
String unsatisfiedRequireAttach = excelUtils.translateDictValue("id", "file_name", "oss_file", item.getUnsatisfiedRequireAttach(), listDict);
|
||||||
|
if (StrUtil.isNotBlank(unsatisfiedRequireAttach)) {
|
||||||
|
item.setUnsatisfiedRequireAttach("辅助说明材料/" + unsatisfiedRequireAttach);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
Workbook workbook = ExcelExportUtil
|
Workbook workbook = ExcelExportUtil
|
||||||
.exportExcel(exportParams, WithoutDistributeExcelTemplate.class, data);
|
.exportExcel(exportParams, WithoutDistributeExcelTemplate.class, data);
|
||||||
@@ -910,6 +931,7 @@ public class ProcessStandardComplianceCheckServiceImpl extends ServiceImpl<Proce
|
|||||||
list.parallelStream().forEach(item -> {
|
list.parallelStream().forEach(item -> {
|
||||||
item.setResult(excelUtils.translateDictValue("evaluation_result", item.getResult(), listDict));
|
item.setResult(excelUtils.translateDictValue("evaluation_result", item.getResult(), listDict));
|
||||||
item.setMaterial(excelUtils.uploadFile(item.getMaterial(), fileMap));
|
item.setMaterial(excelUtils.uploadFile(item.getMaterial(), fileMap));
|
||||||
|
item.setUnsatisfiedRequireAttach(excelUtils.uploadFile(item.getUnsatisfiedRequireAttach(), fileMap));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -936,7 +958,8 @@ public class ProcessStandardComplianceCheckServiceImpl extends ServiceImpl<Proce
|
|||||||
|
|
||||||
// 检查所有数据字典校验的字段
|
// 检查所有数据字典校验的字段
|
||||||
errMsg.append(excelUtils.validResult(result, listDict));
|
errMsg.append(excelUtils.validResult(result, listDict));
|
||||||
errMsg.append(excelUtils.validMaterial(material, fileMap));
|
errMsg.append(excelUtils.validMaterial(material, fileMap, "佐证材料"));
|
||||||
|
errMsg.append(excelUtils.validMaterial(material, fileMap, "辅助说明材料"));
|
||||||
// 如果数据有问题,则将提示信息添加到 errorMsgs 中
|
// 如果数据有问题,则将提示信息添加到 errorMsgs 中
|
||||||
if (errMsg.length() > 0) {
|
if (errMsg.length() > 0) {
|
||||||
errorMsgs.add(errMsgHeader.append(errMsg).toString());
|
errorMsgs.add(errMsgHeader.append(errMsg).toString());
|
||||||
|
|||||||
+1
-1
@@ -52,7 +52,7 @@ public class ProcessStandardInterpret extends BaseEntity {
|
|||||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
@ApiModelProperty(value = "实施日期")
|
@ApiModelProperty(value = "实施日期")
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private java.util.Date implementationDate;
|
private java.lang.String implementationDate;
|
||||||
/**新生产车实施日*/
|
/**新生产车实施日*/
|
||||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
|
|||||||
+1
-1
@@ -73,7 +73,7 @@ public class ProcessStandardInterpretClauseSublist extends BaseEntity {
|
|||||||
private String regulatoryNotes;
|
private String regulatoryNotes;
|
||||||
/**涉及系统/部件)*/
|
/**涉及系统/部件)*/
|
||||||
@ApiModelProperty(value = "涉及系统/部件)")
|
@ApiModelProperty(value = "涉及系统/部件)")
|
||||||
@Excel(name = "涉及系统/部件", width = 15)
|
@Excel(name = "涉及系统/部件", width = 15, dictTable = "laws_part_name", dicCode = "code", dicText = "name")
|
||||||
@Dict(dictTable = "laws_part_name", dicCode = "code", dicText = "name")
|
@Dict(dictTable = "laws_part_name", dicCode = "code", dicText = "name")
|
||||||
private String partName;
|
private String partName;
|
||||||
/**涉及系统/部件)*/
|
/**涉及系统/部件)*/
|
||||||
|
|||||||
+16
-2
@@ -3,6 +3,7 @@ package com.jero.modules.activiti.process.standardinterpret.service.impl;
|
|||||||
import cn.hutool.core.date.DatePattern;
|
import cn.hutool.core.date.DatePattern;
|
||||||
import cn.hutool.core.date.DateTime;
|
import cn.hutool.core.date.DateTime;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
@@ -960,6 +961,16 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
|||||||
throw new JeroBootException("The list cannot import data!");
|
throw new JeroBootException("The list cannot import data!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(CollectionUtils.isEmpty(standardInterpretDTO.getProcessStandardInterpretClauseSublistList())){
|
||||||
|
List<ProcessStandardInterpretClause> processStandardInterpretClauseList =
|
||||||
|
standardInterpretDTO.getProcessStandardInterpretClauseList();
|
||||||
|
if(!CollectionUtils.isEmpty(processStandardInterpretClauseList)){
|
||||||
|
standardInterpretDTO.setProcessStandardInterpretClauseSublistList(
|
||||||
|
JSON.parseArray(JSON.toJSONString(processStandardInterpretClauseList),
|
||||||
|
ProcessStandardInterpretClauseSublist.class));
|
||||||
|
}
|
||||||
|
}
|
||||||
List<ProcessStandardInterpretClauseSublist> processStandardInterpretClauseSublistList =
|
List<ProcessStandardInterpretClauseSublist> processStandardInterpretClauseSublistList =
|
||||||
standardInterpretDTO.getProcessStandardInterpretClauseSublistList();
|
standardInterpretDTO.getProcessStandardInterpretClauseSublistList();
|
||||||
if (list.size() != processStandardInterpretClauseSublistList.size()){
|
if (list.size() != processStandardInterpretClauseSublistList.size()){
|
||||||
@@ -1403,12 +1414,15 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
|||||||
if (i > 0 && exist){
|
if (i > 0 && exist){
|
||||||
// 条款校验
|
// 条款校验
|
||||||
ProcessStandardInterpretClauseSublist processStandardInterpretClauseSublist = clauseSublistList.get(i);
|
ProcessStandardInterpretClauseSublist processStandardInterpretClauseSublist = clauseSublistList.get(i);
|
||||||
if(processStandardInterpretClauseSublist.getItemNum().equals(itemNum)
|
if(Objects.equals(processStandardInterpretClauseSublist.getItemNum(), itemNum)
|
||||||
&& processStandardInterpretClauseSublist.getItemTitle().equals(itemTitle)){
|
&& Objects.equals(StringUtils.isBlank(processStandardInterpretClauseSublist.getItemTitle()) ?
|
||||||
|
"":processStandardInterpretClauseSublist.getItemTitle(),
|
||||||
|
(StringUtils.isBlank(itemTitle) ? "":itemTitle))){
|
||||||
data.setClauseId(processStandardInterpretClauseSublist.getClauseId());
|
data.setClauseId(processStandardInterpretClauseSublist.getClauseId());
|
||||||
data.setItemTitle(processStandardInterpretClauseSublist.getItemTitle());
|
data.setItemTitle(processStandardInterpretClauseSublist.getItemTitle());
|
||||||
data.setItemContent(processStandardInterpretClauseSublist.getItemContent());
|
data.setItemContent(processStandardInterpretClauseSublist.getItemContent());
|
||||||
data.setTranslation(processStandardInterpretClauseSublist.getTranslation());
|
data.setTranslation(processStandardInterpretClauseSublist.getTranslation());
|
||||||
|
data.setTitleTranslation(processStandardInterpretClauseSublist.getTitleTranslation());
|
||||||
}else {
|
}else {
|
||||||
errorList.add("该数据在业务分派信息中不存在!");
|
errorList.add("该数据在业务分派信息中不存在!");
|
||||||
}
|
}
|
||||||
|
|||||||
+6
@@ -24,6 +24,12 @@ public class FlowImportExcel {
|
|||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
@Excel(name = "标准名称/条款标题", width = 15)
|
@Excel(name = "标准名称/条款标题", width = 15)
|
||||||
private String itemTitle;
|
private String itemTitle;
|
||||||
|
|
||||||
|
/**标题译文*/
|
||||||
|
@ApiModelProperty(value = "标题译文")
|
||||||
|
@TableField(exist = false)
|
||||||
|
@Excel(name = "标题译文", width = 18)
|
||||||
|
private String titleTranslation;
|
||||||
/**条款内容*/
|
/**条款内容*/
|
||||||
@ApiModelProperty(value = "条款内容")
|
@ApiModelProperty(value = "条款内容")
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
|
|||||||
+1
-3
@@ -35,9 +35,7 @@ public class HomeNewestStandardInterpret {
|
|||||||
private String standardState;
|
private String standardState;
|
||||||
// 实施日期
|
// 实施日期
|
||||||
@ApiModelProperty(value = "实施日期")
|
@ApiModelProperty(value = "实施日期")
|
||||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
private String implementationDate;
|
||||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
|
||||||
private Date implementationDate;
|
|
||||||
// 代替标准编号
|
// 代替标准编号
|
||||||
@ApiModelProperty(value = "代替标准编号")
|
@ApiModelProperty(value = "代替标准编号")
|
||||||
private String substituteStandardNumber;
|
private String substituteStandardNumber;
|
||||||
|
|||||||
@@ -596,12 +596,12 @@ public class ExcelUtils {
|
|||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
public String validMaterial(String value, Map<String, File> fileMap) {
|
public String validMaterial(String value, Map<String, File> fileMap, String title) {
|
||||||
if (StrUtil.isBlank(value)) {
|
if (StrUtil.isBlank(value)) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
if (!importUtil.fileValid(value, fileMap)) {
|
if (!importUtil.fileValid(value, fileMap)) {
|
||||||
return "'佐证材料'无效。";
|
return "'" + title + "'无效。";
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|||||||
+2
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|||||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||||
import com.jero.common.api.vo.Result;
|
import com.jero.common.api.vo.Result;
|
||||||
import com.jero.common.aspect.annotation.AutoLog;
|
import com.jero.common.aspect.annotation.AutoLog;
|
||||||
|
import com.jero.common.aspect.annotation.Translation;
|
||||||
import com.jero.modules.assessmentLibrary.entity.LawsConformityAssessmentLibrary;
|
import com.jero.modules.assessmentLibrary.entity.LawsConformityAssessmentLibrary;
|
||||||
import com.jero.modules.assessmentLibrary.entity.LawsConformityAssessmentLibraryDetail;
|
import com.jero.modules.assessmentLibrary.entity.LawsConformityAssessmentLibraryDetail;
|
||||||
import com.jero.modules.assessmentLibrary.service.ILawsConformityAssessmentLibraryService;
|
import com.jero.modules.assessmentLibrary.service.ILawsConformityAssessmentLibraryService;
|
||||||
@@ -42,6 +43,7 @@ public class LawsConformityAssessmentController {
|
|||||||
@GetMapping(value = "/page")
|
@GetMapping(value = "/page")
|
||||||
@ApiOperationSupport(order = 1)
|
@ApiOperationSupport(order = 1)
|
||||||
@RequiresPermissions("lawsConformityAssessment:search")
|
@RequiresPermissions("lawsConformityAssessment:search")
|
||||||
|
@Translation
|
||||||
public Result<IPage<LawsConformityAssessmentLibrary>> queryPageList(LawsConformityAssessmentLibrary lawsConformityAssessmentLibrary,
|
public Result<IPage<LawsConformityAssessmentLibrary>> queryPageList(LawsConformityAssessmentLibrary lawsConformityAssessmentLibrary,
|
||||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||||
|
|||||||
+1
-1
@@ -50,7 +50,7 @@ public class LawsConformityAssessmentLibrary implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 评估日期
|
* 评估日期
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "评估日期")
|
@ApiModelProperty(value = "评估完成日期")
|
||||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
private Date valuationTime;
|
private Date valuationTime;
|
||||||
|
|||||||
+14
@@ -95,6 +95,13 @@ public class LawsConformityAssessmentLibraryDetail implements Serializable {
|
|||||||
@Dict(dictTable = "sys_user", dicCode = "id", dicText = "realname")
|
@Dict(dictTable = "sys_user", dicCode = "id", dicText = "realname")
|
||||||
private String assessor;
|
private String assessor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评估发起人
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "评估发起人")
|
||||||
|
@Dict(dictTable = "sys_user", dicCode = "id", dicText = "realname")
|
||||||
|
private String assessorInitiator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 评估结果
|
* 评估结果
|
||||||
*/
|
*/
|
||||||
@@ -158,6 +165,13 @@ public class LawsConformityAssessmentLibraryDetail implements Serializable {
|
|||||||
@Dict(dictTable = "oss_file", dicCode = "id", dicText = "file_name")
|
@Dict(dictTable = "oss_file", dicCode = "id", dicText = "file_name")
|
||||||
private String material;
|
private String material;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 辅助说明材料
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "辅助说明材料")
|
||||||
|
@Dict(dictTable = "oss_file", dicCode = "id", dicText = "file_name")
|
||||||
|
private String unsatisfiedRequireAttach;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 关联主表Id
|
* 关联主表Id
|
||||||
*/
|
*/
|
||||||
|
|||||||
+39
-3
@@ -182,7 +182,7 @@ public class LawsEvaluationNotMetLibrary implements Serializable {
|
|||||||
* PCR编号
|
* PCR编号
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "PCR编号")
|
@ApiModelProperty(value = "PCR编号")
|
||||||
@Excel(name = "PCR编号", width = 15, orderNum = "11")
|
@Excel(name = "PCR编号", width = 15, orderNum = "13")
|
||||||
private String pcrNo;
|
private String pcrNo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -206,7 +206,7 @@ public class LawsEvaluationNotMetLibrary implements Serializable {
|
|||||||
@ApiModelProperty(value = "整改完成日期")
|
@ApiModelProperty(value = "整改完成日期")
|
||||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
@Excel(name = "整改完成日期", width = 15, orderNum = "12", format = "yyyy-MM-dd")
|
@Excel(name = "整改完成日期", width = 15, orderNum = "14", format = "yyyy-MM-dd")
|
||||||
private Date rectifyCompleteDate;
|
private Date rectifyCompleteDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -220,7 +220,7 @@ public class LawsEvaluationNotMetLibrary implements Serializable {
|
|||||||
* 附件
|
* 附件
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "附件")
|
@ApiModelProperty(value = "附件")
|
||||||
@ExcelCollection(name = "", orderNum = "13")
|
@ExcelCollection(name = "", orderNum = "15")
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private List<ExcelExportUtilPro.FileDetails> fileList = Collections.emptyList();
|
private List<ExcelExportUtilPro.FileDetails> fileList = Collections.emptyList();
|
||||||
|
|
||||||
@@ -228,6 +228,18 @@ public class LawsEvaluationNotMetLibrary implements Serializable {
|
|||||||
return file != null ? Arrays.asList(file.split(",")) : Collections.emptyList();
|
return file != null ? Arrays.asList(file.split(",")) : Collections.emptyList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 附件
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "辅助说明材料")
|
||||||
|
@ExcelCollection(name = "", orderNum = "14")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private List<ExcelExportUtilPro.UnsatisfiedRequireAttachFile> fileListTwo = Collections.emptyList();
|
||||||
|
|
||||||
|
public List<String> obtainFileTwoIds() {
|
||||||
|
return unsatisfiedRequireAttach != null ? Arrays.asList(unsatisfiedRequireAttach.split(",")) : Collections.emptyList();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 标准ID
|
* 标准ID
|
||||||
*/
|
*/
|
||||||
@@ -254,6 +266,23 @@ public class LawsEvaluationNotMetLibrary implements Serializable {
|
|||||||
@ApiModelProperty(value = "这条数据的所有审批人员")
|
@ApiModelProperty(value = "这条数据的所有审批人员")
|
||||||
private String allApprovalUser;
|
private String allApprovalUser;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关闭人
|
||||||
|
*/
|
||||||
|
@Dict(dictTable = "sys_user", dicCode = "id", dicText = "realname")
|
||||||
|
@Excel(name = "关闭人", width = 15, orderNum = "11", dictTable = "sys_user", dicCode = "id", dicText = "CONCAT(realname, '(', username, ')')")
|
||||||
|
@ApiModelProperty(value = "关闭人")
|
||||||
|
private String closeUser;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关闭时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "关闭时间")
|
||||||
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
|
@Excel(name = "关闭时间", width = 15, orderNum = "12", format = "yyyy-MM-dd")
|
||||||
|
private Date closeTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 关闭用主键ids
|
* 关闭用主键ids
|
||||||
*/
|
*/
|
||||||
@@ -261,6 +290,13 @@ public class LawsEvaluationNotMetLibrary implements Serializable {
|
|||||||
@ApiModelProperty(value = "关闭用主键ids")
|
@ApiModelProperty(value = "关闭用主键ids")
|
||||||
private String selections;
|
private String selections;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 辅助说明材料
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "辅助说明材料")
|
||||||
|
@Dict(dictTable = "oss_file", dicCode = "id", dicText = "file_name")
|
||||||
|
private String unsatisfiedRequireAttach;
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
}
|
}
|
||||||
+15
@@ -2,6 +2,8 @@ package com.jero.modules.assessmentLibrary.entity.vo;
|
|||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.jero.common.aspect.annotation.Dict;
|
import com.jero.common.aspect.annotation.Dict;
|
||||||
|
import com.jero.modules.laws.utils.ExcelExportUtilPro.MaterialFile;
|
||||||
|
import com.jero.modules.laws.utils.ExcelExportUtilPro.UnsatisfiedRequireAttachFile;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
@@ -162,5 +164,18 @@ public class LawsConformityAssessmentLibraryExportVO implements Serializable {
|
|||||||
@ExcelCollection(name = "")
|
@ExcelCollection(name = "")
|
||||||
private List<MaterialFile> materialFileList = Collections.emptyList();
|
private List<MaterialFile> materialFileList = Collections.emptyList();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 佐证材料
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "辅助说明材料")
|
||||||
|
private String unsatisfiedRequireAttach;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 佐证材料
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "辅助说明材料")
|
||||||
|
@ExcelCollection(name = "")
|
||||||
|
private List<UnsatisfiedRequireAttachFile> unsatisfiedRequireAttachList = Collections.emptyList();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
-15
@@ -1,15 +0,0 @@
|
|||||||
package com.jero.modules.assessmentLibrary.entity.vo;
|
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.Data;
|
|
||||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class MaterialFile {
|
|
||||||
@ApiModelProperty(value = "id")
|
|
||||||
private String id;
|
|
||||||
|
|
||||||
@Excel(name = "佐证材料", width = 15)
|
|
||||||
@ApiModelProperty(value = "佐证材料")
|
|
||||||
private String fileName;
|
|
||||||
}
|
|
||||||
+3
-5
@@ -23,14 +23,12 @@
|
|||||||
cs.standard_id,
|
cs.standard_id,
|
||||||
IF(cs.standard_id IS NOT NULL, d.standard_number, cs.standard_number) AS standard_number,
|
IF(cs.standard_id IS NOT NULL, d.standard_number, cs.standard_number) AS standard_number,
|
||||||
IF(cs.standard_id IS NOT NULL, d.standard_name, cs.standard_name) AS standard_name,
|
IF(cs.standard_id IS NOT NULL, d.standard_name, cs.standard_name) AS standard_name,
|
||||||
lms.country as applicableMarket,
|
cs.applicable_market,
|
||||||
cs.valuation_time,
|
cs.valuation_time,
|
||||||
cs.create_time,
|
cs.create_time,
|
||||||
cs.all_approval_user,
|
cs.all_approval_user
|
||||||
lms.country
|
|
||||||
from laws_conformity_assessment_library cs
|
from laws_conformity_assessment_library cs
|
||||||
left join laws_domestic_standard as d on d.id = cs.standard_id
|
left join laws_domestic_standard as d on d.id = cs.standard_id) as t
|
||||||
left join laws_market_standard as lms on lms.id = cs.applicable_market) as t
|
|
||||||
${ew.customSqlSegment}
|
${ew.customSqlSegment}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
+89
-2
@@ -6,19 +6,23 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|||||||
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.jero.common.api.CommonAPI;
|
||||||
import com.jero.common.api.vo.ResultCommon;
|
import com.jero.common.api.vo.ResultCommon;
|
||||||
import com.jero.common.exception.JeroBootException;
|
import com.jero.common.exception.JeroBootException;
|
||||||
import com.jero.common.system.vo.LoginUser;
|
import com.jero.common.system.vo.LoginUser;
|
||||||
|
import com.jero.common.system.vo.SysDictItemCore;
|
||||||
import com.jero.common.util.FileUtils;
|
import com.jero.common.util.FileUtils;
|
||||||
import com.jero.common.util.ZipUtil;
|
import com.jero.common.util.ZipUtil;
|
||||||
import com.jero.common.util.obs.ObsBootUtil;
|
import com.jero.common.util.obs.ObsBootUtil;
|
||||||
|
import com.jero.modules.activiti.util.ExcelUtils;
|
||||||
import com.jero.modules.assessmentLibrary.entity.LawsConformityAssessmentLibrary;
|
import com.jero.modules.assessmentLibrary.entity.LawsConformityAssessmentLibrary;
|
||||||
import com.jero.modules.assessmentLibrary.entity.LawsConformityAssessmentLibraryDetail;
|
import com.jero.modules.assessmentLibrary.entity.LawsConformityAssessmentLibraryDetail;
|
||||||
import com.jero.modules.assessmentLibrary.entity.vo.LawsConformityAssessmentLibraryExportVO;
|
import com.jero.modules.assessmentLibrary.entity.vo.LawsConformityAssessmentLibraryExportVO;
|
||||||
import com.jero.modules.assessmentLibrary.entity.vo.MaterialFile;
|
|
||||||
import com.jero.modules.assessmentLibrary.mapper.LawsConformityAssessmentLibraryMapper;
|
import com.jero.modules.assessmentLibrary.mapper.LawsConformityAssessmentLibraryMapper;
|
||||||
import com.jero.modules.assessmentLibrary.service.ILawsConformityAssessmentLibraryService;
|
import com.jero.modules.assessmentLibrary.service.ILawsConformityAssessmentLibraryService;
|
||||||
import com.jero.modules.laws.enterprise.util.BeanCopyUtils;
|
import com.jero.modules.laws.enterprise.util.BeanCopyUtils;
|
||||||
|
import com.jero.modules.laws.utils.ExcelExportUtilPro.MaterialFile;
|
||||||
|
import com.jero.modules.laws.utils.ExcelExportUtilPro.UnsatisfiedRequireAttachFile;
|
||||||
import com.jero.modules.oss.entity.OSSFile;
|
import com.jero.modules.oss.entity.OSSFile;
|
||||||
import com.jero.modules.oss.service.IOSSFileService;
|
import com.jero.modules.oss.service.IOSSFileService;
|
||||||
import com.jero.modules.sys.utils.UserUtils;
|
import com.jero.modules.sys.utils.UserUtils;
|
||||||
@@ -65,6 +69,12 @@ public class LawsConformityAssessmentLibraryServiceImpl extends ServiceImpl<Laws
|
|||||||
@Resource
|
@Resource
|
||||||
private LawsConformityAssessmentLibraryMapper lawsConformityAssessmentLibraryMapper;
|
private LawsConformityAssessmentLibraryMapper lawsConformityAssessmentLibraryMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ExcelUtils excelUtils;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private CommonAPI commonAPI;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 法规管理员
|
* 法规管理员
|
||||||
*/
|
*/
|
||||||
@@ -89,7 +99,8 @@ public class LawsConformityAssessmentLibraryServiceImpl extends ServiceImpl<Laws
|
|||||||
if (StringUtils.isNotBlank(applicableMarkets)) {
|
if (StringUtils.isNotBlank(applicableMarkets)) {
|
||||||
String[] split = applicableMarkets.split(",");
|
String[] split = applicableMarkets.split(",");
|
||||||
for (String splitStr : split) {
|
for (String splitStr : split) {
|
||||||
queryWrapper.like("t.country", splitStr);
|
queryWrapper.likeRight("t.applicable_market", splitStr + "-").or()
|
||||||
|
.apply("FIND_IN_SET({0}, t.applicable_market) > 0", splitStr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (StringUtils.isNotBlank(lawsConformityAssessmentLibrary.getSelections())) {
|
if (StringUtils.isNotBlank(lawsConformityAssessmentLibrary.getSelections())) {
|
||||||
@@ -140,6 +151,7 @@ public class LawsConformityAssessmentLibraryServiceImpl extends ServiceImpl<Laws
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void export(HttpServletResponse response, LawsConformityAssessmentLibrary lawsConformityAssessmentLibrary, String fileName, String sheetName, HttpServletRequest req) {
|
public void export(HttpServletResponse response, LawsConformityAssessmentLibrary lawsConformityAssessmentLibrary, String fileName, String sheetName, HttpServletRequest req) {
|
||||||
|
List<SysDictItemCore> listDict = commonAPI.getDictItemAll();
|
||||||
String url = exportExcelTempPath.replace(EXPORT_EXCEL_TEMP, fileName);
|
String url = exportExcelTempPath.replace(EXPORT_EXCEL_TEMP, fileName);
|
||||||
File file = new File(url);
|
File file = new File(url);
|
||||||
if (!file.exists()) {
|
if (!file.exists()) {
|
||||||
@@ -180,6 +192,7 @@ public class LawsConformityAssessmentLibraryServiceImpl extends ServiceImpl<Laws
|
|||||||
});
|
});
|
||||||
|
|
||||||
this.settleDocuments(url, "佐证材料", recordsExport);
|
this.settleDocuments(url, "佐证材料", recordsExport);
|
||||||
|
this.settleDocumentsTwo(url, "辅助说明材料", recordsExport);
|
||||||
|
|
||||||
// 去除文本的<p>
|
// 去除文本的<p>
|
||||||
String regex = "<[^>]*>";
|
String regex = "<[^>]*>";
|
||||||
@@ -196,8 +209,20 @@ public class LawsConformityAssessmentLibraryServiceImpl extends ServiceImpl<Laws
|
|||||||
// 复制一份数据
|
// 复制一份数据
|
||||||
List<LawsConformityAssessmentLibraryExportVO> newRecordsExport = new ArrayList<>(recordsExport);
|
List<LawsConformityAssessmentLibraryExportVO> newRecordsExport = new ArrayList<>(recordsExport);
|
||||||
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, LawsConformityAssessmentLibraryExportVO.class, recordsExport);
|
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, LawsConformityAssessmentLibraryExportVO.class, recordsExport);
|
||||||
|
// 翻译评估结果和佐证材料字段
|
||||||
|
newRecordsExport.parallelStream().forEach(item -> {
|
||||||
|
String material = excelUtils.translateDictValue("id", "file_name", "oss_file", item.getMaterial(), listDict);
|
||||||
|
if (StrUtil.isNotBlank(material)) {
|
||||||
|
item.setMaterial("佐证材料/" + material);
|
||||||
|
}
|
||||||
|
String unsatisfiedRequireAttach = excelUtils.translateDictValue("id", "file_name", "oss_file", item.getUnsatisfiedRequireAttach(), listDict);
|
||||||
|
if (StrUtil.isNotBlank(unsatisfiedRequireAttach)) {
|
||||||
|
item.setUnsatisfiedRequireAttach("辅助说明材料/" + unsatisfiedRequireAttach);
|
||||||
|
}
|
||||||
|
});
|
||||||
// 生成超链接
|
// 生成超链接
|
||||||
generateHyperlink("佐证材料", newRecordsExport, workbook);
|
generateHyperlink("佐证材料", newRecordsExport, workbook);
|
||||||
|
generateHyperlinkTwo("辅助说明材料", newRecordsExport, workbook);
|
||||||
// 导出excel
|
// 导出excel
|
||||||
workbook.write(fos);
|
workbook.write(fos);
|
||||||
// 生成并导出zip
|
// 生成并导出zip
|
||||||
@@ -278,6 +303,33 @@ public class LawsConformityAssessmentLibraryServiceImpl extends ServiceImpl<Laws
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void generateHyperlinkTwo(String folderName, List<LawsConformityAssessmentLibraryExportVO> vos, Workbook workbook) {
|
||||||
|
Sheet sheet = workbook.getSheetAt(0);
|
||||||
|
// 设置字体颜色、下划线
|
||||||
|
CellStyle cellStyle = workbook.createCellStyle();
|
||||||
|
Font font = workbook.createFont();
|
||||||
|
font.setColor(IndexedColors.BLUE.getIndex());
|
||||||
|
font.setUnderline(Font.U_SINGLE);
|
||||||
|
cellStyle.setFont(font);
|
||||||
|
cellStyle.setWrapText(true);
|
||||||
|
int i = 1;
|
||||||
|
for (LawsConformityAssessmentLibraryExportVO vo : vos) {
|
||||||
|
if (!Objects.isNull(vo.getUnsatisfiedRequireAttach()) && !vo.getUnsatisfiedRequireAttachList().isEmpty()) {
|
||||||
|
for (UnsatisfiedRequireAttachFile materialFile : vo.getUnsatisfiedRequireAttachList()) {
|
||||||
|
Row row = sheet.getRow(i);
|
||||||
|
Cell cell = row.getCell(19);
|
||||||
|
// 构建完整的超链接路径,包括文件夹名称
|
||||||
|
String hyperlinkPath = folderName + "/" + materialFile.getFileName();
|
||||||
|
cell.setCellFormula("HYPERLINK(\"" + hyperlinkPath + "\", \"" + materialFile.getFileName() + "\")");
|
||||||
|
cell.setCellStyle(cellStyle);
|
||||||
|
i += 1;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
i += 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void settleDocuments(String url, String folderName, List<LawsConformityAssessmentLibraryExportVO> excelVos) throws IOException {
|
private void settleDocuments(String url, String folderName, List<LawsConformityAssessmentLibraryExportVO> excelVos) throws IOException {
|
||||||
// 构建完整的文件夹路径
|
// 构建完整的文件夹路径
|
||||||
String directoryPath = url + File.separator + folderName;
|
String directoryPath = url + File.separator + folderName;
|
||||||
@@ -313,6 +365,41 @@ public class LawsConformityAssessmentLibraryServiceImpl extends ServiceImpl<Laws
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void settleDocumentsTwo(String url, String folderName, List<LawsConformityAssessmentLibraryExportVO> excelVos) throws IOException {
|
||||||
|
// 构建完整的文件夹路径
|
||||||
|
String directoryPath = url + File.separator + folderName;
|
||||||
|
|
||||||
|
// 检查文件夹是否存在,如果不存在则创建
|
||||||
|
File directory = new File(directoryPath);
|
||||||
|
if (!directory.exists()) {
|
||||||
|
directory.mkdirs(); // 使用mkdirs()而不是mkdir(),因为mkdirs()会创建所有必需的父目录
|
||||||
|
}
|
||||||
|
|
||||||
|
for (LawsConformityAssessmentLibraryExportVO vo : excelVos) {
|
||||||
|
// 查询文件
|
||||||
|
if (StringUtils.isNotBlank(vo.getUnsatisfiedRequireAttach())) {
|
||||||
|
List<String> fileIdList = Arrays.asList(vo.getUnsatisfiedRequireAttach().split(","));
|
||||||
|
List<OSSFile> ossFileList = ossFileService.listByIds(fileIdList);
|
||||||
|
if (!ossFileList.isEmpty()) {
|
||||||
|
// 赋值
|
||||||
|
List<UnsatisfiedRequireAttachFile> materialFileList = com.jero.common.util.BeanCopyUtils.copyBeanList(ossFileList, UnsatisfiedRequireAttachFile.class);
|
||||||
|
vo.setUnsatisfiedRequireAttachList(materialFileList);
|
||||||
|
// 写出文件
|
||||||
|
for (OSSFile ossFile : ossFileList) {
|
||||||
|
InputStream inputStream = ObsBootUtil.getOssFile(ossFile.getUrl());
|
||||||
|
// pdf加水印
|
||||||
|
if (StringUtils.endsWithIgnoreCase(ossFile.getFileName(), ".pdf")) {
|
||||||
|
inputStream = sysWaterMarkUtil.addWatermarkToPdf(inputStream);
|
||||||
|
}
|
||||||
|
// 构建文件保存路径,将文件保存在指定文件夹下
|
||||||
|
String filePath = url + File.separator + folderName + File.separator + ossFile.getFileName();
|
||||||
|
writeToLocal(filePath, inputStream);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 将InputStream写入本地文件
|
* 将InputStream写入本地文件
|
||||||
|
|||||||
+26
-2
@@ -6,16 +6,21 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.jero.common.api.CommonAPI;
|
||||||
import com.jero.common.api.vo.ResultCommon;
|
import com.jero.common.api.vo.ResultCommon;
|
||||||
import com.jero.common.exception.JeroBootException;
|
import com.jero.common.exception.JeroBootException;
|
||||||
|
import com.jero.common.system.vo.SysDictItemCore;
|
||||||
import com.jero.common.util.FileUtils;
|
import com.jero.common.util.FileUtils;
|
||||||
import com.jero.common.util.ZipUtil;
|
import com.jero.common.util.ZipUtil;
|
||||||
|
import com.jero.modules.activiti.util.ExcelUtils;
|
||||||
import com.jero.modules.assessmentLibrary.entity.AssessCommon;
|
import com.jero.modules.assessmentLibrary.entity.AssessCommon;
|
||||||
import com.jero.modules.assessmentLibrary.entity.LawsEvaluationNotMetLibrary;
|
import com.jero.modules.assessmentLibrary.entity.LawsEvaluationNotMetLibrary;
|
||||||
import com.jero.modules.assessmentLibrary.mapper.LawsEvaluationNotMetLibraryMapper;
|
import com.jero.modules.assessmentLibrary.mapper.LawsEvaluationNotMetLibraryMapper;
|
||||||
import com.jero.modules.assessmentLibrary.service.ILawsConformityAssessmentLibraryService;
|
import com.jero.modules.assessmentLibrary.service.ILawsConformityAssessmentLibraryService;
|
||||||
import com.jero.modules.assessmentLibrary.service.ILawsEvaluationNotMetLibraryService;
|
import com.jero.modules.assessmentLibrary.service.ILawsEvaluationNotMetLibraryService;
|
||||||
import com.jero.modules.laws.utils.ExcelExportUtilPro;
|
import com.jero.modules.laws.utils.ExcelExportUtilPro;
|
||||||
|
import com.jero.modules.laws.utils.ExcelExportUtilPro.FileDetails;
|
||||||
|
import com.jero.modules.laws.utils.ExcelExportUtilPro.UnsatisfiedRequireAttachFile;
|
||||||
import com.jero.modules.sys.utils.UserUtils;
|
import com.jero.modules.sys.utils.UserUtils;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
@@ -52,6 +57,10 @@ public class LawsEvaluationNotMetLibraryServiceImpl extends ServiceImpl<LawsEval
|
|||||||
private ExcelExportUtilPro excelExportUtilPro;
|
private ExcelExportUtilPro excelExportUtilPro;
|
||||||
@Resource
|
@Resource
|
||||||
private ILawsConformityAssessmentLibraryService calService;
|
private ILawsConformityAssessmentLibraryService calService;
|
||||||
|
@Resource
|
||||||
|
private CommonAPI commonAPI;
|
||||||
|
@Resource
|
||||||
|
private ExcelUtils excelUtils;
|
||||||
|
|
||||||
@Value("${jero.path.exportExcelTempPath}")
|
@Value("${jero.path.exportExcelTempPath}")
|
||||||
private String exportExcelTempPath;
|
private String exportExcelTempPath;
|
||||||
@@ -101,6 +110,8 @@ public class LawsEvaluationNotMetLibraryServiceImpl extends ServiceImpl<LawsEval
|
|||||||
LawsEvaluationNotMetLibrary::getFile, lawsEvaluationNotMet.getFile());
|
LawsEvaluationNotMetLibrary::getFile, lawsEvaluationNotMet.getFile());
|
||||||
wrapper.set(LawsEvaluationNotMetLibrary::getUpdateTime, new Date());
|
wrapper.set(LawsEvaluationNotMetLibrary::getUpdateTime, new Date());
|
||||||
wrapper.set(LawsEvaluationNotMetLibrary::getUpdateBy, UserUtils.getCurrentUser().getUsername());
|
wrapper.set(LawsEvaluationNotMetLibrary::getUpdateBy, UserUtils.getCurrentUser().getUsername());
|
||||||
|
wrapper.set(LawsEvaluationNotMetLibrary::getCloseUser, UserUtils.getCurrentUser().getId());
|
||||||
|
wrapper.set(LawsEvaluationNotMetLibrary::getCloseTime, new Date());
|
||||||
wrapper.in(LawsEvaluationNotMetLibrary::getId, ids);
|
wrapper.in(LawsEvaluationNotMetLibrary::getId, ids);
|
||||||
update(wrapper);
|
update(wrapper);
|
||||||
}
|
}
|
||||||
@@ -108,8 +119,8 @@ public class LawsEvaluationNotMetLibraryServiceImpl extends ServiceImpl<LawsEval
|
|||||||
@Override
|
@Override
|
||||||
public void export(HttpServletResponse response, LawsEvaluationNotMetLibrary lawsEvaluationNotMet, String fileName,
|
public void export(HttpServletResponse response, LawsEvaluationNotMetLibrary lawsEvaluationNotMet, String fileName,
|
||||||
String sheetName, HttpServletRequest req) {
|
String sheetName, HttpServletRequest req) {
|
||||||
|
List<SysDictItemCore> listDict = commonAPI.getDictItemAll();
|
||||||
horizontalCheck(lawsEvaluationNotMet.getSelections());
|
horizontalCheck(lawsEvaluationNotMet.getSelections());
|
||||||
|
|
||||||
String url = exportExcelTempPath.replace(EXPORT_EXCEL_TEMP, fileName);
|
String url = exportExcelTempPath.replace(EXPORT_EXCEL_TEMP, fileName);
|
||||||
File file = new File(url);
|
File file = new File(url);
|
||||||
if (!file.exists()) {
|
if (!file.exists()) {
|
||||||
@@ -121,7 +132,8 @@ public class LawsEvaluationNotMetLibraryServiceImpl extends ServiceImpl<LawsEval
|
|||||||
IPage<LawsEvaluationNotMetLibrary> lawsEvaluationNotMets = this.queryPage(lawsEvaluationNotMet, 1, Integer.MAX_VALUE, req);
|
IPage<LawsEvaluationNotMetLibrary> lawsEvaluationNotMets = this.queryPage(lawsEvaluationNotMet, 1, Integer.MAX_VALUE, req);
|
||||||
List<LawsEvaluationNotMetLibrary> records = lawsEvaluationNotMets.getRecords();
|
List<LawsEvaluationNotMetLibrary> records = lawsEvaluationNotMets.getRecords();
|
||||||
|
|
||||||
excelExportUtilPro.settleDocuments(url, "附件", records, LawsEvaluationNotMetLibrary::obtainFileIds, LawsEvaluationNotMetLibrary::setFileList);
|
excelExportUtilPro.settleDocuments(url, "附件", records, LawsEvaluationNotMetLibrary::obtainFileIds, LawsEvaluationNotMetLibrary::setFileList, FileDetails.class);
|
||||||
|
excelExportUtilPro.settleDocuments(url, "辅助说明材料", records, LawsEvaluationNotMetLibrary::obtainFileTwoIds, LawsEvaluationNotMetLibrary::setFileListTwo, UnsatisfiedRequireAttachFile.class);
|
||||||
|
|
||||||
// 去除文本的<p>
|
// 去除文本的<p>
|
||||||
String regex = "<[^>]*>";
|
String regex = "<[^>]*>";
|
||||||
@@ -138,8 +150,20 @@ public class LawsEvaluationNotMetLibraryServiceImpl extends ServiceImpl<LawsEval
|
|||||||
// 复制一份数据
|
// 复制一份数据
|
||||||
List<LawsEvaluationNotMetLibrary> newRecordsExport = new ArrayList<>(records);
|
List<LawsEvaluationNotMetLibrary> newRecordsExport = new ArrayList<>(records);
|
||||||
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, LawsEvaluationNotMetLibrary.class, records);
|
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, LawsEvaluationNotMetLibrary.class, records);
|
||||||
|
// 翻译评估结果和佐证材料字段
|
||||||
|
newRecordsExport.parallelStream().forEach(item -> {
|
||||||
|
String material = excelUtils.translateDictValue("id", "file_name", "oss_file", item.getFile(), listDict);
|
||||||
|
if (StrUtil.isNotBlank(material)) {
|
||||||
|
item.setFile("附件/" + material);
|
||||||
|
}
|
||||||
|
String unsatisfiedRequireAttach = excelUtils.translateDictValue("id", "file_name", "oss_file", item.getUnsatisfiedRequireAttach(), listDict);
|
||||||
|
if (StrUtil.isNotBlank(unsatisfiedRequireAttach)) {
|
||||||
|
item.setUnsatisfiedRequireAttach("辅助说明材料/" + unsatisfiedRequireAttach);
|
||||||
|
}
|
||||||
|
});
|
||||||
// 生成超链接
|
// 生成超链接
|
||||||
excelExportUtilPro.generateHyperlink("附件", newRecordsExport, workbook, LawsEvaluationNotMetLibrary::getFileList, 12);
|
excelExportUtilPro.generateHyperlink("附件", newRecordsExport, workbook, LawsEvaluationNotMetLibrary::getFileList, 12);
|
||||||
|
excelExportUtilPro.generateHyperlink("辅助说明材料", newRecordsExport, workbook, LawsEvaluationNotMetLibrary::getFileList, 13);
|
||||||
// 导出excel
|
// 导出excel
|
||||||
workbook.write(fos);
|
workbook.write(fos);
|
||||||
// 生成并导出zip
|
// 生成并导出zip
|
||||||
|
|||||||
+58
-6
@@ -457,6 +457,36 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
|||||||
* @Date: 2023/9/11 14:49
|
* @Date: 2023/9/11 14:49
|
||||||
* @Description: 是否收藏标识判断
|
* @Description: 是否收藏标识判断
|
||||||
**/
|
**/
|
||||||
|
private void collectionFlag(Map<String, Object> stringObjectMap) {
|
||||||
|
// 获取全部id集合
|
||||||
|
String id = String.valueOf(stringObjectMap.get("id"));
|
||||||
|
if (StrUtil.isBlank(id)) return;
|
||||||
|
// 获取登录用户
|
||||||
|
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
|
// 查询标准收藏表
|
||||||
|
LambdaQueryWrapper<LawsStandardCollection> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.eq(LawsStandardCollection::getCollectorId, loginUser.getId());
|
||||||
|
queryWrapper.eq(LawsStandardCollection::getStandardId, id);
|
||||||
|
List<LawsStandardCollection> standardCollectionList = lawsStandardCollectionService.list(queryWrapper);
|
||||||
|
if (CollectionUtils.isEmpty(standardCollectionList)) {
|
||||||
|
stringObjectMap.put(FieldCommon.COLLECTION_FLAG, false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
List<String> standardIdList = standardCollectionList.stream()
|
||||||
|
.map(LawsStandardCollection::getStandardId).collect(Collectors.toList());
|
||||||
|
if (standardIdList.contains(id)) {
|
||||||
|
stringObjectMap.put(FieldCommon.COLLECTION_FLAG, true);
|
||||||
|
} else {
|
||||||
|
stringObjectMap.put(FieldCommon.COLLECTION_FLAG, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: liao
|
||||||
|
* @Date: 2023/9/11 14:49
|
||||||
|
* @Description: 标准详情是否收藏标识
|
||||||
|
**/
|
||||||
private void collectionFlag(List<Map<String, Object>> records) {
|
private void collectionFlag(List<Map<String, Object>> records) {
|
||||||
// 获取全部id集合
|
// 获取全部id集合
|
||||||
List<String> ids = records.stream().map(kv ->
|
List<String> ids = records.stream().map(kv ->
|
||||||
@@ -1225,6 +1255,8 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
|||||||
splitFlag(stringObjectMap);
|
splitFlag(stringObjectMap);
|
||||||
// 添加固定字段
|
// 添加固定字段
|
||||||
this.setFixedUserInfo(stringObjectMap, singleStandard);
|
this.setFixedUserInfo(stringObjectMap, singleStandard);
|
||||||
|
// 标准收藏标识
|
||||||
|
collectionFlag(stringObjectMap);
|
||||||
// 对返回的字段做处理
|
// 对返回的字段做处理
|
||||||
return stringObjectMap;
|
return stringObjectMap;
|
||||||
}
|
}
|
||||||
@@ -1288,11 +1320,25 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
|||||||
public IPage<ManyStandardSelectionBox> getManyStandardSelectionBox(ManyStandardSelectionBoxVO selectionBoxVO, Integer pageNo, Integer pageSize) {
|
public IPage<ManyStandardSelectionBox> getManyStandardSelectionBox(ManyStandardSelectionBoxVO selectionBoxVO, Integer pageNo, Integer pageSize) {
|
||||||
if (StringUtils.isNotBlank(selectionBoxVO.getStandardSystem())) {
|
if (StringUtils.isNotBlank(selectionBoxVO.getStandardSystem())) {
|
||||||
List<String> list = Arrays.asList(selectionBoxVO.getStandardSystem().split(","));
|
List<String> list = Arrays.asList(selectionBoxVO.getStandardSystem().split(","));
|
||||||
List<LawsNodeRelation> lawsNodeRelationList = lawsNodeRelationService.list(
|
List<LawsTreeNode> lawsTreeNodeList = lawsTreeNodeService.listByIds(list);
|
||||||
new LambdaQueryWrapper<LawsNodeRelation>().in(LawsNodeRelation::getNodeId, list));
|
if (!CollectionUtils.isEmpty(lawsTreeNodeList)) {
|
||||||
if (CollectionUtils.isNotEmpty(lawsNodeRelationList)) {
|
List<String> nodeCode = lawsTreeNodeList.stream()
|
||||||
String ids = lawsNodeRelationList.stream()
|
.map(LawsTreeNode::getNodeCode).collect(Collectors.toList());
|
||||||
.map(LawsNodeRelation::getUniqueRelationFlag).collect(Collectors.joining(","));
|
LambdaQueryWrapper<LawsNodeRelation> query = new LambdaQueryWrapper<>();
|
||||||
|
query.and(o -> {
|
||||||
|
for (int i = 0; i < nodeCode.size(); i++) {
|
||||||
|
o.likeRight(LawsNodeRelation::getNodeCode, nodeCode.get(i));
|
||||||
|
if (i != (nodeCode.size() - 1)) {
|
||||||
|
o.or();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
List<LawsNodeRelation> lawsNodeRelationListAll = lawsNodeRelationService.list(query);
|
||||||
|
if(CollectionUtils.isEmpty(lawsNodeRelationListAll)){
|
||||||
|
return new Page<>();
|
||||||
|
}
|
||||||
|
String ids = lawsNodeRelationListAll.stream().map(LawsNodeRelation::getUniqueRelationFlag)
|
||||||
|
.collect(Collectors.joining(","));
|
||||||
selectionBoxVO.setIds(ids);
|
selectionBoxVO.setIds(ids);
|
||||||
} else {
|
} else {
|
||||||
return new Page<>();
|
return new Page<>();
|
||||||
@@ -1675,10 +1721,16 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
|||||||
headerList.remove(headerList.size() - 1);
|
headerList.remove(headerList.size() - 1);
|
||||||
headerList.add(inspectContentTag);
|
headerList.add(inspectContentTag);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
List<LawsDomesticStandard> list = lawsDomesticStandardService.list();
|
||||||
|
List<String> standardNoList = list.stream().map(LawsDomesticStandard::getStandardNumber)
|
||||||
|
.filter(e -> !e.contains("-") & !e.contains("—"))
|
||||||
|
.collect(Collectors.toList());
|
||||||
// 获取错误信息
|
// 获取错误信息
|
||||||
errMsgList = importUtil.validExcelData(sheet, headerList, fileMap, insertDataList,
|
errMsgList = importUtil.validExcelData(sheet, headerList, fileMap, insertDataList,
|
||||||
treeNodeMap, treeNodePathMap,
|
treeNodeMap, treeNodePathMap,
|
||||||
sysDeaprtMap, sysDepartPathMap);
|
sysDeaprtMap, sysDepartPathMap,
|
||||||
|
standardNoList);
|
||||||
}
|
}
|
||||||
return errMsgList;
|
return errMsgList;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -77,7 +77,8 @@ public class ImportUtil {
|
|||||||
Map<String, List<LawsTreeNode>> treeNodeMap,
|
Map<String, List<LawsTreeNode>> treeNodeMap,
|
||||||
Map<String, String> treeNodePathMap,
|
Map<String, String> treeNodePathMap,
|
||||||
Map<String, List<SysDepart>> sysDepartMap,
|
Map<String, List<SysDepart>> sysDepartMap,
|
||||||
Map<String, String> sysDepartPathMap
|
Map<String, String> sysDepartPathMap,
|
||||||
|
List<String> fbStandardNoList
|
||||||
) {
|
) {
|
||||||
List<String> errMsgList = new ArrayList<>();
|
List<String> errMsgList = new ArrayList<>();
|
||||||
Map<String, Integer> keyMap = new HashMap<>();
|
Map<String, Integer> keyMap = new HashMap<>();
|
||||||
@@ -273,7 +274,6 @@ public class ImportUtil {
|
|||||||
cellValue = this.convertDictValue(tag.getDictField(), cellValue);
|
cellValue = this.convertDictValue(tag.getDictField(), cellValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 组织机构
|
// 组织机构
|
||||||
if (FieldShowTypeEnum.SINGLE_ORGANIZATION_DIALOG.getValue().equals(tag.getFieldShowType()) ||
|
if (FieldShowTypeEnum.SINGLE_ORGANIZATION_DIALOG.getValue().equals(tag.getFieldShowType()) ||
|
||||||
FieldShowTypeEnum.MULTI_ORGANIZATION_DIALOG.getValue().equals(tag.getFieldShowType())) {
|
FieldShowTypeEnum.MULTI_ORGANIZATION_DIALOG.getValue().equals(tag.getFieldShowType())) {
|
||||||
@@ -389,6 +389,12 @@ public class ImportUtil {
|
|||||||
parameterMap.put(tag.getDbFieldName(), this.convertInspectContentFile(cellValue, fileMap));
|
parameterMap.put(tag.getDbFieldName(), this.convertInspectContentFile(cellValue, fileMap));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 企标稽查内容文件导入
|
||||||
|
if (FieldCommon.REFERENCE_STANDARD.equals(tag.getDbFieldName()) &&
|
||||||
|
TableNameEnum.ENTERPRISE_STANDARDS.getValue().equals(tag.getIsModel())) {
|
||||||
|
// 将转好的值加入Map
|
||||||
|
parameterMap.put(FieldCommon.REFERENCE_STANDARD, this.convertReferenceStandard(cellValue, fbStandardNoList));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (errMsg.toString().contains("列") || errMsg.toString().contains("重复") || errMsg.toString().contains("已存在")) {
|
if (errMsg.toString().contains("列") || errMsg.toString().contains("重复") || errMsg.toString().contains("已存在")) {
|
||||||
errMsgList.add(errMsg.toString());
|
errMsgList.add(errMsg.toString());
|
||||||
@@ -399,6 +405,34 @@ public class ImportUtil {
|
|||||||
return errMsgList;
|
return errMsgList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private String convertReferenceStandard(String cellValue, List<String> fbStandardNoList) {
|
||||||
|
if (StrUtil.isBlank(cellValue)) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
List<String> standardNoList = new ArrayList<>(Arrays.asList(cellValue.split(",")));
|
||||||
|
Iterator<String> iterator = standardNoList.iterator();
|
||||||
|
List<String> addStandardNoList = new ArrayList<>();
|
||||||
|
while (iterator.hasNext()) {
|
||||||
|
String standardNo = iterator.next();
|
||||||
|
if (standardNo.contains("-") || standardNo.contains("—")) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
List<String> match = fbStandardNoList.stream().filter(s -> s.contains(standardNo)).collect(Collectors.toList());
|
||||||
|
if (!match.isEmpty()) {
|
||||||
|
iterator.remove();
|
||||||
|
addStandardNoList.addAll(match);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
String result = String.join(",", standardNoList);
|
||||||
|
if (!addStandardNoList.isEmpty()) {
|
||||||
|
if (!result.isEmpty()) {
|
||||||
|
result += ",";
|
||||||
|
}
|
||||||
|
result += String.join(",", addStandardNoList);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
// 体系校验
|
// 体系校验
|
||||||
public boolean standardSystemValid(String cellValue, Map<String, List<LawsTreeNode>> treeNodeMap, Map<String, String> treeNodePathMap) {
|
public boolean standardSystemValid(String cellValue, Map<String, List<LawsTreeNode>> treeNodeMap, Map<String, String> treeNodePathMap) {
|
||||||
String[] cellValues = cellValue.split(",");
|
String[] cellValues = cellValue.split(",");
|
||||||
|
|||||||
+1
-1
@@ -43,7 +43,7 @@ public class ManyStandardSelectionBox {
|
|||||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
@ApiModelProperty(value = "实施日期")
|
@ApiModelProperty(value = "实施日期")
|
||||||
private java.util.Date implementationDate;
|
private java.lang.String implementationDate;
|
||||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
@ApiModelProperty(value = "新认证车实施日期")
|
@ApiModelProperty(value = "新认证车实施日期")
|
||||||
|
|||||||
+8
@@ -232,4 +232,12 @@ public interface DocumentSplitMapper extends BaseMapper<LawsDocumentSplit> {
|
|||||||
List<ProcessStandardInterpretClause> selectClauseList(@Param("lawsDocumentSplit") LawsDocumentSplit lawsDocumentSplit);
|
List<ProcessStandardInterpretClause> selectClauseList(@Param("lawsDocumentSplit") LawsDocumentSplit lawsDocumentSplit);
|
||||||
|
|
||||||
List<ProcessStandardComplianceCheckDetail> selectClauseListScc(@Param("lawsDocumentSplit") LawsDocumentSplit lawsDocumentSplit);
|
List<ProcessStandardComplianceCheckDetail> selectClauseListScc(@Param("lawsDocumentSplit") LawsDocumentSplit lawsDocumentSplit);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据适用市场获取条款id
|
||||||
|
* @param countryList
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<String> getSplitSelectIds(List<String> countryList);
|
||||||
}
|
}
|
||||||
|
|||||||
+10
@@ -316,4 +316,14 @@
|
|||||||
SET ${updateSet}
|
SET ${updateSet}
|
||||||
WHERE ${updateCondition}
|
WHERE ${updateCondition}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<select id="getSplitSelectIds" resultType="java.lang.String">
|
||||||
|
select l2.id from laws_domestic_standard l1
|
||||||
|
left join sar_file_split_info l2 on l1.id = l2.standard_id and l2.del_flag = 0
|
||||||
|
where l1.del_flag = 0 and l2.id is not null
|
||||||
|
and
|
||||||
|
<foreach collection="countryList" separator="or" item= "item" open="(" close=")">
|
||||||
|
CONCAT(',',l1.applicable_market,',') like CONCAT('%,',#{item},',%')
|
||||||
|
</foreach>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
+67
-18
@@ -82,6 +82,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
import org.springframework.transaction.support.DefaultTransactionDefinition;
|
import org.springframework.transaction.support.DefaultTransactionDefinition;
|
||||||
import org.springframework.web.util.HtmlUtils;
|
import org.springframework.web.util.HtmlUtils;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
@@ -194,6 +195,7 @@ public class DocumentSplitServiceImpl implements IDocumentSplitService {
|
|||||||
private static final String MENU_ID = "menu_id";
|
private static final String MENU_ID = "menu_id";
|
||||||
private static final String CREATE_TIME = "create_time";
|
private static final String CREATE_TIME = "create_time";
|
||||||
private static final String SPLIT_STATUS = "split_status";
|
private static final String SPLIT_STATUS = "split_status";
|
||||||
|
private static final String COUNTRY = "country";
|
||||||
|
|
||||||
private static final int NUMBER = 500;
|
private static final int NUMBER = 500;
|
||||||
|
|
||||||
@@ -481,25 +483,28 @@ public class DocumentSplitServiceImpl implements IDocumentSplitService {
|
|||||||
// 组织结构
|
// 组织结构
|
||||||
List<LawsTag> lawsTags2 = fieldListSelect.stream()
|
List<LawsTag> lawsTags2 = fieldListSelect.stream()
|
||||||
.filter(j -> FieldCommon.GROUP.contains(j.getFieldShowType())).collect(Collectors.toList());
|
.filter(j -> FieldCommon.GROUP.contains(j.getFieldShowType())).collect(Collectors.toList());
|
||||||
|
List<SysDict> sysDictList = sysDictService.list();
|
||||||
|
List<SysDictItem> sysDictItemList = sysDictItemService.list();
|
||||||
|
List<SysDepart> sysDepartListAll = sysDepartService.list();
|
||||||
records.parallelStream().forEach(map->{
|
records.parallelStream().forEach(map->{
|
||||||
for (LawsTag lawsTag : lawsTags) {
|
for (LawsTag lawsTag : lawsTags) {
|
||||||
String dbFieldName = lawsTag.getDbFieldName();
|
String dbFieldName = lawsTag.getDbFieldName();
|
||||||
if (map.containsKey(dbFieldName)){
|
if (map.containsKey(dbFieldName)){
|
||||||
// 字典查找
|
// 字典查找
|
||||||
SysDict sysDict = sysDictService.getById(lawsTag.getDictId());
|
Optional<SysDict> op = sysDictList.stream().filter(o->Objects.equals(o.getId(),lawsTag.getDictId())).findFirst();
|
||||||
if (!Objects.isNull(sysDict)){
|
op.ifPresent(sysDict -> setDicText(map, dbFieldName, sysDict, sysDictItemList));
|
||||||
setDicText(map, dbFieldName, sysDict);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (LawsTag lawsTag : lawsTags2) {
|
for (LawsTag lawsTag : lawsTags2) {
|
||||||
String dbFieldName = lawsTag.getDbFieldName();
|
String dbFieldName = lawsTag.getDbFieldName();
|
||||||
if (map.containsKey(dbFieldName)){
|
if (map.containsKey(dbFieldName)){
|
||||||
List<SysDepart> sysDepartList =
|
if(!CollectionUtils.isEmpty(sysDepartListAll)){
|
||||||
sysDepartService.listByIds(Arrays.asList(map.get(dbFieldName).toString().split(",")));
|
List<SysDepart> sysDepartList = sysDepartListAll.stream().filter(o->
|
||||||
List<String> itemTextList = sysDepartList.stream().map(SysDepart::getDepartName).collect(Collectors.toList());
|
Arrays.asList(map.get(dbFieldName).toString().split(",")).contains(o.getId()))
|
||||||
map.put(dbFieldName + DocumentSplitCommon.DIC_TEXT, String.join(",", itemTextList));
|
.collect(Collectors.toList());
|
||||||
|
List<String> itemTextList = sysDepartList.stream().map(SysDepart::getDepartName).collect(Collectors.toList());
|
||||||
|
map.put(dbFieldName + DocumentSplitCommon.DIC_TEXT, String.join(",", itemTextList));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 特殊翻译
|
// 特殊翻译
|
||||||
@@ -529,12 +534,14 @@ public class DocumentSplitServiceImpl implements IDocumentSplitService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setDicText(Map<String, Object> map, String dbFieldName, SysDict sysDict) {
|
private void setDicText(Map<String, Object> map, String dbFieldName, SysDict sysDict,List<SysDictItem> sysDictItemList) {
|
||||||
LambdaQueryWrapper<SysDictItem> queryWrapper = new LambdaQueryWrapper<SysDictItem>()
|
if(CollectionUtils.isEmpty(sysDictItemList)){
|
||||||
.eq(SysDictItem::getDictId, sysDict.getId())
|
return;
|
||||||
.in(SysDictItem::getItemValue, Arrays.asList(map.get(dbFieldName).toString().split(",")));
|
}
|
||||||
// 字典值查询
|
// 字典值查询
|
||||||
List<SysDictItem> list = sysDictItemService.list(queryWrapper);
|
List<SysDictItem> list = sysDictItemList.stream().filter(o->Objects.equals(sysDict.getId(),o.getDictId()) &&
|
||||||
|
Arrays.asList(map.get(dbFieldName).toString().split(",")).contains(o.getItemValue()))
|
||||||
|
.collect(Collectors.toList());
|
||||||
if(!list.isEmpty()){
|
if(!list.isEmpty()){
|
||||||
List<String> itemTextList = list.stream().map(SysDictItem::getItemText).collect(Collectors.toList());
|
List<String> itemTextList = list.stream().map(SysDictItem::getItemText).collect(Collectors.toList());
|
||||||
map.put(dbFieldName + DocumentSplitCommon.DIC_TEXT, String.join(",", itemTextList));
|
map.put(dbFieldName + DocumentSplitCommon.DIC_TEXT, String.join(",", itemTextList));
|
||||||
@@ -1480,10 +1487,19 @@ public class DocumentSplitServiceImpl implements IDocumentSplitService {
|
|||||||
if (StringUtils.isNotBlank(splitFileInfo.getStandardSystem())){
|
if (StringUtils.isNotBlank(splitFileInfo.getStandardSystem())){
|
||||||
List<String> list = Arrays.asList(splitFileInfo.getStandardSystem().split(","));
|
List<String> list = Arrays.asList(splitFileInfo.getStandardSystem().split(","));
|
||||||
List<LawsTreeNode> lawsTreeNodeList = lawsTreeNodeService.listByIds(list);
|
List<LawsTreeNode> lawsTreeNodeList = lawsTreeNodeService.listByIds(list);
|
||||||
List<LawsNodeRelation> lawsNodeRelationList = lawsNodeRelationService.list(new LambdaQueryWrapper<LawsNodeRelation>()
|
if(CollectionUtils.isEmpty(lawsTreeNodeList)){
|
||||||
.in(LawsNodeRelation::getNodeId, lawsTreeNodeList.stream().map(LawsTreeNode::getId)
|
return new Page<>();
|
||||||
.collect(Collectors.toList())));
|
}
|
||||||
if (lawsNodeRelationList.isEmpty()){
|
List<String> nodeCode = lawsTreeNodeList.stream().map(LawsTreeNode::getNodeCode).collect(Collectors.toList());
|
||||||
|
LambdaQueryWrapper<LawsNodeRelation> query = new LambdaQueryWrapper<>();
|
||||||
|
for (int i = 0; i < nodeCode.size(); i++) {
|
||||||
|
query.likeRight(LawsNodeRelation::getNodeCode, nodeCode.get(i));
|
||||||
|
if(i != nodeCode.size() - 1){
|
||||||
|
query.or();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
List<LawsNodeRelation> lawsNodeRelationList = lawsNodeRelationService.list(query);
|
||||||
|
if (CollectionUtils.isEmpty(lawsNodeRelationList)){
|
||||||
return new Page<>();
|
return new Page<>();
|
||||||
}
|
}
|
||||||
List<String> idList = lawsNodeRelationList.stream().map(LawsNodeRelation::getUniqueRelationFlag).collect(Collectors.toList());
|
List<String> idList = lawsNodeRelationList.stream().map(LawsNodeRelation::getUniqueRelationFlag).collect(Collectors.toList());
|
||||||
@@ -1764,6 +1780,8 @@ public class DocumentSplitServiceImpl implements IDocumentSplitService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private String getSelectCondition(Map<String, Object> parameter, List<LawsTag> fieldListCondition) {
|
private String getSelectCondition(Map<String, Object> parameter, List<LawsTag> fieldListCondition) {
|
||||||
|
// 防止SQL注入
|
||||||
|
this.checkForSQLInjection(parameter);
|
||||||
// 拼接查询条件
|
// 拼接查询条件
|
||||||
StringBuilder selectCondition = new StringBuilder("where del_flag = 0");
|
StringBuilder selectCondition = new StringBuilder("where del_flag = 0");
|
||||||
// 非动态查询条件
|
// 非动态查询条件
|
||||||
@@ -1773,6 +1791,26 @@ public class DocumentSplitServiceImpl implements IDocumentSplitService {
|
|||||||
return selectCondition.toString();
|
return selectCondition.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void checkForSQLInjection(Map<String, Object> parameterMap) {
|
||||||
|
// 定义要检查的特殊字符
|
||||||
|
String[] specialCharacters = {"'", "\"", "\\", "<", ">", "&", "*", ";"};
|
||||||
|
|
||||||
|
for (Map.Entry<String, Object> entry : parameterMap.entrySet()) {
|
||||||
|
Object value = entry.getValue();
|
||||||
|
|
||||||
|
// 检查是否是字符串类型
|
||||||
|
if (value instanceof String) {
|
||||||
|
String strValue = (String) value;
|
||||||
|
// 检查是否包含特殊字符
|
||||||
|
for (String character : specialCharacters) {
|
||||||
|
if (strValue.contains(character)) {
|
||||||
|
throw new JeroBootException("输入字段中包含非法字符,请检查");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void dynamicStateCondition(Map<String, Object> parameter, List<LawsTag> fieldListCondition, StringBuilder selectCondition) {
|
private void dynamicStateCondition(Map<String, Object> parameter, List<LawsTag> fieldListCondition, StringBuilder selectCondition) {
|
||||||
parameter.forEach((k, v) -> {
|
parameter.forEach((k, v) -> {
|
||||||
// 匹配参数和字段
|
// 匹配参数和字段
|
||||||
@@ -1836,6 +1874,17 @@ public class DocumentSplitServiceImpl implements IDocumentSplitService {
|
|||||||
parameter.remove(MENU_ID);
|
parameter.remove(MENU_ID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 适用市场
|
||||||
|
if (parameter.containsKey(COUNTRY) && !StringUtils.isBlank(parameter.get(COUNTRY).toString())){
|
||||||
|
// 查询市场下的标准
|
||||||
|
List<String> countryList = Arrays.asList(parameter.get(COUNTRY).toString().split(","));
|
||||||
|
List<String> ids = documentSplitMapper.getSplitSelectIds(countryList);
|
||||||
|
if(!CollectionUtils.isEmpty(ids)){
|
||||||
|
// in查询
|
||||||
|
selectCondition.append(" and s.info_id" + " in('").append(String.join("','",ids)).append("')");
|
||||||
|
}
|
||||||
|
parameter.remove(COUNTRY);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
-1
@@ -58,7 +58,6 @@
|
|||||||
sort_index DESC,
|
sort_index DESC,
|
||||||
standard_type_order ASC,
|
standard_type_order ASC,
|
||||||
standard_state_order ASC,
|
standard_state_order ASC,
|
||||||
implementation_date DESC,
|
|
||||||
create_time DESC
|
create_time DESC
|
||||||
</select>
|
</select>
|
||||||
<select id="getCount1" resultType="com.jero.modules.laws.home.vo.LawsHomeNormalSearchCountVO">
|
<select id="getCount1" resultType="com.jero.modules.laws.home.vo.LawsHomeNormalSearchCountVO">
|
||||||
|
|||||||
+73
-70
@@ -23,7 +23,6 @@ import com.jero.common.util.oConvertUtils;
|
|||||||
import com.jero.modules.document.utils.ReadPdfUtil;
|
import com.jero.modules.document.utils.ReadPdfUtil;
|
||||||
import com.jero.modules.document.utils.ReadWordUtil;
|
import com.jero.modules.document.utils.ReadWordUtil;
|
||||||
import com.jero.modules.laws.common.constant.FieldCommon;
|
import com.jero.modules.laws.common.constant.FieldCommon;
|
||||||
import com.jero.modules.laws.common.mapper.LawsCommonMapper;
|
|
||||||
import com.jero.modules.laws.common.service.ILawsCommonService;
|
import com.jero.modules.laws.common.service.ILawsCommonService;
|
||||||
import com.jero.modules.laws.documenttool.service.IDocumentSplitService;
|
import com.jero.modules.laws.documenttool.service.IDocumentSplitService;
|
||||||
import com.jero.modules.laws.home.common.LawsHomeSearchCommon;
|
import com.jero.modules.laws.home.common.LawsHomeSearchCommon;
|
||||||
@@ -34,8 +33,6 @@ import com.jero.modules.laws.home.mapper.LawsHomeSearchMapper;
|
|||||||
import com.jero.modules.laws.home.service.ILawsHomeNormalSearchHistoryService;
|
import com.jero.modules.laws.home.service.ILawsHomeNormalSearchHistoryService;
|
||||||
import com.jero.modules.laws.home.service.ILawsHomeSearchService;
|
import com.jero.modules.laws.home.service.ILawsHomeSearchService;
|
||||||
import com.jero.modules.laws.home.vo.*;
|
import com.jero.modules.laws.home.vo.*;
|
||||||
import com.jero.modules.laws.standard.controller.LawsDomesticController;
|
|
||||||
import com.jero.modules.laws.standard.controller.LawsEnterpriseController;
|
|
||||||
import com.jero.modules.laws.standard.entity.LawsDomesticStandard;
|
import com.jero.modules.laws.standard.entity.LawsDomesticStandard;
|
||||||
import com.jero.modules.laws.standard.entity.LawsEnterpriseStandard;
|
import com.jero.modules.laws.standard.entity.LawsEnterpriseStandard;
|
||||||
import com.jero.modules.laws.standard.entity.LawsNewsFeed;
|
import com.jero.modules.laws.standard.entity.LawsNewsFeed;
|
||||||
@@ -49,7 +46,6 @@ import com.jero.modules.split.entity.SarFileSplitInfoEO;
|
|||||||
import com.jero.modules.split.entity.SarFileSplitItemsValEO;
|
import com.jero.modules.split.entity.SarFileSplitItemsValEO;
|
||||||
import com.jero.modules.split.mapper.SarFileSplitItemsValEOMapper;
|
import com.jero.modules.split.mapper.SarFileSplitItemsValEOMapper;
|
||||||
import com.jero.modules.split.service.ISarFileSplitInfoService;
|
import com.jero.modules.split.service.ISarFileSplitInfoService;
|
||||||
import com.jero.modules.system.service.ISysDictItemService;
|
|
||||||
import com.jero.modules.system.service.ISysDictService;
|
import com.jero.modules.system.service.ISysDictService;
|
||||||
import com.jero.modules.tag.entity.LawsTag;
|
import com.jero.modules.tag.entity.LawsTag;
|
||||||
import com.jero.modules.tag.enums.TableNameEnum;
|
import com.jero.modules.tag.enums.TableNameEnum;
|
||||||
@@ -113,16 +109,8 @@ public class LawsHomeSearchServiceImpl implements ILawsHomeSearchService {
|
|||||||
@Resource
|
@Resource
|
||||||
private ILawsTagService lawsTagService;
|
private ILawsTagService lawsTagService;
|
||||||
@Resource
|
@Resource
|
||||||
private LawsDomesticController lawsDomesticController;
|
|
||||||
@Resource
|
|
||||||
private LawsEnterpriseController lawsEnterpriseController;
|
|
||||||
@Resource
|
|
||||||
private LawsCommonMapper lawsCommonMapper;
|
|
||||||
@Resource
|
|
||||||
private ISysDictService sysDictService;
|
private ISysDictService sysDictService;
|
||||||
@Resource
|
@Resource
|
||||||
private ISysDictItemService sysDictItemService;
|
|
||||||
@Resource
|
|
||||||
private SarFileSplitItemsValEOMapper sarFileSplitItemsValEOMapper;
|
private SarFileSplitItemsValEOMapper sarFileSplitItemsValEOMapper;
|
||||||
@Resource
|
@Resource
|
||||||
private IDocumentSplitService documentSplitService;
|
private IDocumentSplitService documentSplitService;
|
||||||
@@ -222,46 +210,49 @@ public class LawsHomeSearchServiceImpl implements ILawsHomeSearchService {
|
|||||||
private QueryWrapper<LawsHomeNormalSearchDTO> getQueryWrapperNormal(LawsHomeNormalSearchDTO lawsHomeNormalSearchDTO) {
|
private QueryWrapper<LawsHomeNormalSearchDTO> getQueryWrapperNormal(LawsHomeNormalSearchDTO lawsHomeNormalSearchDTO) {
|
||||||
String[] searchContent = lawsHomeNormalSearchDTO.getSearchContent().split(BLANK_SPACE);
|
String[] searchContent = lawsHomeNormalSearchDTO.getSearchContent().split(BLANK_SPACE);
|
||||||
searchContent = Arrays.stream(searchContent).distinct().toArray(String[]::new);
|
searchContent = Arrays.stream(searchContent).distinct().toArray(String[]::new);
|
||||||
StringBuilder regexp = new StringBuilder();
|
StringBuilder re = new StringBuilder();
|
||||||
StringBuilder select = new StringBuilder();
|
StringBuilder select = new StringBuilder();
|
||||||
select.append("( ");
|
|
||||||
for (int i = 0; i < searchContent.length; i++) {
|
|
||||||
regexp.append(searchContent[i]);
|
|
||||||
StringBuilder ss = new StringBuilder();
|
|
||||||
if(isNumericAndAlphabetic(searchContent[i])){
|
|
||||||
// 英文 数字
|
|
||||||
replaceLength(searchContent, i, ss, " ");
|
|
||||||
}else{
|
|
||||||
// 中文
|
|
||||||
replaceLength(searchContent, i, ss, " ");
|
|
||||||
ss.append(" ");
|
|
||||||
}
|
|
||||||
String str = ss.toString();
|
|
||||||
select.append(" ABS(LENGTH(standard_name) - LENGTH(REPLACE(standard_name, '").append(searchContent[i])
|
|
||||||
.append("',").append(" '").append(str).append("'))) ");
|
|
||||||
if(i != searchContent.length - 1){
|
|
||||||
regexp.append("|");
|
|
||||||
select.append("+");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
select.append(") as sort_index");
|
|
||||||
QueryWrapper<LawsHomeNormalSearchDTO> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<LawsHomeNormalSearchDTO> queryWrapper = new QueryWrapper<>();
|
||||||
|
select.append("( ");
|
||||||
|
String[] finalSearchContent = searchContent;
|
||||||
|
queryWrapper.and(o->{
|
||||||
|
for (int i = 0; i < finalSearchContent.length; i++) {
|
||||||
|
o.like("standard_name",finalSearchContent[i]);
|
||||||
|
re.append(finalSearchContent[i]);
|
||||||
|
StringBuilder ss = new StringBuilder();
|
||||||
|
if(isNumericAndAlphabetic(finalSearchContent[i])){
|
||||||
|
// 英文 数字
|
||||||
|
replaceLength(finalSearchContent, i, ss, " ");
|
||||||
|
}else{
|
||||||
|
// 中文
|
||||||
|
replaceLength(finalSearchContent, i, ss, " ");
|
||||||
|
ss.append(" ");
|
||||||
|
}
|
||||||
|
String str = ss.toString();
|
||||||
|
select.append(" ABS(LENGTH(standard_name) - LENGTH(REPLACE(standard_name, '").append(finalSearchContent[i])
|
||||||
|
.append("',").append(" '").append(str).append("'))) ");
|
||||||
|
if(i != finalSearchContent.length - 1){
|
||||||
|
o.or();
|
||||||
|
select.append("+");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
select.append(") as sort_index");
|
||||||
|
|
||||||
queryWrapper.select("id,standard_name,resource_type," +
|
queryWrapper.select("id,standard_name,resource_type," +
|
||||||
"create_time,standard_type_order,standard_state_order,standard_class," +
|
"create_time,standard_type_order,standard_state_order,standard_class," +
|
||||||
"dynamic_type,applicable_vehicle," +
|
"dynamic_type,applicable_vehicle," +
|
||||||
"standard_state,standard_code,grade_classification,implementation_date, " + select);
|
"standard_state,standard_code,grade_classification,implementation_date, " + select);
|
||||||
|
|
||||||
queryWrapper.and(s->s.apply("standard_name REGEXP '" + regexp.toString() + "'"));
|
|
||||||
queryWrapper.eq(!StringUtils.isEmpty(lawsHomeNormalSearchDTO.getResourceType()),RESOURCE_TYPE,lawsHomeNormalSearchDTO.getResourceType());
|
queryWrapper.eq(!StringUtils.isEmpty(lawsHomeNormalSearchDTO.getResourceType()),RESOURCE_TYPE,lawsHomeNormalSearchDTO.getResourceType());
|
||||||
String str = "',','))";
|
queryWrapper.like(!StringUtils.isEmpty(lawsHomeNormalSearchDTO.getStandardClass()),"concat(',',standard_class,',')","," + lawsHomeNormalSearchDTO.getStandardClass() + ",");
|
||||||
queryWrapper.gt(!StringUtils.isEmpty(lawsHomeNormalSearchDTO.getStandardClass()),"instr(concat(',',standard_class,','),concat(',','" + lawsHomeNormalSearchDTO.getStandardClass() + str,0);
|
queryWrapper.like(!StringUtils.isEmpty(lawsHomeNormalSearchDTO.getDynamicType()),"concat(',',dynamic_type,',')","," + lawsHomeNormalSearchDTO.getDynamicType() + ",");
|
||||||
queryWrapper.gt(!StringUtils.isEmpty(lawsHomeNormalSearchDTO.getDynamicType()),"instr(concat(',',dynamic_type,','),concat(',','" + lawsHomeNormalSearchDTO.getDynamicType() + str,0);
|
queryWrapper.like(!StringUtils.isEmpty(lawsHomeNormalSearchDTO.getApplicableVehicle()),"concat(',',applicable_vehicle,',')","," + lawsHomeNormalSearchDTO.getApplicableVehicle() + ",");
|
||||||
queryWrapper.gt(!StringUtils.isEmpty(lawsHomeNormalSearchDTO.getApplicableVehicle()),"instr(concat(',',applicable_vehicle,','),concat(',','" + lawsHomeNormalSearchDTO.getApplicableVehicle() + str,0);
|
queryWrapper.like(!StringUtils.isEmpty(lawsHomeNormalSearchDTO.getStandardProperty()),"concat(',',type,',')","," + lawsHomeNormalSearchDTO.getStandardProperty() + ",");
|
||||||
queryWrapper.gt(!StringUtils.isEmpty(lawsHomeNormalSearchDTO.getStandardProperty()),"instr(concat(',',type,','),concat(',','" + lawsHomeNormalSearchDTO.getStandardProperty() + str,0);
|
queryWrapper.like(!StringUtils.isEmpty(lawsHomeNormalSearchDTO.getStandardState()),"concat(',',standard_state,',')", "," + lawsHomeNormalSearchDTO.getStandardState() + ",");
|
||||||
queryWrapper.gt(!StringUtils.isEmpty(lawsHomeNormalSearchDTO.getStandardState()),"instr(concat(',',standard_state,','), concat(',','" + lawsHomeNormalSearchDTO.getStandardState() + str,0);
|
queryWrapper.like(!StringUtils.isEmpty(lawsHomeNormalSearchDTO.getCategoryCode()),"concat(',',category_code,',')","," + lawsHomeNormalSearchDTO.getCategoryCode() + ",");
|
||||||
queryWrapper.gt(!StringUtils.isEmpty(lawsHomeNormalSearchDTO.getCategoryCode()),"instr(concat(',',category_code,','),concat(',','" + lawsHomeNormalSearchDTO.getCategoryCode() + str,0);
|
queryWrapper.like(!StringUtils.isEmpty(lawsHomeNormalSearchDTO.getEnterpriseStandardState()),"concat(',',standard_state,',')","," + lawsHomeNormalSearchDTO.getEnterpriseStandardState() + ",");
|
||||||
queryWrapper.gt(!StringUtils.isEmpty(lawsHomeNormalSearchDTO.getEnterpriseStandardState()),"instr(concat(',',standard_state,','), concat(',','" + lawsHomeNormalSearchDTO.getEnterpriseStandardState() + str,0);
|
queryWrapper.like(!StringUtils.isEmpty(lawsHomeNormalSearchDTO.getApplicableMarket()),"concat(',',applicable_market,',')","," + lawsHomeNormalSearchDTO.getApplicableMarket() + ",");
|
||||||
queryWrapper.gt(!StringUtils.isEmpty(lawsHomeNormalSearchDTO.getApplicableMarket()),"instr(concat(',',applicable_market,','),concat(',','" + lawsHomeNormalSearchDTO.getApplicableMarket() + str,0);
|
|
||||||
return queryWrapper;
|
return queryWrapper;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -501,25 +492,25 @@ public class LawsHomeSearchServiceImpl implements ILawsHomeSearchService {
|
|||||||
QueryWrapper<LawsHomeNormalSearchDTO> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<LawsHomeNormalSearchDTO> queryWrapper = new QueryWrapper<>();
|
||||||
String[] text = searchContent.split(BLANK_SPACE);
|
String[] text = searchContent.split(BLANK_SPACE);
|
||||||
|
|
||||||
StringBuilder regexp = new StringBuilder();
|
queryWrapper.and(o->{
|
||||||
for (int i = 0; i < text.length; i++) {
|
for (int i = 0; i < text.length; i++) {
|
||||||
regexp.append(text[i]);
|
o.like("CONCAT_WS(' ',standard_number,standard_name)",text[i]);
|
||||||
if(i != text.length - 1){
|
if(i != text.length - 1){
|
||||||
regexp.append("|");
|
o.or();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
|
|
||||||
queryWrapper.and(s->s.apply("CONCAT_WS(' ',standard_number,standard_name) REGEXP '" + regexp + "'"));
|
|
||||||
queryWrapper.eq("del_flag",0);
|
queryWrapper.eq("del_flag",0);
|
||||||
String str = "',','))";
|
|
||||||
queryWrapper.gt(!StringUtils.isEmpty(lawsHomeNormalSearchDTO.getStandardClass()),"instr(concat(',',standard_class,','),concat(',','" + lawsHomeNormalSearchDTO.getStandardClass() + str,0);
|
queryWrapper.like(!StringUtils.isEmpty(lawsHomeNormalSearchDTO.getStandardClass()),"concat(',',standard_class,',')","," + lawsHomeNormalSearchDTO.getStandardClass() + ",");
|
||||||
queryWrapper.gt(!StringUtils.isEmpty(lawsHomeNormalSearchDTO.getDynamicType()),"instr(concat(',',dynamic_type,','),concat(',','" + lawsHomeNormalSearchDTO.getDynamicType() + str,0);
|
queryWrapper.like(!StringUtils.isEmpty(lawsHomeNormalSearchDTO.getDynamicType()),"concat(',',dynamic_type,',')","," + lawsHomeNormalSearchDTO.getDynamicType() + ",");
|
||||||
queryWrapper.gt(!StringUtils.isEmpty(lawsHomeNormalSearchDTO.getApplicableVehicle()),"instr(concat(',',applicable_vehicle,','),concat(',','" + lawsHomeNormalSearchDTO.getApplicableVehicle() + str,0);
|
queryWrapper.like(!StringUtils.isEmpty(lawsHomeNormalSearchDTO.getApplicableVehicle()),"concat(',',applicable_vehicle,',')","," + lawsHomeNormalSearchDTO.getApplicableVehicle() + ",");
|
||||||
queryWrapper.gt(!StringUtils.isEmpty(lawsHomeNormalSearchDTO.getStandardProperty()),"instr(concat(',',type,','),concat(',','" + lawsHomeNormalSearchDTO.getStandardProperty() + str,0);
|
queryWrapper.like(!StringUtils.isEmpty(lawsHomeNormalSearchDTO.getStandardProperty()),"concat(',',type,',')","," + lawsHomeNormalSearchDTO.getStandardProperty() + ",");
|
||||||
queryWrapper.gt(!StringUtils.isEmpty(lawsHomeNormalSearchDTO.getStandardState()),"instr(concat(',',standard_state,','),concat(',','" + lawsHomeNormalSearchDTO.getStandardState() + str,0);
|
queryWrapper.like(!StringUtils.isEmpty(lawsHomeNormalSearchDTO.getStandardState()),"concat(',',standard_state,',')","," + lawsHomeNormalSearchDTO.getStandardState() + ",");
|
||||||
queryWrapper.gt(!StringUtils.isEmpty(lawsHomeNormalSearchDTO.getCategoryCode()),"instr(concat(',',category_code,','),concat(',','" + lawsHomeNormalSearchDTO.getCategoryCode() + str,0);
|
queryWrapper.like(!StringUtils.isEmpty(lawsHomeNormalSearchDTO.getCategoryCode()),"concat(',',category_code,',')","," + lawsHomeNormalSearchDTO.getCategoryCode() + ",");
|
||||||
queryWrapper.gt(!StringUtils.isEmpty(lawsHomeNormalSearchDTO.getEnterpriseStandardState()),"instr(concat(',',standard_state,','),concat(',','" + lawsHomeNormalSearchDTO.getEnterpriseStandardState() + str,0);
|
queryWrapper.like(!StringUtils.isEmpty(lawsHomeNormalSearchDTO.getEnterpriseStandardState()),"concat(',',standard_state,',')","," + lawsHomeNormalSearchDTO.getEnterpriseStandardState() + ",");
|
||||||
queryWrapper.gt(!StringUtils.isEmpty(lawsHomeNormalSearchDTO.getApplicableMarket()),"instr(concat(',',applicable_market,','),concat(',','" + lawsHomeNormalSearchDTO.getApplicableMarket() + str,0);
|
queryWrapper.like(!StringUtils.isEmpty(lawsHomeNormalSearchDTO.getApplicableMarket()),"concat(',',applicable_market,',')","," + lawsHomeNormalSearchDTO.getApplicableMarket() + ",");
|
||||||
// queryWrapper.gt(!StringUtils.isEmpty(lawsHomeNormalSearchDTO.getGradeClassification()),"instr(concat(',',grade_classification,','),concat(',','" + lawsHomeNormalSearchDTO.getGradeClassification() + str,0);
|
// queryWrapper.gt(!StringUtils.isEmpty(lawsHomeNormalSearchDTO.getGradeClassification()),"instr(concat(',',grade_classification,','),concat(',','" + lawsHomeNormalSearchDTO.getGradeClassification() + str,0);
|
||||||
|
|
||||||
switch (lawsHomeNormalSearchDTO.getResourceType()){
|
switch (lawsHomeNormalSearchDTO.getResourceType()){
|
||||||
@@ -764,12 +755,12 @@ public class LawsHomeSearchServiceImpl implements ILawsHomeSearchService {
|
|||||||
// mDesc44.put(order,"desc");
|
// mDesc44.put(order,"desc");
|
||||||
// m33.put("release_date",mDesc44);
|
// m33.put("release_date",mDesc44);
|
||||||
// sort.add(m33);
|
// sort.add(m33);
|
||||||
|
// 实施日期改成多选,去掉了排序
|
||||||
Map<String,Object> m4 = new HashMap<>();
|
// Map<String,Object> m4 = new HashMap<>();
|
||||||
Map<String,Object> mDesc4 = new HashMap<>();
|
// Map<String,Object> mDesc4 = new HashMap<>();
|
||||||
mDesc4.put(order,"desc");
|
// mDesc4.put(order,"desc");
|
||||||
m4.put(IMPLEMENTATION_DATE,mDesc4);
|
// m4.put(IMPLEMENTATION_DATE,mDesc4);
|
||||||
sort.add(m4);
|
// sort.add(m4);
|
||||||
|
|
||||||
Map<String,Object> m5 = new HashMap<>();
|
Map<String,Object> m5 = new HashMap<>();
|
||||||
Map<String,Object> mDesc5 = new HashMap<>();
|
Map<String,Object> mDesc5 = new HashMap<>();
|
||||||
@@ -1220,7 +1211,11 @@ public class LawsHomeSearchServiceImpl implements ILawsHomeSearchService {
|
|||||||
if(!Objects.isNull(lawsEnterpriseStandard)){
|
if(!Objects.isNull(lawsEnterpriseStandard)){
|
||||||
lawsHomeNormalSearchExportExcelVO.setStandardName(lawsEnterpriseStandard.getStandardName());
|
lawsHomeNormalSearchExportExcelVO.setStandardName(lawsEnterpriseStandard.getStandardName());
|
||||||
lawsHomeNormalSearchExportExcelVO.setStandardNumber(lawsEnterpriseStandard.getStandardNumber());
|
lawsHomeNormalSearchExportExcelVO.setStandardNumber(lawsEnterpriseStandard.getStandardNumber());
|
||||||
lawsHomeNormalSearchExportExcelVO.setImplementationDate(lawsEnterpriseStandard.getImplementationDate());
|
if(!Objects.isNull(lawsEnterpriseStandard.getImplementationDate())){
|
||||||
|
lawsHomeNormalSearchExportExcelVO.
|
||||||
|
setImplementationDate(new SimpleDateFormat("yyyy-MM-dd").
|
||||||
|
format(lawsEnterpriseStandard.getImplementationDate()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
lawsHomeNormalSearchExportExcelVOList.add(lawsHomeNormalSearchExportExcelVO);
|
lawsHomeNormalSearchExportExcelVOList.add(lawsHomeNormalSearchExportExcelVO);
|
||||||
@@ -1273,7 +1268,12 @@ public class LawsHomeSearchServiceImpl implements ILawsHomeSearchService {
|
|||||||
if(!Objects.isNull(lawsEnterpriseStandard)){
|
if(!Objects.isNull(lawsEnterpriseStandard)){
|
||||||
lawsHomeNormalSearchExportExcelVO.setStandardName(lawsEnterpriseStandard.getStandardName());
|
lawsHomeNormalSearchExportExcelVO.setStandardName(lawsEnterpriseStandard.getStandardName());
|
||||||
lawsHomeNormalSearchExportExcelVO.setStandardNumber(lawsEnterpriseStandard.getStandardNumber());
|
lawsHomeNormalSearchExportExcelVO.setStandardNumber(lawsEnterpriseStandard.getStandardNumber());
|
||||||
lawsHomeNormalSearchExportExcelVO.setImplementationDate(lawsEnterpriseStandard.getImplementationDate());
|
if(!Objects.isNull(lawsEnterpriseStandard.getImplementationDate())){
|
||||||
|
lawsHomeNormalSearchExportExcelVO.setImplementationDate(
|
||||||
|
new SimpleDateFormat("yyyy-MM-dd")
|
||||||
|
.format(lawsEnterpriseStandard.getImplementationDate()));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
lawsHomeNormalSearchExportExcelVOList.add(lawsHomeNormalSearchExportExcelVO);
|
lawsHomeNormalSearchExportExcelVOList.add(lawsHomeNormalSearchExportExcelVO);
|
||||||
@@ -1841,7 +1841,10 @@ public class LawsHomeSearchServiceImpl implements ILawsHomeSearchService {
|
|||||||
case "7": obj.setStandardStateOrder("2");break;
|
case "7": obj.setStandardStateOrder("2");break;
|
||||||
default: obj.setStandardStateOrder("4");break;
|
default: obj.setStandardStateOrder("4");break;
|
||||||
}
|
}
|
||||||
obj.setImplementationDate(lawsEnterpriseStandard.getImplementationDate());
|
if(!Objects.isNull(lawsEnterpriseStandard.getImplementationDate())){
|
||||||
|
obj.setImplementationDate(new SimpleDateFormat("yyyy-MM-dd")
|
||||||
|
.format(lawsEnterpriseStandard.getImplementationDate()));
|
||||||
|
}
|
||||||
obj.setCreateTime(lawsEnterpriseStandard.getCreateTime());
|
obj.setCreateTime(lawsEnterpriseStandard.getCreateTime());
|
||||||
obj.setReleaseDate(lawsEnterpriseStandard.getReleaseDate());
|
obj.setReleaseDate(lawsEnterpriseStandard.getReleaseDate());
|
||||||
obj.setStandardState(lawsEnterpriseStandard.getStandardState());
|
obj.setStandardState(lawsEnterpriseStandard.getStandardState());
|
||||||
@@ -2021,9 +2024,9 @@ public class LawsHomeSearchServiceImpl implements ILawsHomeSearchService {
|
|||||||
map.put(ENTERPRISE_STANDARD_STATE,"," + (StringUtils.isBlank(obj.getEnterpriseStandardState()) ? "" : obj.getEnterpriseStandardState()) + ",");
|
map.put(ENTERPRISE_STANDARD_STATE,"," + (StringUtils.isBlank(obj.getEnterpriseStandardState()) ? "" : obj.getEnterpriseStandardState()) + ",");
|
||||||
map.put("applicable_market","," + (StringUtils.isBlank(obj.getApplicableMarket()) ? "" : obj.getApplicableMarket()) + ",");
|
map.put("applicable_market","," + (StringUtils.isBlank(obj.getApplicableMarket()) ? "" : obj.getApplicableMarket()) + ",");
|
||||||
map.put("release_date",obj.getReleaseDate());
|
map.put("release_date",obj.getReleaseDate());
|
||||||
|
map.put(IMPLEMENTATION_DATE,StringUtils.isBlank(obj.getImplementationDate()) ? "" : obj.getImplementationDate());
|
||||||
// 没有时间 强行加入最早时间
|
// 没有时间 强行加入最早时间
|
||||||
try {
|
try {
|
||||||
map.put(IMPLEMENTATION_DATE,Objects.isNull(obj.getImplementationDate()) ? new SimpleDateFormat(YYYY_MM_DD).parse("1900-01-01") : obj.getImplementationDate());
|
|
||||||
map.put("create_time_c",Objects.isNull(obj.getCreateTime()) ? new SimpleDateFormat(YYYY_MM_DD).parse("1900-01-01") : obj.getCreateTime());
|
map.put("create_time_c",Objects.isNull(obj.getCreateTime()) ? new SimpleDateFormat(YYYY_MM_DD).parse("1900-01-01") : obj.getCreateTime());
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
log.error("文档库添加es失败",e);
|
log.error("文档库添加es失败",e);
|
||||||
|
|||||||
+2
-2
@@ -41,6 +41,6 @@ public class LawsHomeNormalSearchExportExcelVO implements Serializable {
|
|||||||
* 实施日期
|
* 实施日期
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "实施日期")
|
@ApiModelProperty(value = "实施日期")
|
||||||
@Excel(name = "实施日期", width = 20, format = "yyyy-MM-dd")
|
@Excel(name = "实施日期", width = 20)
|
||||||
private Date implementationDate;
|
private String implementationDate;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -107,7 +107,7 @@ public class LawsHomeNormalSearchVO implements Serializable {
|
|||||||
@ApiModelProperty(value = "实施日期")
|
@ApiModelProperty(value = "实施日期")
|
||||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
private Date implementationDate;
|
private String implementationDate;
|
||||||
/**
|
/**
|
||||||
* 入库时间
|
* 入库时间
|
||||||
*/
|
*/
|
||||||
|
|||||||
+2
-2
@@ -68,7 +68,7 @@ public class LawsStandardEarlyWarningServiceImpl implements ILawsStandardEarlyWa
|
|||||||
// 获取当前日期往前90天以内创建的外部标准
|
// 获取当前日期往前90天以内创建的外部标准
|
||||||
LambdaQueryWrapper<LawsDomesticStandard> queryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<LawsDomesticStandard> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
queryWrapper.ne(LawsDomesticStandard::getStandardState, OutStandardStateEnum.ABOLISH.getStateValue());
|
queryWrapper.ne(LawsDomesticStandard::getStandardState, OutStandardStateEnum.ABOLISH.getStateValue());
|
||||||
queryWrapper.between(LawsDomesticStandard::getCreateTime, LocalDateTime.now().minusDays(90), LocalDateTime.now());
|
queryWrapper.ge(LawsDomesticStandard::getCreateTime, LocalDateTime.now().minusDays(90));
|
||||||
queryWrapper.orderByDesc(LawsDomesticStandard::getCreateTime);
|
queryWrapper.orderByDesc(LawsDomesticStandard::getCreateTime);
|
||||||
IPage<LawsDomesticStandard> page = new Page<>(pageNo, pageSize);
|
IPage<LawsDomesticStandard> page = new Page<>(pageNo, pageSize);
|
||||||
return domesticStandardService.page(page, queryWrapper);
|
return domesticStandardService.page(page, queryWrapper);
|
||||||
@@ -79,7 +79,7 @@ public class LawsStandardEarlyWarningServiceImpl implements ILawsStandardEarlyWa
|
|||||||
// 获取当前日期往前90天以内创建的企业标准
|
// 获取当前日期往前90天以内创建的企业标准
|
||||||
LambdaQueryWrapper<LawsEnterpriseStandard> queryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<LawsEnterpriseStandard> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
queryWrapper.ne(LawsEnterpriseStandard::getStandardState, StandardStateEnum.ABOLISH.getStateValue());
|
queryWrapper.ne(LawsEnterpriseStandard::getStandardState, StandardStateEnum.ABOLISH.getStateValue());
|
||||||
queryWrapper.between(LawsEnterpriseStandard::getCreateTime, LocalDateTime.now().minusDays(90), LocalDateTime.now());
|
queryWrapper.ge(LawsEnterpriseStandard::getCreateTime, LocalDateTime.now().minusDays(90));
|
||||||
queryWrapper.orderByDesc(LawsEnterpriseStandard::getCreateTime);
|
queryWrapper.orderByDesc(LawsEnterpriseStandard::getCreateTime);
|
||||||
IPage<LawsEnterpriseStandard> page = new Page<>(pageNo, pageSize);
|
IPage<LawsEnterpriseStandard> page = new Page<>(pageNo, pageSize);
|
||||||
IPage<LawsEnterpriseStandard> dataPage = enterpriseStandardService.page(page, queryWrapper);
|
IPage<LawsEnterpriseStandard> dataPage = enterpriseStandardService.page(page, queryWrapper);
|
||||||
|
|||||||
+1
-1
@@ -74,6 +74,6 @@
|
|||||||
<foreach collection="str" separator="," open="(" close=")" item="item">
|
<foreach collection="str" separator="," open="(" close=")" item="item">
|
||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
order by s2.create_time asc
|
order by s2.item_value asc limit 1
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
+1
-1
@@ -98,7 +98,7 @@ public class LawsDomesticStandard implements Serializable {
|
|||||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||||
@ApiModelProperty(value = "实施日期")
|
@ApiModelProperty(value = "实施日期")
|
||||||
private java.util.Date implementationDate;
|
private java.lang.String implementationDate;
|
||||||
/**在产车实施日期*/
|
/**在产车实施日期*/
|
||||||
@Excel(name = "新认证车实施日期", width = 15)
|
@Excel(name = "新认证车实施日期", width = 15)
|
||||||
@ApiModelProperty(value = "新认证车实施日期")
|
@ApiModelProperty(value = "新认证车实施日期")
|
||||||
|
|||||||
@@ -39,8 +39,30 @@ public class ExcelExportUtilPro {
|
|||||||
@ApiModelProperty(value = "id")
|
@ApiModelProperty(value = "id")
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
@Excel(name = "附件/佐证材料", width = 15)
|
@Excel(name = "附件", width = 15)
|
||||||
@ApiModelProperty(value = "附件/佐证材料")
|
@ApiModelProperty(value = "附件")
|
||||||
|
private String fileName;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Setter
|
||||||
|
@Getter
|
||||||
|
public static class MaterialFile {
|
||||||
|
@ApiModelProperty(value = "id")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@Excel(name = "佐证材料", width = 15)
|
||||||
|
@ApiModelProperty(value = "佐证材料")
|
||||||
|
private String fileName;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Setter
|
||||||
|
@Getter
|
||||||
|
public static class UnsatisfiedRequireAttachFile {
|
||||||
|
@ApiModelProperty(value = "id")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@Excel(name = "辅助说明材料", width = 15)
|
||||||
|
@ApiModelProperty(value = "辅助说明材料")
|
||||||
private String fileName;
|
private String fileName;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -78,9 +100,10 @@ public class ExcelExportUtilPro {
|
|||||||
return cellStyle;
|
return cellStyle;
|
||||||
}
|
}
|
||||||
|
|
||||||
public <T> void settleDocuments(String url, String folderName, List<T> items,
|
public <T, R> void settleDocuments(String url, String folderName, List<T> items,
|
||||||
Function<T, List<String>> fileIdProvider,
|
Function<T, List<String>> fileIdProvider,
|
||||||
BiConsumer<T, List<FileDetails>> fileDetailsConsumer) throws IOException {
|
BiConsumer<T, List<R>> fileDetailsConsumer,
|
||||||
|
Class<R> fileDetailsClass) throws IOException {
|
||||||
// 构建完整的文件夹路径
|
// 构建完整的文件夹路径
|
||||||
String directoryPath = url + File.separator + folderName;
|
String directoryPath = url + File.separator + folderName;
|
||||||
|
|
||||||
@@ -95,7 +118,8 @@ public class ExcelExportUtilPro {
|
|||||||
if (fileIdList != null && !fileIdList.isEmpty()) {
|
if (fileIdList != null && !fileIdList.isEmpty()) {
|
||||||
List<OSSFile> ossFileList = ossFileService.listByIds(fileIdList);
|
List<OSSFile> ossFileList = ossFileService.listByIds(fileIdList);
|
||||||
if (!ossFileList.isEmpty()) {
|
if (!ossFileList.isEmpty()) {
|
||||||
List<FileDetails> fileDetailsList = BeanCopyUtils.copyBeanList(ossFileList, FileDetails.class);
|
// 将OSSFile列表复制为泛型R的列表
|
||||||
|
List<R> fileDetailsList = BeanCopyUtils.copyBeanList(ossFileList, fileDetailsClass);
|
||||||
fileDetailsConsumer.accept(item, fileDetailsList);
|
fileDetailsConsumer.accept(item, fileDetailsList);
|
||||||
for (OSSFile ossFile : ossFileList) {
|
for (OSSFile ossFile : ossFileList) {
|
||||||
InputStream inputStream = ObsBootUtil.getOssFile(ossFile.getUrl());
|
InputStream inputStream = ObsBootUtil.getOssFile(ossFile.getUrl());
|
||||||
@@ -110,6 +134,7 @@ public class ExcelExportUtilPro {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void writeToLocal(String filePath, InputStream input) throws IOException {
|
public void writeToLocal(String filePath, InputStream input) throws IOException {
|
||||||
int index;
|
int index;
|
||||||
byte[] bytes = new byte[1024];
|
byte[] bytes = new byte[1024];
|
||||||
|
|||||||
+1
-2
@@ -92,9 +92,8 @@ public class FileSplitItemsEOController extends JeroController<SarFileSplitItems
|
|||||||
@PostMapping(value = "/importSplitResult")
|
@PostMapping(value = "/importSplitResult")
|
||||||
@RequiresPermissions("split:sarFileSplitInfo:splitResult")
|
@RequiresPermissions("split:sarFileSplitInfo:splitResult")
|
||||||
public Result<?> importSplitResult(@ApiParam("标准拆分条id") String splitFileId,
|
public Result<?> importSplitResult(@ApiParam("标准拆分条id") String splitFileId,
|
||||||
@ApiParam("国际化") String cut,
|
|
||||||
SarFileSplitInfoEO splitInfoEO) throws IOException {
|
SarFileSplitInfoEO splitInfoEO) throws IOException {
|
||||||
cut = CutUtils.getCurrentCut();
|
String cut = CutUtils.getCurrentCut();
|
||||||
return fileSplitItemsEOService.importSplitResult(splitFileId, cut,splitInfoEO);
|
return fileSplitItemsEOService.importSplitResult(splitFileId, cut,splitInfoEO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
|||||||
import com.jero.common.aspect.annotation.Dict;
|
import com.jero.common.aspect.annotation.Dict;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import io.swagger.annotations.ApiParam;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
@@ -156,4 +157,10 @@ public class SarFileSplitInfoEO implements Serializable {
|
|||||||
@ApiModelProperty(value = "标准类别")
|
@ApiModelProperty(value = "标准类别")
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String standardClass;
|
private String standardClass;
|
||||||
|
/**
|
||||||
|
* 识别父子关系
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "识别父子关系")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String childParentLink;
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-2
@@ -375,8 +375,11 @@
|
|||||||
select * from SAR_FILE_SPLIT_MENU
|
select * from SAR_FILE_SPLIT_MENU
|
||||||
where parent_id = #{parentId}
|
where parent_id = #{parentId}
|
||||||
AND valid_flag = '0'
|
AND valid_flag = '0'
|
||||||
and display_seq > #{displaySeq}
|
<if test="displaySeq != null">
|
||||||
order by display_seq desc
|
and display_seq > #{displaySeq}
|
||||||
|
</if>
|
||||||
|
|
||||||
|
order by display_seq
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="queryByGTDisplaySeq" resultMap="BaseResultMap">
|
<select id="queryByGTDisplaySeq" resultMap="BaseResultMap">
|
||||||
|
|||||||
+108
-55
@@ -12,6 +12,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.jero.common.api.vo.Result;
|
import com.jero.common.api.vo.Result;
|
||||||
import com.jero.common.api.vo.ResultCommon;
|
import com.jero.common.api.vo.ResultCommon;
|
||||||
|
import com.jero.common.constant.CommonConstant;
|
||||||
import com.jero.common.constant.enums.IsMustEnum;
|
import com.jero.common.constant.enums.IsMustEnum;
|
||||||
import com.jero.common.constant.enums.LanguageEnum;
|
import com.jero.common.constant.enums.LanguageEnum;
|
||||||
import com.jero.common.constant.enums.ModuleEnum;
|
import com.jero.common.constant.enums.ModuleEnum;
|
||||||
@@ -1987,11 +1988,14 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
|||||||
HashMap<String, String> menuAndItemMap = new HashMap<>();
|
HashMap<String, String> menuAndItemMap = new HashMap<>();
|
||||||
List<SarFileSplitMenuTreeNode> treeList = new ArrayList<>();
|
List<SarFileSplitMenuTreeNode> treeList = new ArrayList<>();
|
||||||
List<Map<String, Object>> itemsEOList = new ArrayList<>(addItemsEOList);
|
List<Map<String, Object>> itemsEOList = new ArrayList<>(addItemsEOList);
|
||||||
if (splitStandardClass.contains(sarFileSplitInfoEO.getStandardClass())){
|
//if (splitStandardClass.contains(sarFileSplitInfoEO.getStandardClass())){
|
||||||
treeList = buildTree2(itemsEOList, treeListDisplay, menuId);
|
// treeList = buildTree2(itemsEOList, treeListDisplay, menuId);
|
||||||
}else {
|
//}else {
|
||||||
treeList = buildTree(itemsEOList, treeListDisplay, menuId);
|
//识别父子关系
|
||||||
}
|
String childParentLink = sarFileSplitInfoEO.getChildParentLink();
|
||||||
|
|
||||||
|
treeList = buildTree(itemsEOList, treeListDisplay, menuId, childParentLink);
|
||||||
|
//}
|
||||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
String userId = sysUser.getId();
|
String userId = sysUser.getId();
|
||||||
for (SarFileSplitMenuTreeNode treeNode : treeList) {
|
for (SarFileSplitMenuTreeNode treeNode : treeList) {
|
||||||
@@ -2210,7 +2214,7 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
|||||||
// 校验名称
|
// 校验名称
|
||||||
File file1 = excelfilelist.get(0);
|
File file1 = excelfilelist.get(0);
|
||||||
String name = file1.getName().substring(0, file1.getName().lastIndexOf("."));
|
String name = file1.getName().substring(0, file1.getName().lastIndexOf("."));
|
||||||
if(!"条款导入模板,clauseImport".contains(name)){
|
if(!name.contains("条款导入模板")){
|
||||||
//删除原上传文件
|
//删除原上传文件
|
||||||
FileUnZip.deleteDir(saveDirectory);
|
FileUnZip.deleteDir(saveDirectory);
|
||||||
if(MessageUtils.getLanguage().getValue().equals(LanguageEnum.CN.getValue())){
|
if(MessageUtils.getLanguage().getValue().equals(LanguageEnum.CN.getValue())){
|
||||||
@@ -2259,10 +2263,14 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
|||||||
}
|
}
|
||||||
SplitTableInfo splitTableInfo = new SplitTableInfo();
|
SplitTableInfo splitTableInfo = new SplitTableInfo();
|
||||||
splitTableInfo.setTableName(sheet.getSheetName());
|
splitTableInfo.setTableName(sheet.getSheetName());
|
||||||
String tableHtml = POIReadExcelToHtml.readExcelToHtml(workbook,i,false);
|
try {
|
||||||
tableHtml = tableHtml.replaceAll("\'","\"");
|
String tableHtml = POIReadExcelToHtml.readExcelToHtml(workbook,i,false);
|
||||||
tableHtml = tableHtml.replaceAll("style","border=\"1\" style");// 解决导入的表格没线
|
tableHtml = tableHtml.replaceAll("\'","\"");
|
||||||
splitTableInfo.setTableHtml(tableHtml);
|
tableHtml = tableHtml.replaceAll("style","border=\"1\" style");// 解决导入的表格没线
|
||||||
|
splitTableInfo.setTableHtml(tableHtml);
|
||||||
|
}catch (Exception e){
|
||||||
|
throw new JeroBootException(sheet.getSheetName() + "页签数据异常");
|
||||||
|
}
|
||||||
getSheetTableList.add(splitTableInfo);
|
getSheetTableList.add(splitTableInfo);
|
||||||
}
|
}
|
||||||
int i = 0 ;
|
int i = 0 ;
|
||||||
@@ -3173,7 +3181,7 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
|||||||
}
|
}
|
||||||
countError++;
|
countError++;
|
||||||
valueList = Collections.emptyList();
|
valueList = Collections.emptyList();
|
||||||
break;
|
continue;
|
||||||
}else {
|
}else {
|
||||||
valueList.add(first.get().getId());
|
valueList.add(first.get().getId());
|
||||||
}
|
}
|
||||||
@@ -3196,33 +3204,69 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
|||||||
if (firstDict.isPresent()){
|
if (firstDict.isPresent()){
|
||||||
List<SysDictItem> sysDictItemLists = sysDictItemService.list(new LambdaQueryWrapper<SysDictItem>()
|
List<SysDictItem> sysDictItemLists = sysDictItemService.list(new LambdaQueryWrapper<SysDictItem>()
|
||||||
.eq(SysDictItem::getDictId, firstDict.get().getId()));
|
.eq(SysDictItem::getDictId, firstDict.get().getId()));
|
||||||
List<SysDictItem> sysDictItemList = getLevelPath(sysDictItemLists);
|
|
||||||
String[] treePathList = value.split(",");
|
String[] treePathList = value.split(",");
|
||||||
for (String treePath : treePathList) {
|
for (String treePath : treePathList) {
|
||||||
List<SysDictItem> path =
|
List<SysDictItem> path =
|
||||||
sysDictItemList.stream().filter(o -> treePath.equals(o.getLevelPath()))
|
sysDictItemLists.stream().filter(o -> treePath.equals(o.getItemText()))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
if (!path.isEmpty()){
|
if (!path.isEmpty()){
|
||||||
if (path.size() > 1) {
|
// 如果有多个,按照全路径去匹配一遍
|
||||||
|
if(path.size() > 1){
|
||||||
|
List<SysDictItem> sysDictItemList = getLevelPath(sysDictItemLists);
|
||||||
|
List<SysDictItem> pathOther =
|
||||||
|
sysDictItemList.stream().filter(o -> treePath.equals(o.getLevelPath()))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
if(!pathOther.isEmpty()){
|
||||||
|
if (path.size() > 1) {
|
||||||
|
if(MessageUtils.getLanguage().getValue().equals(LanguageEnum.CN.getValue())) {
|
||||||
|
errorMsg += fieldName + "中" + treePath + "存在多个;";
|
||||||
|
countError++;
|
||||||
|
valueList = Collections.emptyList();
|
||||||
|
} else {
|
||||||
|
errorMsg += fieldName + " " + treePath + "Exist in multiple;";
|
||||||
|
}
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
valueList.add(pathOther.get(0).getItemValue());
|
||||||
|
}else{
|
||||||
|
if(MessageUtils.getLanguage().getValue().equals(LanguageEnum.CN.getValue())) {
|
||||||
|
errorMsg += fieldName + "中" + treePath + "存在多个;";
|
||||||
|
countError++;
|
||||||
|
valueList = Collections.emptyList();
|
||||||
|
} else {
|
||||||
|
errorMsg += fieldName + " " + treePath + "Not exist;";
|
||||||
|
}
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
List<SysDictItem> sysDictItemList = getLevelPath(sysDictItemLists);
|
||||||
|
List<SysDictItem> pathOther =
|
||||||
|
sysDictItemList.stream().filter(o -> treePath.equals(o.getLevelPath()))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
if(!pathOther.isEmpty()){
|
||||||
|
if (path.size() > 1) {
|
||||||
|
if(MessageUtils.getLanguage().getValue().equals(LanguageEnum.CN.getValue())) {
|
||||||
|
errorMsg += fieldName + "中" + treePath + "存在多个;";
|
||||||
|
countError++;
|
||||||
|
valueList = Collections.emptyList();
|
||||||
|
} else {
|
||||||
|
errorMsg += fieldName + " " + treePath + "Exist in multiple;";
|
||||||
|
}
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
valueList.add(pathOther.get(0).getItemValue());
|
||||||
|
}else{
|
||||||
if(MessageUtils.getLanguage().getValue().equals(LanguageEnum.CN.getValue())) {
|
if(MessageUtils.getLanguage().getValue().equals(LanguageEnum.CN.getValue())) {
|
||||||
errorMsg += fieldName + "中" + treePath + "存在多个;";
|
errorMsg += fieldName + "中" + treePath + "不存在;";
|
||||||
countError++;
|
countError++;
|
||||||
valueList = Collections.emptyList();
|
valueList = Collections.emptyList();
|
||||||
} else {
|
} else {
|
||||||
errorMsg += fieldName + " " + treePath + "Exist in multiple;";
|
errorMsg += fieldName + " " + treePath + "Not exist;";
|
||||||
}
|
}
|
||||||
break;
|
continue;
|
||||||
}
|
}
|
||||||
valueList.add(path.get(0).getItemValue());
|
|
||||||
}else {
|
|
||||||
if(MessageUtils.getLanguage().getValue().equals(LanguageEnum.CN.getValue())) {
|
|
||||||
errorMsg += fieldName + "中" + treePath + "不存在;";
|
|
||||||
countError++;
|
|
||||||
valueList = Collections.emptyList();
|
|
||||||
} else {
|
|
||||||
errorMsg += fieldName + " " + treePath + "Not exist;";
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3231,15 +3275,10 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
|||||||
|
|
||||||
// 特殊字段
|
// 特殊字段
|
||||||
if (StringUtils.isNotBlank(value) && SPECIAL_FIELD.contains(dbfieldName)){
|
if (StringUtils.isNotBlank(value) && SPECIAL_FIELD.contains(dbfieldName)){
|
||||||
if (partNameList.isEmpty()){
|
|
||||||
List<PartName> partNames = IPartNameService.list(new LambdaQueryWrapper<PartName>().ne(PartName::getCode, "Part"));
|
|
||||||
partNameList = partNameGetLevelPath(partNames);
|
|
||||||
}
|
|
||||||
String[] treePathList = value.split(",");
|
String[] treePathList = value.split(",");
|
||||||
for (String treePath : treePathList) {
|
for (String treePath : treePathList) {
|
||||||
List<PartName> path =
|
List<PartName> path = IPartNameService.list(new LambdaQueryWrapper<PartName>()
|
||||||
partNameList.stream().filter(o -> treePath.equals(o.getLevelPath()))
|
.eq(PartName::getName, treePath));
|
||||||
.collect(Collectors.toList());
|
|
||||||
if (!path.isEmpty()){
|
if (!path.isEmpty()){
|
||||||
if (path.size() > 1) {
|
if (path.size() > 1) {
|
||||||
if(MessageUtils.getLanguage().getValue().equals(LanguageEnum.CN.getValue())) {
|
if(MessageUtils.getLanguage().getValue().equals(LanguageEnum.CN.getValue())) {
|
||||||
@@ -3249,7 +3288,7 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
|||||||
} else {
|
} else {
|
||||||
errorMsg += fieldName + " " + treePath + "Exist in multiple;";
|
errorMsg += fieldName + " " + treePath + "Exist in multiple;";
|
||||||
}
|
}
|
||||||
break;
|
continue;
|
||||||
}
|
}
|
||||||
valueList.add(path.get(0).getCode());
|
valueList.add(path.get(0).getCode());
|
||||||
}else {
|
}else {
|
||||||
@@ -3260,7 +3299,7 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
|||||||
} else {
|
} else {
|
||||||
errorMsg += fieldName + " " + treePath + "Not exist;";
|
errorMsg += fieldName + " " + treePath + "Not exist;";
|
||||||
}
|
}
|
||||||
break;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3493,9 +3532,10 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
|||||||
* @param addItemsEOList
|
* @param addItemsEOList
|
||||||
* @param treeListDisplay
|
* @param treeListDisplay
|
||||||
* @param menuId
|
* @param menuId
|
||||||
|
* @param childParentLink
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private List<SarFileSplitMenuTreeNode> buildTree(List<Map<String, Object>> addItemsEOList, Long treeListDisplay, String menuId){
|
private List<SarFileSplitMenuTreeNode> buildTree(List<Map<String, Object>> addItemsEOList, Long treeListDisplay, String menuId, String childParentLink){
|
||||||
//排序
|
//排序
|
||||||
// addItemsEOList.sort(new DirectoryComparator());
|
// addItemsEOList.sort(new DirectoryComparator());
|
||||||
|
|
||||||
@@ -3509,31 +3549,44 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
|||||||
SarFileSplitMenuTreeNode treeNode = new SarFileSplitMenuTreeNode();
|
SarFileSplitMenuTreeNode treeNode = new SarFileSplitMenuTreeNode();
|
||||||
treeNode.setId(UUIDUtils.randomUUID20());
|
treeNode.setId(UUIDUtils.randomUUID20());
|
||||||
treeNode.setName(itemNum);
|
treeNode.setName(itemNum);
|
||||||
if(itemNum.matches(regex)) {
|
if(CommonConstant.STATUS_1.equals(childParentLink)){
|
||||||
//父级是 总目录时,不做处理
|
if(itemNum.matches(regex)) {
|
||||||
if(itemNum.contains(".")) {
|
//父级是 总目录时,不做处理
|
||||||
String parentName = itemNum.substring(0, itemNum.lastIndexOf("."));
|
if(itemNum.contains(".")) {
|
||||||
treeNode.setParentName(parentName);
|
String parentName = itemNum.substring(0, itemNum.lastIndexOf("."));
|
||||||
|
treeNode.setParentName(parentName);
|
||||||
|
|
||||||
List<SarFileSplitMenuTreeNode> p = treeNodeList.stream().filter(e -> e.getName().equals(parentName)).collect(Collectors.toList());
|
List<SarFileSplitMenuTreeNode> p = treeNodeList.stream().filter(e -> e.getName().equals(parentName)).collect(Collectors.toList());
|
||||||
if (CollectionUtil.isNotEmpty(p)) {
|
if (CollectionUtil.isNotEmpty(p)) {
|
||||||
//其他节点
|
//其他节点
|
||||||
treeNode.setParentId(p.get(0).getId());
|
treeNode.setParentId(p.get(0).getId());
|
||||||
|
}else{
|
||||||
|
//一级节点
|
||||||
|
treeNode.setParentId(menuId);
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
//一级节点
|
|
||||||
treeNode.setParentId(menuId);
|
treeNode.setParentId(menuId);
|
||||||
}
|
}
|
||||||
}else{
|
}
|
||||||
|
else
|
||||||
|
if (StringUtils.isBlank(itemTitle)){
|
||||||
|
treeNode.setParentId(parentId);
|
||||||
|
}
|
||||||
|
else{
|
||||||
treeNode.setParentId(menuId);
|
treeNode.setParentId(menuId);
|
||||||
|
parentId = treeNode.getId();
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
if (StringUtils.isBlank(itemTitle)){
|
||||||
|
treeNode.setParentId(parentId);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
treeNode.setParentId(menuId);
|
||||||
|
parentId = treeNode.getId();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (StringUtils.isBlank(itemTitle)){
|
|
||||||
treeNode.setParentId(parentId);
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
treeNode.setParentId(menuId);
|
|
||||||
parentId = treeNode.getId();
|
|
||||||
}
|
|
||||||
++treeListDisplay;
|
++treeListDisplay;
|
||||||
treeNode.setOrderNum(treeListDisplay);
|
treeNode.setOrderNum(treeListDisplay);
|
||||||
treeNode.setItemName(itemTitle);
|
treeNode.setItemName(itemTitle);
|
||||||
|
|||||||
+47
-22
@@ -377,30 +377,55 @@ public class SarFileSplitMenuEOServiceImpl extends ServiceImpl<SarFileSplitMenuE
|
|||||||
public void updateMenuLevel(String sourceIds, String parentId, Long displaySeq) {
|
public void updateMenuLevel(String sourceIds, String parentId, Long displaySeq) {
|
||||||
// 要移动到的节点信息
|
// 要移动到的节点信息
|
||||||
SarFileSplitMenuEO parentMenu = baseMapper.findById(parentId);
|
SarFileSplitMenuEO parentMenu = baseMapper.findById(parentId);
|
||||||
|
Long menuDisplaySeq = parentMenu.getDisplaySeq();
|
||||||
// 获取要移动到的层级的最后一个 的排序值
|
|
||||||
List<SarFileSplitMenuEO> lastMenuList = getLastMenu(parentMenu.getId(),displaySeq);
|
|
||||||
List<String> sourceIdList = Arrays.asList(sourceIds.split(","));
|
List<String> sourceIdList = Arrays.asList(sourceIds.split(","));
|
||||||
int size = sourceIdList.size();
|
|
||||||
for (SarFileSplitMenuEO sarFileSplitMenuEO : lastMenuList) {
|
List<SarFileSplitMenuEO> lastMenuList;
|
||||||
Long displaySeq1 = sarFileSplitMenuEO.getDisplaySeq();
|
//是否是放到最后
|
||||||
sarFileSplitMenuEO.setDisplaySeq(displaySeq1+size);
|
boolean equals = Objects.equals(menuDisplaySeq, displaySeq);
|
||||||
baseMapper.updateByPrimaryKeySelective(sarFileSplitMenuEO);
|
if (equals){
|
||||||
}
|
// 获取要移动到的层级的最后一个 的排序值
|
||||||
if(displaySeq == 0){
|
lastMenuList = getLastMenu(parentMenu.getId(),null);
|
||||||
displaySeq = parentMenu.getDisplaySeq();
|
int size = lastMenuList.size();
|
||||||
}
|
for (int i = 0; i < size; i++) {
|
||||||
//this.updateBatchById(lastMenuList);
|
SarFileSplitMenuEO sarFileSplitMenuEO = lastMenuList.get(i);
|
||||||
List<SarFileSplitMenuEO> updateList = new ArrayList<>();
|
sarFileSplitMenuEO.setDisplaySeq(menuDisplaySeq+i+1);
|
||||||
for (int i = 0; i < sourceIdList.size(); i++) {
|
baseMapper.updateByPrimaryKeySelective(sarFileSplitMenuEO);
|
||||||
String sourceId = sourceIdList.get(i);
|
}
|
||||||
// 要移动的节点信息
|
if(displaySeq == 0){
|
||||||
SarFileSplitMenuEO sarFileSplitMenuEO = baseMapper.findById(sourceId);
|
displaySeq = menuDisplaySeq;
|
||||||
sarFileSplitMenuEO.setParentId(parentId);
|
}
|
||||||
sarFileSplitMenuEO.setDisplaySeq(displaySeq+i+1);
|
for (int i = 0; i < sourceIdList.size(); i++) {
|
||||||
updateList.add(sarFileSplitMenuEO);
|
String sourceId = sourceIdList.get(i);
|
||||||
baseMapper.updateByPrimaryKeySelective(sarFileSplitMenuEO);
|
// 要移动的节点信息
|
||||||
|
SarFileSplitMenuEO sarFileSplitMenuEO = baseMapper.findById(sourceId);
|
||||||
|
sarFileSplitMenuEO.setParentId(parentId);
|
||||||
|
sarFileSplitMenuEO.setDisplaySeq(displaySeq+size+i+1);
|
||||||
|
baseMapper.updateByPrimaryKeySelective(sarFileSplitMenuEO);
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
// 获取要移动到的层级的最后一个 的排序值
|
||||||
|
lastMenuList = getLastMenu(parentMenu.getId(),displaySeq);
|
||||||
|
int size = sourceIdList.size();
|
||||||
|
for (SarFileSplitMenuEO sarFileSplitMenuEO : lastMenuList) {
|
||||||
|
Long displaySeq1 = sarFileSplitMenuEO.getDisplaySeq();
|
||||||
|
sarFileSplitMenuEO.setDisplaySeq(displaySeq1+size);
|
||||||
|
baseMapper.updateByPrimaryKeySelective(sarFileSplitMenuEO);
|
||||||
|
}
|
||||||
|
if(displaySeq == 0){
|
||||||
|
displaySeq = parentMenu.getDisplaySeq();
|
||||||
|
}
|
||||||
|
for (int i = 0; i < sourceIdList.size(); i++) {
|
||||||
|
String sourceId = sourceIdList.get(i);
|
||||||
|
// 要移动的节点信息
|
||||||
|
SarFileSplitMenuEO sarFileSplitMenuEO = baseMapper.findById(sourceId);
|
||||||
|
sarFileSplitMenuEO.setParentId(parentId);
|
||||||
|
sarFileSplitMenuEO.setDisplaySeq(displaySeq+i+1);
|
||||||
|
baseMapper.updateByPrimaryKeySelective(sarFileSplitMenuEO);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//this.updateBatchById(updateList);
|
//this.updateBatchById(updateList);
|
||||||
// 要移动的节点所有子集(包括本身)
|
// 要移动的节点所有子集(包括本身)
|
||||||
//List<SarFileSplitMenuEO> sarFileSplitMenuEO1List = new ArrayList<>();
|
//List<SarFileSplitMenuEO> sarFileSplitMenuEO1List = new ArrayList<>();
|
||||||
|
|||||||
@@ -4,12 +4,12 @@ import com.aspose.words.*;
|
|||||||
import com.jero.modules.split.vo.TitleNumberVO;
|
import com.jero.modules.split.vo.TitleNumberVO;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.apache.commons.logging.Log;
|
||||||
|
import org.apache.poi.xwpf.usermodel.VerticalAlign;
|
||||||
|
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author liJiaRao
|
* @author liJiaRao
|
||||||
@@ -23,28 +23,19 @@ public class AsposeUtil {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public static TitleNumberVO getNumber(InputStream is) {
|
public static TitleNumberVO getNumber(InputStream is) {
|
||||||
long time1=System.currentTimeMillis();
|
|
||||||
|
|
||||||
TitleNumberVO titleNumberVO = new TitleNumberVO();
|
TitleNumberVO titleNumberVO = new TitleNumberVO();
|
||||||
Map<String, List<String>> titleNumberMap = new HashMap<>();
|
Map<String, List<String>> titleNumberMap = new HashMap<>();
|
||||||
List<String> emptyTitleList = new ArrayList<>();
|
List<String> emptyTitleList = new ArrayList<>();
|
||||||
|
List<String> titleNumberList = new ArrayList<>();
|
||||||
try {
|
try {
|
||||||
long time9=System.currentTimeMillis();
|
|
||||||
log.info("耗时:"+(time9-time1)+"ms");
|
|
||||||
Document doc = new Document(is);
|
Document doc = new Document(is);
|
||||||
long time8=System.currentTimeMillis();
|
|
||||||
log.info("耗时:"+(time8-time1)+"ms");
|
|
||||||
DocumentBuilder builder = new DocumentBuilder(doc);
|
|
||||||
long time7=System.currentTimeMillis();
|
|
||||||
log.info("耗时:"+(time7-time1)+"ms");
|
|
||||||
//builder.insertField(FieldType.FIELD_NUM_PAGES, true);
|
|
||||||
long time6=System.currentTimeMillis();
|
|
||||||
log.info("耗时:"+(time6-time1)+"ms");
|
|
||||||
//获取段落
|
|
||||||
NodeCollection childNodes = doc.getChildNodes(NodeType.PARAGRAPH, true);
|
|
||||||
|
|
||||||
long time2=System.currentTimeMillis();
|
DocumentBuilder builder = new DocumentBuilder(doc);
|
||||||
log.info("耗时:"+(time2-time1)+"ms");
|
|
||||||
|
builder.insertField(FieldType.FIELD_NUM_PAGES, true);
|
||||||
|
//获取段落
|
||||||
|
NodeCollection childNodes = doc.getChildNodes(NodeType.ANY, true);
|
||||||
|
|
||||||
for (int i = 0; i < childNodes.getCount(); i++) {
|
for (int i = 0; i < childNodes.getCount(); i++) {
|
||||||
Node next = childNodes.get(i);
|
Node next = childNodes.get(i);
|
||||||
|
|
||||||
@@ -68,7 +59,9 @@ public class AsposeUtil {
|
|||||||
labelString = listLabel.getLabelString().trim();
|
labelString = listLabel.getLabelString().trim();
|
||||||
labelString = labelString.replaceAll("\t", "").replaceAll("\b", "")
|
labelString = labelString.replaceAll("\t", "").replaceAll("\b", "")
|
||||||
.replaceAll(" ", "").replaceAll("\"", "").replaceAll("'", "").replaceAll(" ", "");
|
.replaceAll(" ", "").replaceAll("\"", "").replaceAll("'", "").replaceAll(" ", "");
|
||||||
|
if (StringUtils.isBlank(labelString)){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (StringUtils.isNotBlank(text)) {
|
if (StringUtils.isNotBlank(text)) {
|
||||||
if (titleNumberMap.containsKey(text)) {
|
if (titleNumberMap.containsKey(text)) {
|
||||||
List<String> strings = titleNumberMap.get(text);
|
List<String> strings = titleNumberMap.get(text);
|
||||||
@@ -78,6 +71,7 @@ public class AsposeUtil {
|
|||||||
strings.add(labelString);
|
strings.add(labelString);
|
||||||
titleNumberMap.put(text, strings);
|
titleNumberMap.put(text, strings);
|
||||||
}
|
}
|
||||||
|
titleNumberList.add(labelString);
|
||||||
} else {
|
} else {
|
||||||
emptyTitleList.add(labelString);
|
emptyTitleList.add(labelString);
|
||||||
}
|
}
|
||||||
@@ -88,14 +82,8 @@ public class AsposeUtil {
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
titleNumberVO.setTitleNumberMap(titleNumberMap);
|
titleNumberVO.setTitleNumberMap(titleNumberMap);
|
||||||
|
emptyTitleList.removeIf(titleNumberList::contains);
|
||||||
titleNumberVO.setEmptyTitleList(emptyTitleList);
|
titleNumberVO.setEmptyTitleList(emptyTitleList);
|
||||||
long time9=System.currentTimeMillis();
|
|
||||||
log.info("耗时:"+(time9-time1)+"ms");
|
|
||||||
return titleNumberVO;
|
return titleNumberVO;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
|
||||||
String str = "Annex 1";
|
|
||||||
System.out.println(str.substring(0, str.length()-1));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ spring:
|
|||||||
connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000;druid.stat.logSlowSql\=true
|
connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000;druid.stat.logSlowSql\=true
|
||||||
datasource:
|
datasource:
|
||||||
master:
|
master:
|
||||||
url: jdbc:p6spy:mysql://10.10.10.44:3306/laws_chery_dev?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true
|
url: jdbc:p6spy:mysql://10.10.10.44:3306/laws_chery_dev_init?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true
|
||||||
username: root
|
username: root
|
||||||
password: hzwlsoft.com
|
password: hzwlsoft.com
|
||||||
driver-class-name: com.p6spy.engine.spy.P6SpyDriver
|
driver-class-name: com.p6spy.engine.spy.P6SpyDriver
|
||||||
|
|||||||
@@ -215,7 +215,7 @@ jero:
|
|||||||
backUrl: http://localhost:3000
|
backUrl: http://localhost:3000
|
||||||
backUrlPhone: http://localhost:3000
|
backUrlPhone: http://localhost:3000
|
||||||
#拆分图片展示地址 域名
|
#拆分图片展示地址 域名
|
||||||
splitUrl: http://10.2.16.37:3344/laws-chery/sys/split/file/getImage?fileName=
|
splitUrl: https://cgrsm.mychery.com:3344/laws-chery/sys/split/file/getImage?fileName=
|
||||||
#公式转换图片url
|
#公式转换图片url
|
||||||
mathToImgUrl: http://localhost:9998/mathToImg
|
mathToImgUrl: http://localhost:9998/mathToImg
|
||||||
# 拆分标准类型
|
# 拆分标准类型
|
||||||
@@ -247,7 +247,7 @@ jero:
|
|||||||
endPoint: https://obsv3.wh-yd-01.mychery.com
|
endPoint: https://obsv3.wh-yd-01.mychery.com
|
||||||
accessKey: 1NENLYHKWGCHNTKCBTWJ
|
accessKey: 1NENLYHKWGCHNTKCBTWJ
|
||||||
secretKey: wnLuaLGfyIw2HQGCNGepyA3Oob0TwUhIN15Vodlu
|
secretKey: wnLuaLGfyIw2HQGCNGepyA3Oob0TwUhIN15Vodlu
|
||||||
bucketName: obs-ccos-test
|
bucketName: obs-cgrsm
|
||||||
# ElasticSearch 6设置
|
# ElasticSearch 6设置
|
||||||
elasticsearch:
|
elasticsearch:
|
||||||
username:
|
username:
|
||||||
@@ -309,12 +309,12 @@ jero:
|
|||||||
# 文件限制后缀黑名单
|
# 文件限制后缀黑名单
|
||||||
fileSuffixLimits : 0x00,%00,\\00,.jsp,.exe,.php,.asp,.aspx,.jspx,.xml,.html,.js,.sh,.bin,$DATA
|
fileSuffixLimits : 0x00,%00,\\00,.jsp,.exe,.php,.asp,.aspx,.jspx,.xml,.html,.js,.sh,.bin,$DATA
|
||||||
# 跨站白名单 域名
|
# 跨站白名单 域名
|
||||||
whiteUrls: localhost:62345,localhost:8188,localhost:3344,localhost:3435,localhost:3408,10.2.16.33:8188,10.2.16.33:3344,10.2.16.37:3344,10.2.16.34:8188,10.2.16.34:3344,10.2.16.33:8012,cgrsmuat.mychery.com:8188,cgrsmuat.mychery.com:3344,cgrsmuat.mychery.com:8012
|
whiteUrls: localhost:62345,localhost:8188,localhost:3344,localhost:3435,localhost:3408,10.2.16.33:8188,10.2.16.33:3344,10.2.16.37:3344,10.2.16.34:8188,10.2.16.34:3344,10.2.16.33:8012,cgrsm.mychery.com:8188,cgrsm.mychery.com:3344,cgrsm.mychery.com:8012
|
||||||
xssExcludedPages: /login,/updatePassword
|
xssExcludedPages: /login,/updatePassword
|
||||||
# cors白名单
|
# cors白名单
|
||||||
notFilter:
|
notFilter:
|
||||||
# origin地址 域名
|
# origin地址 域名
|
||||||
originIp: http://localhost:62345,http://localhost:8188,http://localhost:3344,http://localhost:3435,http://localhost:3408,http://10.2.16.33:8188,http://10.2.16.33:3344,http://10.2.16.34:8188,http://10.2.16.34:3344,http://10.2.16.37:3344,http://10.2.16.33:8012,https://cgrsmuat.mychery.com:8188,https://cgrsmuat.mychery.com:3344,https://cgrsmuat.mychery.com:8012
|
originIp: http://localhost:62345,http://localhost:8188,http://localhost:3344,http://localhost:3435,http://localhost:3408,http://10.2.16.33:8188,http://10.2.16.33:3344,http://10.2.16.34:8188,http://10.2.16.34:3344,http://10.2.16.37:3344,http://10.2.16.33:8012,https://cgrsm.mychery.com:8188,https://cgrsm.mychery.com:3344,https://cgrsm.mychery.com:8012
|
||||||
# 加密默认值
|
# 加密默认值
|
||||||
password:
|
password:
|
||||||
pbe:
|
pbe:
|
||||||
@@ -406,10 +406,10 @@ hiwork:
|
|||||||
# 是否推送统一待办
|
# 是否推送统一待办
|
||||||
isWorkflow: true
|
isWorkflow: true
|
||||||
# 前端调用地址
|
# 前端调用地址
|
||||||
url: https://iamuat.mychery.com:5443/idp/oauth2/authorize?state=123&client_id=CGRSM&redirect_uri=
|
url: https://iam.mychery.com:6443/idp/oauth2/authorize?state=123&client_id=CGRSM&redirect_uri=
|
||||||
# 域名
|
# 域名
|
||||||
fontUrl: http://10.2.16.37:3344{url}?projectId={projectId}&taskName={taskName}&taskId={taskId}&processInstanceId={processInstanceId}&nodeId={nodeId}
|
fontUrl: https://cgrsm.mychery.com:3344/{url}?projectId={projectId}&taskName={taskName}&taskId={taskId}&processInstanceId={processInstanceId}&nodeId={nodeId}
|
||||||
fontAppUrl: http://10.2.16.37:3344/mobile{url}?projectId={projectId}&taskName={taskName}&taskId={taskId}&processInstanceId={processInstanceId}&nodeId={nodeId}
|
fontAppUrl: https://cgrsm.mychery.com:3344//mobile{url}?projectId={projectId}&taskName={taskName}&taskId={taskId}&processInstanceId={processInstanceId}&nodeId={nodeId}
|
||||||
#hiwork单点登录
|
#hiwork单点登录
|
||||||
appkey: dingshfclphtivrd0r7k
|
appkey: dingshfclphtivrd0r7k
|
||||||
appsecret: dqhom_17n6BC8pmLeaf5wNp4aV_4XSt_aYn-dNBo8z__-79NjVvZhDJ_M2REdxRc
|
appsecret: dqhom_17n6BC8pmLeaf5wNp4aV_4XSt_aYn-dNBo8z__-79NjVvZhDJ_M2REdxRc
|
||||||
@@ -429,15 +429,15 @@ asms:
|
|||||||
# 单点登录配置(所有配置信息需要协调注册,现在都为假)
|
# 单点登录配置(所有配置信息需要协调注册,现在都为假)
|
||||||
oauth:
|
oauth:
|
||||||
# 客户端应用注册ID--客户申请的:CGRSM
|
# 客户端应用注册ID--客户申请的:CGRSM
|
||||||
clientId: CGRSM
|
clientId: qr-cgrsm
|
||||||
# 客户端应用注册密钥 客户申请的:58a1001438de462193bec307826463c2
|
# 客户端应用注册密钥 客户申请的:58a1001438de462193bec307826463c2
|
||||||
clientSecret: a0792bc797794ff89e5628498cce0912
|
clientSecret: 769878b6d4914c848337211ed2936a03
|
||||||
# 授权码验证
|
# 授权码验证
|
||||||
grantType: authorization_code
|
grantType: authorization_code
|
||||||
# 通过授权码获取accessToken请求地址
|
# 通过授权码获取accessToken请求地址
|
||||||
accessTokenUrl: https://iamuat.mychery.com:5443/idp/oauth2/getToken
|
accessTokenUrl: https://iam.mychery.com:6443/idp/oauth2/getToken
|
||||||
# 通过accessToken获取账号信息请求地址
|
# 通过accessToken获取账号信息请求地址
|
||||||
userInfoUrl: https://iamuat.mychery.com:5443/idp/oauth2/getUserInfo
|
userInfoUrl: https://iam.mychery.com:6443/idp/oauth2/getUserInfo
|
||||||
# 防止跨站请求伪造(CSRF)标识(暂时不用)
|
# 防止跨站请求伪造(CSRF)标识(暂时不用)
|
||||||
state: zhongQi
|
state: zhongQi
|
||||||
|
|
||||||
@@ -553,7 +553,7 @@ OCR:
|
|||||||
#OCR请求识别URL地址
|
#OCR请求识别URL地址
|
||||||
handleFileUrl: http://61.136.1.103:8091/WebService.asmx/FileConversion
|
handleFileUrl: http://61.136.1.103:8091/WebService.asmx/FileConversion
|
||||||
# OCR回调接口地址 配置客户本地的IP及端口号 域名
|
# OCR回调接口地址 配置客户本地的IP及端口号 域名
|
||||||
callBackUrl: http://10.2.16.37:3344/laws-chery/laws/ocr/OCRRestful/OcrHandleResult
|
callBackUrl: https://cgrsm.mychery.com:3344/laws-chery/laws/ocr/OCRRestful/OcrHandleResult
|
||||||
userId: dayuzhou1234
|
userId: dayuzhou1234
|
||||||
authCode: 123456
|
authCode: 123456
|
||||||
publicKey: EC4KKA6ZDTCPAOCRBC5M
|
publicKey: EC4KKA6ZDTCPAOCRBC5M
|
||||||
@@ -580,9 +580,9 @@ feishu:
|
|||||||
# 重定向到前端的地址前缀
|
# 重定向到前端的地址前缀
|
||||||
redirect_prefix: http://10.2.16.37:3344/transferRedirectPage?finalRedirectPage=
|
redirect_prefix: http://10.2.16.37:3344/transferRedirectPage?finalRedirectPage=
|
||||||
# app的id
|
# app的id
|
||||||
app_id : cli_a62184527ef5100c
|
app_id : cli_a6541d37d6359013
|
||||||
# app秘钥
|
# app秘钥
|
||||||
app_secret: xs3La3uovscP1USBfJqKQepWF0H3Xsgv
|
app_secret: AUC21Lhsn8n3NaUOarBSEbTD1lEsLPgY
|
||||||
# 基础地址:
|
# 基础地址:
|
||||||
base_url: https://open.feishu.cn/open-apis
|
base_url: https://open.feishu.cn/open-apis
|
||||||
# 获取token的地址
|
# 获取token的地址
|
||||||
|
|||||||
Reference in New Issue
Block a user