feat:一般检索、高级检索、导出
This commit is contained in:
+2
-10
@@ -217,17 +217,9 @@
|
||||
|
||||
<select id="querySplitFileInfoByPage" resultType="com.jero.modules.laws.documenttool.entity.SplitFileInfo">
|
||||
select standard.*, o.id id, o.file_name, o.standard_file_type, o.url
|
||||
from (select id standardId, standard_number, standard_number standardNo, standard_class, standard_name, standard_state, release_date, 1 origin, create_time, create_by, update_by, update_time
|
||||
from (select id standardId, standard_number, standard_number standardNo, standard_class, standard_name, standard_state, 1 origin, create_time, create_by, update_by, update_time
|
||||
from laws_domestic_standard
|
||||
where del_flag = 0
|
||||
union all
|
||||
select id standardId, standard_number, standard_number standardNo, standard_class, standard_name, standard_state, release_date, 3 origin, create_time, create_by, update_by, update_time
|
||||
from laws_enterprise_standard
|
||||
where del_flag = 0
|
||||
union all
|
||||
select id standardId, standard_number, standard_number standardNo, standard_class, standard_name, standard_state, release_date, 2 origin, create_time, create_by, update_by, update_time
|
||||
from laws_overseas_standard
|
||||
where del_flag = 0 AND standard_class = 'UNECE') standard left join oss_file o on standardId = o.standard_id
|
||||
where del_flag = 0) standard left join oss_file o on standardId = o.standard_id
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
|
||||
|
||||
+19
-5
@@ -54,14 +54,12 @@ import com.jero.modules.sys.entity.LawsEnterpriseStandardLevel;
|
||||
import com.jero.modules.sys.entity.LawsGrade;
|
||||
import com.jero.modules.sys.service.ILawsEnterpriseStandardLevelService;
|
||||
import com.jero.modules.sys.service.ILawsGradeService;
|
||||
import com.jero.modules.system.entity.SysDepart;
|
||||
import com.jero.modules.system.entity.SysDict;
|
||||
import com.jero.modules.system.entity.SysDictItem;
|
||||
import com.jero.modules.system.entity.SysUser;
|
||||
import com.jero.modules.system.model.DepartIdModel;
|
||||
import com.jero.modules.system.service.ISysDictItemService;
|
||||
import com.jero.modules.system.service.ISysDictService;
|
||||
import com.jero.modules.system.service.ISysUserDepartService;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
import com.jero.modules.system.service.*;
|
||||
import com.jero.modules.tag.entity.LawsTag;
|
||||
import com.jero.modules.tag.enums.LawsFieldTypeEnum;
|
||||
import com.jero.modules.tag.enums.TableNameEnum;
|
||||
@@ -130,6 +128,7 @@ public class DocumentSplitServiceImpl implements IDocumentSplitService {
|
||||
private final ILawsLabelDatabaseService lawsLabelDatabaseService;
|
||||
private final ISysBaseAPI sysBaseAPI;
|
||||
private final ISarFileSplitItemsValEOService sarFileSplitItemsValEOService;
|
||||
private final ISysDepartService sysDepartService;
|
||||
private static final String INFO_ID = "info_id";
|
||||
private static final String ID = "id";
|
||||
private static final String IDS = "ids";
|
||||
@@ -160,7 +159,7 @@ public class DocumentSplitServiceImpl implements IDocumentSplitService {
|
||||
PartNameService partNameService,
|
||||
ILawsLabelDatabaseService lawsLabelDatabaseService,
|
||||
ISysBaseAPI sysBaseAPI,
|
||||
ISarFileSplitItemsValEOService sarFileSplitItemsValEOService) {
|
||||
ISarFileSplitItemsValEOService sarFileSplitItemsValEOService, ISysDepartService sysDepartService) {
|
||||
this.documentSplitMapper = documentSplitMapper;
|
||||
this.sarFileSplitInfoService = sarFileSplitInfoService;
|
||||
this.lawsCommonMapper = lawsCommonMapper;
|
||||
@@ -181,6 +180,7 @@ public class DocumentSplitServiceImpl implements IDocumentSplitService {
|
||||
this.lawsLabelDatabaseService = lawsLabelDatabaseService;
|
||||
this.sysBaseAPI = sysBaseAPI;
|
||||
this.sarFileSplitItemsValEOService = sarFileSplitItemsValEOService;
|
||||
this.sysDepartService = sysDepartService;
|
||||
}
|
||||
|
||||
@Autowired
|
||||
@@ -335,6 +335,10 @@ public class DocumentSplitServiceImpl implements IDocumentSplitService {
|
||||
private void dicTranslate(List<Map<String, Object>> records, List<LawsTag> fieldListSelect) {
|
||||
List<LawsTag> lawsTags = fieldListSelect.stream()
|
||||
.filter(j -> FieldCommon.TYPE_DICT.contains(j.getFieldShowType())).collect(Collectors.toList());
|
||||
// 组织结构
|
||||
List<LawsTag> lawsTags2 = fieldListSelect.stream()
|
||||
.filter(j -> FieldCommon.GROUP.contains(j.getFieldShowType())).collect(Collectors.toList());
|
||||
|
||||
for (Map<String, Object> map : records) {
|
||||
for (LawsTag lawsTag : lawsTags) {
|
||||
String dbFieldName = lawsTag.getDbFieldName();
|
||||
@@ -346,6 +350,15 @@ public class DocumentSplitServiceImpl implements IDocumentSplitService {
|
||||
}
|
||||
}
|
||||
}
|
||||
for (LawsTag lawsTag : lawsTags2) {
|
||||
String dbFieldName = lawsTag.getDbFieldName();
|
||||
if (map.containsKey(dbFieldName)){
|
||||
List<SysDepart> sysDepartList =
|
||||
sysDepartService.listByIds(Arrays.asList(map.get(dbFieldName).toString().split(",")));
|
||||
List<String> itemTextList = sysDepartList.stream().map(SysDepart::getDepartName).collect(Collectors.toList());
|
||||
map.put(dbFieldName + DocumentSplitCommon.DIC_TEXT, String.join(",", itemTextList));
|
||||
}
|
||||
}
|
||||
// 特殊翻译
|
||||
specialTranslate(map);
|
||||
}
|
||||
@@ -1469,6 +1482,7 @@ public class DocumentSplitServiceImpl implements IDocumentSplitService {
|
||||
StringBuilder selectColumn = new StringBuilder();
|
||||
selectColumn.append("s.id");
|
||||
selectColumn.append(",").append(MENU_ID);
|
||||
selectColumn.append(",").append("s.info_id");
|
||||
for (LawsTag lawsTag : fieldListSelect) {
|
||||
selectColumn.append(",");
|
||||
selectColumn.append(DocumentSplitCommon.IF_NULL_BEGIN);
|
||||
|
||||
+9
-2
@@ -17,6 +17,10 @@ public class LawsHomeSearchCommon {
|
||||
* 企业标准
|
||||
*/
|
||||
public static final String LAWS_ENTERPRISE_STANDARD = "3";
|
||||
/**
|
||||
* 条款
|
||||
*/
|
||||
public static final String LAWS_DOCUMENT = "4";
|
||||
/**
|
||||
* 操作类型,1:add 2:update 3:delete
|
||||
*/
|
||||
@@ -38,14 +42,17 @@ public class LawsHomeSearchCommon {
|
||||
* 企业标准 表名
|
||||
*/
|
||||
public static final String LAWS_ENTERPRISE_STANDARD_TABLE_NAME = "laws_enterprise_standard";
|
||||
|
||||
/**
|
||||
* 高级搜索 表名
|
||||
*/
|
||||
public static final String HOME_SEARCH = "home_search";
|
||||
|
||||
/**
|
||||
* 检索方式:1:全文检索 2:标题检索
|
||||
*/
|
||||
public static final String SEARCH_MODE_1 = "1";
|
||||
/**
|
||||
* 企业标准 表名
|
||||
* 检索方式:1:全文检索 2:标题检索
|
||||
*/
|
||||
public static final String SEARCH_MODE_2 = "2";
|
||||
}
|
||||
|
||||
+27
-6
@@ -6,19 +6,19 @@ import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.constant.CommonConstant;
|
||||
import com.jero.modules.laws.home.dto.LawsHomeNormalSearchDTO;
|
||||
import com.jero.modules.laws.home.service.ILawsHomeSearchService;
|
||||
import com.jero.modules.laws.home.vo.LawsHomeAdvancedSearchClauseVO;
|
||||
import com.jero.modules.laws.home.vo.LawsHomeNormalSearchStatisticsVO;
|
||||
import com.jero.modules.laws.home.vo.LawsHomeNormalSearchVO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author lqt
|
||||
@@ -72,10 +72,31 @@ public class LawsHomeSearchController {
|
||||
return Result.OK(lawsHomeSearchService.getNormalSearchAllCount(homeNormalSearchDTO));
|
||||
}
|
||||
|
||||
@AutoLog(value = "首页-导出", operateType = CommonConstant.OPERATE_TYPE_6)
|
||||
@ApiOperation(value="首页-导出", notes="首页-导出")
|
||||
@AutoLog(value = "首页-一般检索导出", operateType = CommonConstant.OPERATE_TYPE_6)
|
||||
@ApiOperation(value="首页-一般检索导出", notes="首页-一般检索导出")
|
||||
@GetMapping(value = "/normalSearchExportExcel")
|
||||
public ModelAndView normalSearchExportExcel(LawsHomeNormalSearchDTO lawsHomeNormalSearchDTO) {
|
||||
return lawsHomeSearchService.normalSearchExportExcel(lawsHomeNormalSearchDTO);
|
||||
}
|
||||
|
||||
@AutoLog(value = "首页-高级检索(全部)", operateType = CommonConstant.OPERATE_TYPE_1)
|
||||
@ApiOperation(value="首页-高级检索(全部)", notes="首页-高级检索(全部)")
|
||||
@GetMapping(value = "/getAdvancedSearchAll")
|
||||
public Result<IPage<Map<String,Object>>> getAdvancedSearchAll(Map<String,Object> parameterMap) {
|
||||
return lawsHomeSearchService.getAdvancedSearchAll(parameterMap);
|
||||
}
|
||||
|
||||
@AutoLog(value = "首页-高级检索(条款)", operateType = CommonConstant.OPERATE_TYPE_1)
|
||||
@ApiOperation(value="首页-高级检索(条款)", notes="首页-高级检索(条款)")
|
||||
@PostMapping(value = "/getAdvancedSearchClause")
|
||||
public Result<List<LawsHomeAdvancedSearchClauseVO>> getAdvancedSearchClause(@RequestBody Map<String,Object> parameterMap) {
|
||||
return Result.OK(lawsHomeSearchService.getAdvancedSearchClause(parameterMap));
|
||||
}
|
||||
|
||||
@AutoLog(value = "首页-高级检索导出", operateType = CommonConstant.OPERATE_TYPE_6)
|
||||
@ApiOperation(value="首页-高级检索导出", notes="首页-高级检索导出")
|
||||
@PostMapping(value = "/advancedSearchExportExcel")
|
||||
public ModelAndView advancedSearchExportExcel(@RequestBody Map<String,Object> parameterMap) {
|
||||
return lawsHomeSearchService.advancedSearchExportExcel(parameterMap);
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -60,9 +60,9 @@ public class LawsHomeNormalSearchDTO implements Serializable {
|
||||
@ApiModelProperty(value = "状态 (数据字典 只有外来标准法规:standard_state (全部传空)")
|
||||
private String standardState;
|
||||
/**
|
||||
* 标准分类代码 (数据字典 只有企业标准:standard_sort_code (全部传空)
|
||||
* 标准分类代码 (数据字典 只有企业标准:standard_category_code (全部传空)
|
||||
*/
|
||||
@ApiModelProperty(value = "标准分类代码 (数据字典 只有企业标准:standard_sort_code (全部传空)")
|
||||
@ApiModelProperty(value = "标准分类代码 (数据字典 只有企业标准:standard_category_code (全部传空)")
|
||||
private String categoryCode;
|
||||
/**
|
||||
* 标准状态 (数据字典 只有企业标准:enterprise_standard_state (全部传空)
|
||||
|
||||
+2
-2
@@ -77,9 +77,9 @@ public class LawsHomeNormalSearchHistory implements Serializable {
|
||||
@ApiModelProperty(value = "状态 (数据字典 只有外来标准法规:standard_state (全部传空)")
|
||||
private String standardState;
|
||||
/**
|
||||
* 标准分类代码 (数据字典 只有企业标准:standard_sort_code (全部传空)
|
||||
* 标准分类代码 (数据字典 只有企业标准:standard_category_code (全部传空)
|
||||
*/
|
||||
@ApiModelProperty(value = "标准分类代码 (数据字典 只有企业标准:standard_sort_code (全部传空)")
|
||||
@ApiModelProperty(value = "标准分类代码 (数据字典 只有企业标准:standard_category_code (全部传空)")
|
||||
private String categoryCode;
|
||||
/**
|
||||
* 标准状态 (数据字典 只有企业标准:enterprise_standard_state (全部传空)
|
||||
|
||||
+3
-6
@@ -87,13 +87,10 @@
|
||||
<where>${ew.sqlSegment}</where> group by standard_state
|
||||
</select>
|
||||
<select id="getCount3" resultType="com.jero.modules.laws.home.vo.LawsHomeNormalSearchCountVO">
|
||||
select 'grade_classification' as field_name,grade_classification as dict,count(*) as count from laws_enterprise_standard
|
||||
<where>${ew.sqlSegment}</where> group by grade_classification
|
||||
select 'standard_category_code' as field_name,category_code dict,count(*) count from laws_enterprise_standard
|
||||
<where>${ew.sqlSegment}</where> group by category_code
|
||||
union all
|
||||
select 'standard_code' as field_name,standard_code,count(*) from laws_enterprise_standard
|
||||
<where>${ew.sqlSegment}</where> group by standard_code
|
||||
union all
|
||||
select 'standard_state' as field_name,standard_state,count(*) from laws_enterprise_standard
|
||||
select 'standard_state' as field_name ,standard_state dict,count(*) count from laws_enterprise_standard
|
||||
<where>${ew.sqlSegment}</where> group by standard_state
|
||||
</select>
|
||||
<select id="translateManyDict" resultType="com.jero.common.system.vo.SysDictItemCore">
|
||||
|
||||
+24
@@ -1,12 +1,15 @@
|
||||
package com.jero.modules.laws.home.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.modules.laws.home.dto.LawsHomeNormalSearchDTO;
|
||||
import com.jero.modules.laws.home.vo.LawsHomeAdvancedSearchClauseVO;
|
||||
import com.jero.modules.laws.home.vo.LawsHomeNormalSearchStatisticsVO;
|
||||
import com.jero.modules.laws.home.vo.LawsHomeNormalSearchVO;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author lqt
|
||||
@@ -82,4 +85,25 @@ public interface ILawsHomeSearchService {
|
||||
* @return
|
||||
*/
|
||||
ModelAndView normalSearchExportExcel(LawsHomeNormalSearchDTO lawsHomeNormalSearchDTO);
|
||||
|
||||
/**
|
||||
* 高级检索导出
|
||||
* @param parameterMap
|
||||
* @return
|
||||
*/
|
||||
ModelAndView advancedSearchExportExcel(Map<String, Object> parameterMap);
|
||||
|
||||
/**
|
||||
* 高级检索(全部)
|
||||
* @param parameterMap
|
||||
* @return
|
||||
*/
|
||||
Result<IPage<Map<String, Object>>> getAdvancedSearchAll(Map<String, Object> parameterMap);
|
||||
|
||||
/**
|
||||
* 首页-高级检索(条款)
|
||||
* @param parameterMap
|
||||
* @return
|
||||
*/
|
||||
List<LawsHomeAdvancedSearchClauseVO> getAdvancedSearchClause(Map<String, Object> parameterMap);
|
||||
}
|
||||
|
||||
+342
-9
@@ -10,15 +10,20 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.google.common.base.CaseFormat;
|
||||
import com.jero.common.api.CommonAPI;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.api.vo.ResultCommon;
|
||||
import com.jero.common.es.JeroElasticsearchTemplate;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.api.ISysBaseAPI;
|
||||
import com.jero.common.system.vo.DictModel;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.common.util.BeanCopyUtils;
|
||||
import com.jero.common.util.SnowflakeUtils;
|
||||
import com.jero.common.util.oConvertUtils;
|
||||
import com.jero.modules.document.utils.ReadPdfUtil;
|
||||
import com.jero.modules.document.utils.ReadWordUtil;
|
||||
import com.jero.modules.laws.common.mapper.LawsCommonMapper;
|
||||
import com.jero.modules.laws.documenttool.service.IDocumentSplitService;
|
||||
import com.jero.modules.laws.home.common.LawsHomeSearchCommon;
|
||||
import com.jero.modules.laws.home.dto.LawsHomeNormalSearchDTO;
|
||||
import com.jero.modules.laws.home.entity.LawsHomeNormalSearchHistory;
|
||||
@@ -27,6 +32,8 @@ import com.jero.modules.laws.home.mapper.LawsHomeSearchMapper;
|
||||
import com.jero.modules.laws.home.service.ILawsHomeNormalSearchHistoryService;
|
||||
import com.jero.modules.laws.home.service.ILawsHomeSearchService;
|
||||
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.LawsEnterpriseStandard;
|
||||
import com.jero.modules.laws.standard.entity.LawsNewsFeed;
|
||||
@@ -36,6 +43,10 @@ import com.jero.modules.laws.standard.service.ILawsEnterpriseStandardService;
|
||||
import com.jero.modules.laws.standard.service.ILawsNewsFeedService;
|
||||
import com.jero.modules.oss.entity.OSSFile;
|
||||
import com.jero.modules.oss.service.IOSSFileService;
|
||||
import com.jero.modules.split.entity.SarFileSplitInfoEO;
|
||||
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.tag.entity.LawsTag;
|
||||
import com.jero.modules.tag.service.ILawsTagService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -95,6 +106,20 @@ public class LawsHomeSearchServiceImpl implements ILawsHomeSearchService {
|
||||
private CommonAPI commonAPI;
|
||||
@Resource
|
||||
private ILawsTagService lawsTagService;
|
||||
@Resource
|
||||
private LawsDomesticController lawsDomesticController;
|
||||
@Resource
|
||||
private LawsEnterpriseController lawsEnterpriseController;
|
||||
@Resource
|
||||
private LawsCommonMapper lawsCommonMapper;
|
||||
@Resource
|
||||
private ISysDictService sysDictService;
|
||||
@Resource
|
||||
private ISysDictItemService sysDictItemService;
|
||||
@Resource
|
||||
private IDocumentSplitService documentSplitService;
|
||||
@Resource
|
||||
private ISarFileSplitInfoService sarFileSplitInfoService;
|
||||
|
||||
@Value(value = "${jero.path.upload}")
|
||||
private String uploadpath;
|
||||
@@ -104,10 +129,11 @@ public class LawsHomeSearchServiceImpl implements ILawsHomeSearchService {
|
||||
public static final String RESOURCE_TYPE = "resource_type";
|
||||
public static final String STANDARD_TYPE = "standard_type";
|
||||
public static final String CREATE_TIME = "create_time";
|
||||
public static final String STANDARD_SORT_CODE = "standard_sort_code";
|
||||
public static final String CATEGORY_CODE = "category_code";
|
||||
public static final String STANDARD_CATEGORY_CODE = "standard_category_code";
|
||||
public static final String ENTERPRISE_STANDARD_STATE = "enterprise_standard_state";
|
||||
public static final String STANDARD_STATE = "standard_state";
|
||||
public static final String GRADE_CLASSIFICATION = "grade_classification";
|
||||
// public static final String GRADE_CLASSIFICATION = "grade_classification";
|
||||
public static final String STANDARD_CLASS = "standard_class";
|
||||
public static final String APPLICABLE_VEHICLE = "applicable_vehicle";
|
||||
public static final String DYNAMIC_TYPE = "dynamic_type";
|
||||
@@ -421,6 +447,14 @@ public class LawsHomeSearchServiceImpl implements ILawsHomeSearchService {
|
||||
return listLawsEnterpriseStandard;
|
||||
}
|
||||
|
||||
private List<LawsOverseasStandard> listLawsOverseasStandard(List<String> lawsOverseasStandardIds) {
|
||||
List<LawsOverseasStandard> listLawsOverseasStandard = new ArrayList<>();
|
||||
if(!CollectionUtils.isEmpty(lawsOverseasStandardIds)){
|
||||
// listLawsOverseasStandard = lawsOverseasStandardService.listByIds(lawsOverseasStandardIds);
|
||||
}
|
||||
return listLawsOverseasStandard;
|
||||
}
|
||||
|
||||
private List<LawsDomesticStandard> listLawsDomesticStandard(List<String> lawsDomesticStandardIds) {
|
||||
List<LawsDomesticStandard> listLawsDomesticStandard = new ArrayList<>();
|
||||
if(!CollectionUtils.isEmpty(lawsDomesticStandardIds)){
|
||||
@@ -598,7 +632,7 @@ public class LawsHomeSearchServiceImpl implements ILawsHomeSearchService {
|
||||
|
||||
private void count3(List<LawsHomeNormalSearchCountVO> list,LawsHomeNormalSearchStatisticsVO obj) {
|
||||
// 标准分类代码
|
||||
List<LawsHomeNormalSearchStatisticsObjVO> list1 = addLawsHomeNormalSearchStatistics(list, STANDARD_SORT_CODE, STANDARD_SORT_CODE);
|
||||
List<LawsHomeNormalSearchStatisticsObjVO> list1 = addLawsHomeNormalSearchStatistics(list, STANDARD_CATEGORY_CODE, CATEGORY_CODE);
|
||||
if(!CollectionUtils.isEmpty(list1)){
|
||||
obj.setCategoryCode(list1);
|
||||
}
|
||||
@@ -721,7 +755,7 @@ public class LawsHomeSearchServiceImpl implements ILawsHomeSearchService {
|
||||
mapDict.put(STANDARD_STATE,homeNormalSearchDTO.getStandardState());
|
||||
}
|
||||
if(!StringUtils.isBlank(homeNormalSearchDTO.getCategoryCode())){
|
||||
mapDict.put(STANDARD_SORT_CODE,homeNormalSearchDTO.getCategoryCode());
|
||||
mapDict.put(STANDARD_CATEGORY_CODE,homeNormalSearchDTO.getCategoryCode());
|
||||
}
|
||||
if(!StringUtils.isBlank(homeNormalSearchDTO.getEnterpriseStandardState())){
|
||||
mapDict.put(ENTERPRISE_STANDARD_STATE,homeNormalSearchDTO.getEnterpriseStandardState());
|
||||
@@ -800,6 +834,12 @@ public class LawsHomeSearchServiceImpl implements ILawsHomeSearchService {
|
||||
m3.put("standard_state_order.keyword",mAsc3);
|
||||
sort.add(m3);
|
||||
|
||||
Map<String,Object> m33 = new HashMap<>();
|
||||
Map<String,Object> mDesc44 = new HashMap<>();
|
||||
mDesc44.put(order,"desc");
|
||||
m33.put("release_date",mDesc44);
|
||||
sort.add(m33);
|
||||
|
||||
Map<String,Object> m4 = new HashMap<>();
|
||||
Map<String,Object> mDesc4 = new HashMap<>();
|
||||
mDesc4.put(order,"desc");
|
||||
@@ -813,7 +853,7 @@ public class LawsHomeSearchServiceImpl implements ILawsHomeSearchService {
|
||||
sort.add(m5);
|
||||
|
||||
// 查询字段
|
||||
List<String> arr = Arrays.asList(CONTENT,"title",RESOURCE_TYPE,"id","release_date","standard_state");
|
||||
List<String> arr = Arrays.asList(CONTENT,"title",RESOURCE_TYPE,"id","release_date","standard_state","implementation_date");
|
||||
IPage page = getIPage(queryMapJsonAll, mapHighlight1,
|
||||
pageNo, pageSize, sort,arr);
|
||||
getRecords(page);
|
||||
@@ -859,6 +899,10 @@ public class LawsHomeSearchServiceImpl implements ILawsHomeSearchService {
|
||||
if(map.containsKey(releaseDate) && !Objects.isNull(map.get(releaseDate))){
|
||||
map.put(releaseDate,new SimpleDateFormat(YYYY_MM_DD).format(Long.parseLong(map.get(releaseDate).toString())));
|
||||
}
|
||||
String implementationDate = "implementationDate";
|
||||
if(map.containsKey(implementationDate) && !Objects.isNull(map.get(implementationDate))){
|
||||
map.put(implementationDate,new SimpleDateFormat(YYYY_MM_DD).format(Long.parseLong(map.get(implementationDate).toString())));
|
||||
}
|
||||
String createTime = "createTime";
|
||||
if(map.containsKey(createTime) && !Objects.isNull(map.get(createTime))){
|
||||
map.put(createTime,new SimpleDateFormat(YYYY_MM_DD).format(Long.parseLong(map.get(createTime).toString())));
|
||||
@@ -1019,9 +1063,9 @@ public class LawsHomeSearchServiceImpl implements ILawsHomeSearchService {
|
||||
listField.add(APPLICABLE_VEHICLE);
|
||||
listField.add(STANDARD_PROPERTY);
|
||||
listField.add(STANDARD_STATE);
|
||||
listField.add(STANDARD_SORT_CODE);
|
||||
listField.add(CATEGORY_CODE);
|
||||
listField.add(ENTERPRISE_STANDARD_STATE);
|
||||
listField.add(GRADE_CLASSIFICATION);
|
||||
// listField.add(GRADE_CLASSIFICATION);
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
for (String s : listField) {
|
||||
@@ -1094,7 +1138,7 @@ public class LawsHomeSearchServiceImpl implements ILawsHomeSearchService {
|
||||
// break;
|
||||
case LawsHomeSearchCommon.LAWS_ENTERPRISE_STANDARD:
|
||||
List<LawsHomeNormalSearchCountVO> list3 = new ArrayList<>();
|
||||
addVo(search, list3, "standard_sort_code_aggs", STANDARD_SORT_CODE);
|
||||
addVo(search, list3, "category_code_aggs", CATEGORY_CODE);
|
||||
addVo(search, list3, standardStateAggs, STANDARD_STATE);
|
||||
// addVo(search, list3, "grade_classification_aggs", GRADE_CLASSIFICATION);
|
||||
count3(list3,objVo);
|
||||
@@ -1177,6 +1221,9 @@ public class LawsHomeSearchServiceImpl implements ILawsHomeSearchService {
|
||||
case LawsHomeSearchCommon.LAWS_DOMESTIC_STANDARD:
|
||||
updateLawsDomesticStandardToEs(resourceType,ids,opType);
|
||||
break;
|
||||
// case LawsHomeSearchCommon.LAWS_OVERSEAS_STANDARD:
|
||||
// updateLawsOverseasStandardToEs(resourceType,ids,opType);
|
||||
// break;
|
||||
case LawsHomeSearchCommon.LAWS_ENTERPRISE_STANDARD:
|
||||
updateLawsEnterpriseStandardToEs(resourceType,ids,opType);
|
||||
break;
|
||||
@@ -1260,6 +1307,242 @@ public class LawsHomeSearchServiceImpl implements ILawsHomeSearchService {
|
||||
return mv;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModelAndView advancedSearchExportExcel(Map<String, Object> parameterMap) {
|
||||
String resourceType = String.valueOf(parameterMap.get("resourceType"));
|
||||
if (LawsHomeSearchCommon.LAWS_DOMESTIC_STANDARD.equals(resourceType)){
|
||||
// 外来标准法规
|
||||
return exportExcelByDomestic(parameterMap);
|
||||
}else if (LawsHomeSearchCommon.LAWS_ENTERPRISE_STANDARD.equals(resourceType)){
|
||||
// 企业标准
|
||||
return exportExcelByEnterprise(parameterMap);
|
||||
}else if (LawsHomeSearchCommon.LAWS_DOCUMENT.equals(resourceType)){
|
||||
// 条款
|
||||
return exportExcelByClause(parameterMap);
|
||||
}else {
|
||||
// 全部
|
||||
return exportExcelByAll(parameterMap);
|
||||
}
|
||||
}
|
||||
|
||||
private ModelAndView exportExcelByAll(Map<String, Object> parameterMap) {
|
||||
Result<IPage<Map<String, Object>>> advancedSearchAll = getAdvancedSearchAll(parameterMap);
|
||||
List<LawsHomeAdvancedSearchExportExcelVO> lawsHomeAdvancedSearchExportExcelVOS =
|
||||
JSON.parseArray(JSON.toJSONString(advancedSearchAll.getResult().getRecords()),
|
||||
LawsHomeAdvancedSearchExportExcelVO.class);
|
||||
|
||||
// Step.3 AutoPoi 导出Excel
|
||||
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
|
||||
try {
|
||||
mv.addObject("fileName", URLEncoder.encode("高级检索-全部", "UTF-8")); //此处设置的filename无效 ,前端会重更新设置一下
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
mv.addObject("entity", LawsHomeAdvancedSearchExportExcelVO.class);
|
||||
//update-begin--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置--------------------
|
||||
ExportParams exportParams=new ExportParams(null, "高级检索-全部");
|
||||
exportParams.setType(ExcelType.XSSF);
|
||||
//update-end--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置----------------------
|
||||
mv.addObject("params",exportParams);
|
||||
mv.addObject(NormalExcelConstants.DATA_LIST, lawsHomeAdvancedSearchExportExcelVOS);
|
||||
return mv;
|
||||
}
|
||||
|
||||
private ModelAndView exportExcelByClause(Map<String, Object> parameterMap) {
|
||||
List<LawsHomeAdvancedSearchClauseVO> advancedSearchClause = getAdvancedSearchClause(parameterMap);
|
||||
List<Map<String, Object>> list = new ArrayList<>();
|
||||
|
||||
// 标准sheet页
|
||||
List<LawsHomeAdvancedSearchStandardExcelVO> lawsHomeAdvancedSearchStandardExcelVOList =
|
||||
BeanCopyUtils.copyBeanList(advancedSearchClause, LawsHomeAdvancedSearchStandardExcelVO.class);
|
||||
Map<String, Object> standardSheet = new HashMap<>();
|
||||
standardSheet.put(NormalExcelConstants.CLASS, LawsHomeAdvancedSearchStandardExcelVO.class);
|
||||
ExportParams exportParams = new ExportParams(null, "标准");
|
||||
exportParams.setType(ExcelType.XSSF);
|
||||
standardSheet.put(NormalExcelConstants.PARAMS, exportParams);
|
||||
standardSheet.put(NormalExcelConstants.DATA_LIST, lawsHomeAdvancedSearchStandardExcelVOList);
|
||||
list.add(standardSheet);
|
||||
|
||||
for (LawsHomeAdvancedSearchClauseVO lawsHomeAdvancedSearchClauseVO : advancedSearchClause) {
|
||||
List<Map<String, Object>> clauseList = lawsHomeAdvancedSearchClauseVO.getClauseList();
|
||||
List<LawsHomeAdvancedSearchClauseExcelVO> lawsHomeAdvancedSearchClauseExcelVOS =
|
||||
JSON.parseArray(JSON.toJSONString(clauseList), LawsHomeAdvancedSearchClauseExcelVO.class);
|
||||
// 条款sheet页
|
||||
Map<String, Object> clauseSheet = new HashMap<>();
|
||||
clauseSheet.put(NormalExcelConstants.CLASS, LawsHomeAdvancedSearchClauseExcelVO.class);
|
||||
ExportParams exportParamss = new ExportParams(null, lawsHomeAdvancedSearchClauseVO.getStandardNumber());
|
||||
exportParamss.setType(ExcelType.XSSF);
|
||||
clauseSheet.put(NormalExcelConstants.PARAMS, exportParamss);
|
||||
clauseSheet.put(NormalExcelConstants.DATA_LIST, lawsHomeAdvancedSearchClauseExcelVOS);
|
||||
list.add(clauseSheet);
|
||||
}
|
||||
|
||||
// 导出Excel
|
||||
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
|
||||
try {
|
||||
mv.addObject("fileName", URLEncoder.encode("高级检索-条款", "UTF-8")); //此处设置的filename无效 ,前端会重更新设置一下
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
mv.addObject(NormalExcelConstants.MAP_LIST, list);
|
||||
return mv;
|
||||
}
|
||||
|
||||
private ModelAndView exportExcelByEnterprise(Map<String, Object> parameterMap) {
|
||||
Result<IPage<Map<String, Object>>> commonPageNoPermissions =
|
||||
lawsEnterpriseController.getCommonPageNoPermissions(parameterMap);
|
||||
List<LawsHomeAdvancedSearchExportExcelVO> lawsHomeAdvancedSearchExportExcelVOS =
|
||||
JSON.parseArray(JSON.toJSONString(commonPageNoPermissions.getResult().getRecords()),
|
||||
LawsHomeAdvancedSearchExportExcelVO.class);
|
||||
for (LawsHomeAdvancedSearchExportExcelVO lawsHomeAdvancedSearchExportExcelVO : lawsHomeAdvancedSearchExportExcelVOS) {
|
||||
lawsHomeAdvancedSearchExportExcelVO.setResourceType(LawsHomeSearchCommon.LAWS_ENTERPRISE_STANDARD);
|
||||
}
|
||||
|
||||
|
||||
// Step.3 AutoPoi 导出Excel
|
||||
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
|
||||
try {
|
||||
mv.addObject("fileName", URLEncoder.encode("高级检索-企业标准", "UTF-8")); //此处设置的filename无效 ,前端会重更新设置一下
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
mv.addObject("entity", LawsHomeAdvancedSearchExportExcelVO.class);
|
||||
//update-begin--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置--------------------
|
||||
ExportParams exportParams=new ExportParams(null, "高级检索-企业标准");
|
||||
exportParams.setType(ExcelType.XSSF);
|
||||
//update-end--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置----------------------
|
||||
mv.addObject("params",exportParams);
|
||||
mv.addObject(NormalExcelConstants.DATA_LIST, lawsHomeAdvancedSearchExportExcelVOS);
|
||||
return mv;
|
||||
}
|
||||
|
||||
private ModelAndView exportExcelByDomestic(Map<String, Object> parameterMap) {
|
||||
Result<IPage<Map<String, Object>>> commonPageNoPermissions =
|
||||
lawsDomesticController.getCommonPageNoPermissions(parameterMap);
|
||||
List<LawsHomeAdvancedSearchExportExcelVO> lawsHomeAdvancedSearchExportExcelVOS =
|
||||
JSON.parseArray(JSON.toJSONString(commonPageNoPermissions.getResult().getRecords()),
|
||||
LawsHomeAdvancedSearchExportExcelVO.class);
|
||||
for (LawsHomeAdvancedSearchExportExcelVO lawsHomeAdvancedSearchExportExcelVO : lawsHomeAdvancedSearchExportExcelVOS) {
|
||||
lawsHomeAdvancedSearchExportExcelVO.setResourceType(LawsHomeSearchCommon.LAWS_DOMESTIC_STANDARD);
|
||||
}
|
||||
|
||||
// Step.3 AutoPoi 导出Excel
|
||||
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
|
||||
try {
|
||||
mv.addObject("fileName", URLEncoder.encode("高级检索-外来标准法规", "UTF-8")); //此处设置的filename无效 ,前端会重更新设置一下
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
mv.addObject("entity", LawsHomeAdvancedSearchExportExcelVO.class);
|
||||
//update-begin--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置--------------------
|
||||
ExportParams exportParams=new ExportParams(null, "高级检索-外来标准法规");
|
||||
exportParams.setType(ExcelType.XSSF);
|
||||
//update-end--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置----------------------
|
||||
mv.addObject("params",exportParams);
|
||||
mv.addObject(NormalExcelConstants.DATA_LIST, lawsHomeAdvancedSearchExportExcelVOS);
|
||||
return mv;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<IPage<Map<String, Object>>> getAdvancedSearchAll(Map<String, Object> parameterMap) {
|
||||
Map<String, Object> parameterMapByEnterprise = new HashMap<>(parameterMap);
|
||||
boolean isEnterprise = true;
|
||||
// 外来标准法规
|
||||
Result<IPage<Map<String, Object>>> commonPageNoPermissionsResult =
|
||||
lawsDomesticController.getCommonPageNoPermissions(parameterMap);
|
||||
|
||||
if (!Objects.isNull(parameterMap.get("standard_class"))){
|
||||
// 标准类别(只有外来标准法规有该字段)
|
||||
return commonPageNoPermissionsResult;
|
||||
}
|
||||
Object standardState = parameterMap.get("standard_state");
|
||||
if (!Objects.isNull(standardState)){
|
||||
isEnterprise = false;
|
||||
// 外来标准法规和企业标准的 标准状态 不同需要转换
|
||||
// 外来标准法规 现行/发布/报批/审查/征求意见/草案/废止
|
||||
// 企业标准 现行有效、废止
|
||||
String standardStateText =
|
||||
sysDictService.queryDictText("standard_state", String.valueOf(standardState));
|
||||
List<String> standardStateList = new ArrayList<>();
|
||||
List<DictModel> dictItems = sysDictService.getDictItems("enterprise_standard_state");
|
||||
if (standardStateText.contains("现行")){
|
||||
Optional<DictModel> optionalDictModel =
|
||||
dictItems.stream().filter(v -> "现行".equals(v.getText())).findFirst();
|
||||
optionalDictModel.ifPresent(v -> standardStateList.add(v.getValue()));
|
||||
}
|
||||
if (standardStateText.contains("废止")){
|
||||
Optional<DictModel> optionalDictModel =
|
||||
dictItems.stream().filter(v -> "废止".equals(v.getText())).findFirst();
|
||||
optionalDictModel.ifPresent(v -> standardStateList.add(v.getValue()));
|
||||
}
|
||||
if (!standardStateList.isEmpty()){
|
||||
isEnterprise = true;
|
||||
parameterMapByEnterprise.put("standard_state", String.join(",", standardStateList));
|
||||
}
|
||||
}
|
||||
|
||||
// 查询企业标准
|
||||
if (isEnterprise){
|
||||
Result<IPage<Map<String, Object>>> commonPageNoPermissionsResultByEnterpriseResult =
|
||||
lawsEnterpriseController.getCommonPageNoPermissions(parameterMapByEnterprise);
|
||||
// 汇总数据
|
||||
List<Map> maps1 = JSON.parseArray(JSON.toJSONString(commonPageNoPermissionsResult.getResult().getRecords()),
|
||||
Map.class);
|
||||
List<Map> maps2 = JSON.parseArray(
|
||||
JSON.toJSONString(commonPageNoPermissionsResultByEnterpriseResult.getResult().getRecords()),
|
||||
Map.class);
|
||||
maps1.addAll(maps2);
|
||||
// 排序
|
||||
Comparator<Map> createTime = Comparator.comparing(map -> (Date) map.get("create_time"));
|
||||
Comparator<Map> reversed = createTime.reversed();
|
||||
maps1.sort(reversed);
|
||||
|
||||
// 手动分页
|
||||
maps1 = maps1.stream()
|
||||
.skip((Math.max(1, (Long) parameterMap.get("pageNo")) - 1) * (Long) parameterMap.get("pageSize"))
|
||||
.limit((Long) parameterMap.get("pageSize"))
|
||||
.collect(Collectors.toList());
|
||||
commonPageNoPermissionsResult.getResult().setRecords((List<Map<String, Object>>) (List<?>)maps1);
|
||||
commonPageNoPermissionsResult.getResult().setTotal(maps1.size());
|
||||
}
|
||||
|
||||
return commonPageNoPermissionsResult;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<LawsHomeAdvancedSearchClauseVO> getAdvancedSearchClause(Map<String, Object> parameterMap) {
|
||||
List<LawsHomeAdvancedSearchClauseVO> lawsHomeAdvancedSearchClauseVOList = new ArrayList<>();
|
||||
List<Map<String, Object>> data = documentSplitService.queryDocumentSplitDetailByList(parameterMap);
|
||||
// 根据info_id分组
|
||||
if (!data.isEmpty()){
|
||||
Map<String, List<Map<String, Object>>> groupMap =
|
||||
data.stream().collect(Collectors.groupingBy(v -> String.valueOf(v.get("info_id"))));
|
||||
groupMap.forEach((k, v) -> {
|
||||
// 封装数据
|
||||
SarFileSplitInfoEO sarFileSplitInfoEO = sarFileSplitInfoService.queryById(k);
|
||||
if (!Objects.isNull(sarFileSplitInfoEO)){
|
||||
LawsDomesticStandard lawsDomesticStandard =
|
||||
lawsDomesticStandardService.getOne(new LambdaQueryWrapper<LawsDomesticStandard>()
|
||||
.select(LawsDomesticStandard::getStandardNumber,
|
||||
LawsDomesticStandard::getStandardName)
|
||||
.eq(LawsDomesticStandard::getId, sarFileSplitInfoEO.getStandardId()));
|
||||
if (!Objects.isNull(lawsDomesticStandard)){
|
||||
LawsHomeAdvancedSearchClauseVO lawsHomeAdvancedSearchClauseVO =
|
||||
new LawsHomeAdvancedSearchClauseVO();
|
||||
lawsHomeAdvancedSearchClauseVO.setStandardId(sarFileSplitInfoEO.getStandardId());
|
||||
lawsHomeAdvancedSearchClauseVO.setStandardNumber(lawsDomesticStandard.getStandardNumber());
|
||||
lawsHomeAdvancedSearchClauseVO.setStandardName(lawsDomesticStandard.getStandardName());
|
||||
lawsHomeAdvancedSearchClauseVO.setStandardNumberAndName(
|
||||
lawsDomesticStandard.getStandardNumber() + " " + lawsDomesticStandard.getStandardName());
|
||||
lawsHomeAdvancedSearchClauseVO.setClauseList(v);
|
||||
lawsHomeAdvancedSearchClauseVOList.add(lawsHomeAdvancedSearchClauseVO);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
return lawsHomeAdvancedSearchClauseVOList;
|
||||
}
|
||||
|
||||
private boolean updateLawsDomesticStandardToEs(String resourceType, String ids,String opType) {
|
||||
// 批量操作
|
||||
// 从第0个下标开始
|
||||
@@ -1376,6 +1659,50 @@ public class LawsHomeSearchServiceImpl implements ILawsHomeSearchService {
|
||||
}
|
||||
}
|
||||
|
||||
private void updateLawsOverseasStandardToEs(String resourceType, String ids,String opType) {
|
||||
// 批量操作
|
||||
// 从第0个下标开始
|
||||
// int startIndex = 0;
|
||||
// int batchCount = 2000;
|
||||
// List<String> listIds = Arrays.asList(ids.split(","));
|
||||
// while (startIndex < listIds.size()) {
|
||||
// int endIndex = getEndIndex(startIndex, batchCount, listIds);
|
||||
// List<String> listIdsSub = listIds.subList(startIndex, endIndex);
|
||||
//// List<LawsOverseasStandard> listLawsOverseasStandard = lawsOverseasStandardService.listByIds(listIdsSub);
|
||||
// if(CollectionUtils.isEmpty(listLawsOverseasStandard)){
|
||||
// break;
|
||||
// }
|
||||
// for (LawsOverseasStandard lawsOverseasStandard : listLawsOverseasStandard) {
|
||||
// try {
|
||||
// LawsHomeNormalSearchVO obj = new LawsHomeNormalSearchVO();
|
||||
// obj.setId(lawsOverseasStandard.getId());
|
||||
// obj.setTitle(lawsOverseasStandard.getStandardNumber() + " " + lawsOverseasStandard.getStandardName());
|
||||
// obj.setResourceType(resourceType);
|
||||
// obj.setStandardTypeOrder("7");
|
||||
// switch (lawsOverseasStandard.getStandardState()){
|
||||
// case "5": obj.setStandardStateOrder("2");break;
|
||||
// case "6": obj.setStandardStateOrder("1");break;
|
||||
// case "7": obj.setStandardStateOrder("3");break;
|
||||
// default: obj.setStandardStateOrder("4");break;
|
||||
// }
|
||||
// obj.setImplementationDate(lawsOverseasStandard.getImplementationDate());
|
||||
// obj.setCreateTime(lawsOverseasStandard.getCreateTime());
|
||||
// obj.setReleaseDate(lawsOverseasStandard.getReleaseDate());
|
||||
// obj.setStandardClass(lawsOverseasStandard.getStandardClass());
|
||||
// obj.setApplicableVehicle(lawsOverseasStandard.getApplicableVehicle());
|
||||
// obj.setStandardState(lawsOverseasStandard.getStandardState());
|
||||
//// obj.setPushRangeFlag(2);
|
||||
//// obj.setReleaseStatus("1");
|
||||
// List<OSSFile> listFile = getOssFilesLawsOverseasStandard(lawsOverseasStandard);
|
||||
// updateES(opType, obj, listFile, lawsOverseasStandard.getId());
|
||||
// }catch (Exception e){
|
||||
// log.error(SYNC_ES_ERR,e.getMessage());
|
||||
// }
|
||||
// }
|
||||
// startIndex = startIndex + batchCount; // 下一批
|
||||
// }
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private List<OSSFile> getOssFilesLawsOverseasStandard(LawsOverseasStandard lawsOverseasStandard) {
|
||||
// 从过程稿件从上到下顺序检索;如果文档里有发布稿,只检索发布稿
|
||||
@@ -1583,7 +1910,7 @@ public class LawsHomeSearchServiceImpl implements ILawsHomeSearchService {
|
||||
map.put(APPLICABLE_VEHICLE, "," + obj.getApplicableVehicle() + ",");
|
||||
map.put(STANDARD_PROPERTY, "," + obj.getStandardProperty() + ",");
|
||||
map.put(STANDARD_STATE, "," + obj.getStandardState() + ",");
|
||||
map.put(STANDARD_SORT_CODE,"," + obj.getCategoryCode() + ",");
|
||||
map.put(STANDARD_CATEGORY_CODE,"," + obj.getCategoryCode() + ",");
|
||||
map.put(ENTERPRISE_STANDARD_STATE,"," + obj.getEnterpriseStandardState() + ",");
|
||||
map.put("release_date",obj.getReleaseDate());
|
||||
// 没有时间 强行加入最早时间
|
||||
@@ -1605,4 +1932,10 @@ public class LawsHomeSearchServiceImpl implements ILawsHomeSearchService {
|
||||
log.error("文档库添加es失败",e);
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
for (int i = 0; i < 14; i++) {
|
||||
System.out.println(SnowflakeUtils.snowflake());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+119
@@ -0,0 +1,119 @@
|
||||
package com.jero.modules.laws.home.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @ClassName: LawsHomeNormalSearchExportExcelVO
|
||||
* @Description:
|
||||
* @Author: yjz
|
||||
* @Date: 2024-06-18 15:43
|
||||
* @Version: 1.0
|
||||
**/
|
||||
@Data
|
||||
public class LawsHomeAdvancedSearchClauseExcelVO implements Serializable {
|
||||
/**
|
||||
* 条款号
|
||||
*/
|
||||
@ApiModelProperty(value = "条款号")
|
||||
@Excel(name = "条款号", width = 15)
|
||||
private String itemNum;
|
||||
|
||||
/**
|
||||
* 标准标题
|
||||
*/
|
||||
@ApiModelProperty(value = "标准标题")
|
||||
@Excel(name = "标准标题", width = 15)
|
||||
private String itemTitle;
|
||||
|
||||
/**
|
||||
* 条款内容
|
||||
*/
|
||||
@ApiModelProperty(value = "条款内容")
|
||||
@Excel(name = "条款内容", width = 30)
|
||||
private String itemContent;
|
||||
|
||||
/**
|
||||
* 适用零部件
|
||||
*/
|
||||
@ApiModelProperty(value = "适用零部件")
|
||||
@Excel(name = "适用零部件", width = 30)
|
||||
private String applicableComponents;
|
||||
|
||||
|
||||
/**
|
||||
* 新生产车实施日期
|
||||
*/
|
||||
@ApiModelProperty(value = "新生产车实施日期")
|
||||
@Excel(name = "新生产车实施日期", width = 30)
|
||||
private String newProductionImplementation;
|
||||
|
||||
|
||||
/**
|
||||
* 新认证实施日期
|
||||
*/
|
||||
@ApiModelProperty(value = "新认证实施日期")
|
||||
@Excel(name = "新认证实施日期", width = 30)
|
||||
private String newCerImplementDate;
|
||||
|
||||
/**
|
||||
* 注册日期
|
||||
*/
|
||||
@ApiModelProperty(value = "注册日期")
|
||||
@Excel(name = "注册日期", width = 30)
|
||||
private String registrationDate;
|
||||
|
||||
/**
|
||||
* 涉及系统/部件
|
||||
*/
|
||||
@ApiModelProperty(value = "涉及系统/部件")
|
||||
@Excel(name = "涉及系统/部件", width = 30)
|
||||
@JsonProperty("keywords")
|
||||
private String keywords;
|
||||
|
||||
/**
|
||||
* 责任部门
|
||||
*/
|
||||
@ApiModelProperty(value = "责任部门")
|
||||
@Excel(name = "责任部门", width = 30)
|
||||
private String responsibleDepartmentDictText;
|
||||
|
||||
/**
|
||||
* 关联部门
|
||||
*/
|
||||
@ApiModelProperty(value = "关联部门")
|
||||
@Excel(name = "关联部门", width = 30)
|
||||
private String relatedDepartmentDictText;
|
||||
|
||||
/**
|
||||
* 适用车型
|
||||
*/
|
||||
@ApiModelProperty(value = "适用车型")
|
||||
@Excel(name = "适用车型", width = 30)
|
||||
private String applicationsDictText;
|
||||
|
||||
/**
|
||||
* 动力类型
|
||||
*/
|
||||
@ApiModelProperty(value = "动力类型")
|
||||
@Excel(name = "动力类型", width = 30)
|
||||
private String powerTypeDictText;
|
||||
|
||||
/**
|
||||
* 专业领域
|
||||
*/
|
||||
@ApiModelProperty(value = "专业领域")
|
||||
@Excel(name = "专业领域", width = 30)
|
||||
private String domainAreaDictText;
|
||||
|
||||
/**
|
||||
* 配置需求
|
||||
*/
|
||||
@ApiModelProperty(value = "配置需求")
|
||||
@Excel(name = "配置需求", width = 30)
|
||||
private String configurationRequirementsDictText;
|
||||
}
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
package com.jero.modules.laws.home.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @ClassName: LawsHomeNormalSearchExportExcelVO
|
||||
* @Description:
|
||||
* @Author: yjz
|
||||
* @Date: 2024-06-18 15:43
|
||||
* @Version: 1.0
|
||||
**/
|
||||
@Data
|
||||
public class LawsHomeAdvancedSearchClauseVO implements Serializable {
|
||||
/**
|
||||
* 标准id
|
||||
*/
|
||||
@ApiModelProperty(value = "标准id")
|
||||
private String standardId;
|
||||
|
||||
/**
|
||||
* 标准号
|
||||
*/
|
||||
@ApiModelProperty(value = "标准号")
|
||||
private String standardNumber;
|
||||
|
||||
/**
|
||||
* 标准名称
|
||||
*/
|
||||
@ApiModelProperty(value = "标准名称")
|
||||
private String standardName;
|
||||
|
||||
/**
|
||||
* 标准号和标准名称
|
||||
*/
|
||||
@ApiModelProperty(value = "标准号和标准名称")
|
||||
private String standardNumberAndName;
|
||||
|
||||
/**
|
||||
* 条款
|
||||
*/
|
||||
@ApiModelProperty(value = "条款")
|
||||
private List<Map<String, Object>> clauseList;
|
||||
}
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
package com.jero.modules.laws.home.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @ClassName: LawsHomeNormalSearchExportExcelVO
|
||||
* @Description:
|
||||
* @Author: yjz
|
||||
* @Date: 2024-06-18 15:43
|
||||
* @Version: 1.0
|
||||
**/
|
||||
@Data
|
||||
public class LawsHomeAdvancedSearchExportExcelVO implements Serializable {
|
||||
/**
|
||||
* 资源类型 1:外来标准法规 3:企业标准
|
||||
*/
|
||||
@ApiModelProperty(value = "资源类型 1:外来标准法规 3:企业标准")
|
||||
@Excel(name = "资源类型", replace = {"外来标准法规_1", "企业标准_3"}, width = 20)
|
||||
private String resourceType;
|
||||
|
||||
/**
|
||||
* 标准号
|
||||
*/
|
||||
@ApiModelProperty(value = "标准号")
|
||||
@Excel(name = "标准号", width = 20)
|
||||
private String standardNumber;
|
||||
|
||||
/**
|
||||
* 标准名称
|
||||
*/
|
||||
@ApiModelProperty(value = "标准名称")
|
||||
@Excel(name = "标准名称", width = 20)
|
||||
private String standardName;
|
||||
|
||||
/**
|
||||
* 发布日期
|
||||
*/
|
||||
@ApiModelProperty(value = "发布日期")
|
||||
@Excel(name = "发布日期", width = 20, format = "yyyy-MM-dd")
|
||||
private Date releaseDate;
|
||||
|
||||
/**
|
||||
* 实施日期
|
||||
*/
|
||||
@ApiModelProperty(value = "实施日期")
|
||||
@Excel(name = "实施日期", width = 20, format = "yyyy-MM-dd")
|
||||
private Date implementationDate;
|
||||
|
||||
/**
|
||||
* 标准状态
|
||||
*/
|
||||
@ApiModelProperty(value = "标准状态")
|
||||
@Excel(name = "标准状态", width = 20, dicCode = "standard_state")
|
||||
private String standardState;
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
package com.jero.modules.laws.home.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @ClassName: LawsHomeNormalSearchExportExcelVO
|
||||
* @Description:
|
||||
* @Author: yjz
|
||||
* @Date: 2024-06-18 15:43
|
||||
* @Version: 1.0
|
||||
**/
|
||||
@Data
|
||||
public class LawsHomeAdvancedSearchStandardExcelVO implements Serializable {
|
||||
/**
|
||||
* 标准编号
|
||||
*/
|
||||
@ApiModelProperty(value = "标准编号")
|
||||
@Excel(name = "标准编号", width = 30)
|
||||
private String standardNumber;
|
||||
|
||||
/**
|
||||
* 标准名称
|
||||
*/
|
||||
@ApiModelProperty(value = "标准名称")
|
||||
@Excel(name = "标准名称", width = 30)
|
||||
private String standardName;
|
||||
}
|
||||
+2
-2
@@ -40,9 +40,9 @@ public class LawsHomeNormalSearchStatisticsVO implements Serializable {
|
||||
@ApiModelProperty(value = "状态 (数据字典 只有外来标准法规:standard_state (全部传空)")
|
||||
private List<LawsHomeNormalSearchStatisticsObjVO> standardState;
|
||||
/**
|
||||
* 标准分类代码 (数据字典 只有企业标准:standard_sort_code (全部传空)
|
||||
* 标准分类代码 (数据字典 只有企业标准:standard_category_code (全部传空)
|
||||
*/
|
||||
@ApiModelProperty(value = "标准分类代码 (数据字典 只有企业标准:standard_sort_code (全部传空)")
|
||||
@ApiModelProperty(value = "标准分类代码 (数据字典 只有企业标准:standard_category_code (全部传空)")
|
||||
private List<LawsHomeNormalSearchStatisticsObjVO> categoryCode;
|
||||
/**
|
||||
* 标准状态 (数据字典 只有企业标准:enterprise_standard_state (全部传空)
|
||||
|
||||
+2
-2
@@ -69,9 +69,9 @@ public class LawsHomeNormalSearchVO implements Serializable {
|
||||
@ApiModelProperty(value = "状态 (数据字典 只有外来标准法规:standard_state (全部传空)")
|
||||
private String standardState;
|
||||
/**
|
||||
* 标准分类代码 (数据字典 只有企业标准:standard_sort_code (全部传空)
|
||||
* 标准分类代码 (数据字典 只有企业标准:standard_category_code (全部传空)
|
||||
*/
|
||||
@ApiModelProperty(value = "标准分类代码 (数据字典 只有企业标准:standard_sort_code (全部传空)")
|
||||
@ApiModelProperty(value = "标准分类代码 (数据字典 只有企业标准:standard_category_code (全部传空)")
|
||||
private String categoryCode;
|
||||
/**
|
||||
* 标准状态 (数据字典 只有企业标准:enterprise_standard_state (全部传空)
|
||||
|
||||
+4
-4
@@ -1,9 +1,6 @@
|
||||
package com.jero.modules.laws.standard.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
@@ -93,6 +90,7 @@ public class LawsDomesticStandard implements Serializable {
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "发布日期")
|
||||
@TableField(exist = false)
|
||||
private java.util.Date releaseDate;
|
||||
/**实施日期*/
|
||||
@Excel(name = "实施日期", width = 15, format = "yyyy-MM-dd")
|
||||
@@ -161,6 +159,7 @@ public class LawsDomesticStandard implements Serializable {
|
||||
/**关联文件*/
|
||||
@Excel(name = "关联文件", width = 15)
|
||||
@ApiModelProperty(value = "关联文件")
|
||||
@TableField(exist = false)
|
||||
private java.lang.String associatedFile;
|
||||
/**采标程度*/
|
||||
@Excel(name = "采标程度", width = 15)
|
||||
@@ -181,6 +180,7 @@ public class LawsDomesticStandard implements Serializable {
|
||||
/**修改单*/
|
||||
@Excel(name = "修改单", width = 15)
|
||||
@ApiModelProperty(value = "修改单")
|
||||
@TableField(exist = false)
|
||||
private java.lang.String modificationList;
|
||||
/**报批稿*/
|
||||
@Excel(name = "报批稿", width = 15)
|
||||
|
||||
+11
@@ -118,6 +118,7 @@ public class LawsEnterpriseStandard implements Serializable {
|
||||
* 标准等级分类
|
||||
*/
|
||||
@ApiModelProperty(value = "标准等级分类")
|
||||
@TableField(exist = false)
|
||||
private String gradeClassification;
|
||||
|
||||
/**
|
||||
@@ -138,6 +139,7 @@ public class LawsEnterpriseStandard implements Serializable {
|
||||
* 编制说明
|
||||
*/
|
||||
@ApiModelProperty(value = "编制说明")
|
||||
@TableField(exist = false)
|
||||
private String compIllustration;
|
||||
|
||||
/**
|
||||
@@ -181,6 +183,7 @@ public class LawsEnterpriseStandard implements Serializable {
|
||||
* 主起草部门负责人
|
||||
*/
|
||||
@ApiModelProperty(value = "主起草部门负责人")
|
||||
@TableField(exist = false)
|
||||
private String mainDraftingUnitResponsiblePerson;
|
||||
|
||||
/**
|
||||
@@ -235,6 +238,7 @@ public class LawsEnterpriseStandard implements Serializable {
|
||||
* 采标程度
|
||||
*/
|
||||
@ApiModelProperty(value = "采标程度")
|
||||
@TableField(exist = false)
|
||||
private String acquisitionDegree;
|
||||
|
||||
/**
|
||||
@@ -247,6 +251,7 @@ public class LawsEnterpriseStandard implements Serializable {
|
||||
* 采用国际标准号
|
||||
*/
|
||||
@ApiModelProperty(value = "采用国际标准号")
|
||||
@TableField(exist = false)
|
||||
private String internationalStandardNum;
|
||||
|
||||
/**
|
||||
@@ -259,12 +264,14 @@ public class LawsEnterpriseStandard implements Serializable {
|
||||
* 修改单
|
||||
*/
|
||||
@ApiModelProperty(value = "修改单")
|
||||
@TableField(exist = false)
|
||||
private String modificationList;
|
||||
|
||||
/**
|
||||
* 报批稿
|
||||
*/
|
||||
@ApiModelProperty(value = "报批稿")
|
||||
@TableField(exist = false)
|
||||
private String draftForReview;
|
||||
|
||||
/**
|
||||
@@ -277,12 +284,14 @@ public class LawsEnterpriseStandard implements Serializable {
|
||||
* 草案
|
||||
*/
|
||||
@ApiModelProperty(value = "草案")
|
||||
@TableField(exist = false)
|
||||
private String draft;
|
||||
|
||||
/**
|
||||
* 章节条款
|
||||
*/
|
||||
@ApiModelProperty(value = "章节条款")
|
||||
@TableField(exist = false)
|
||||
private String chapterClause;
|
||||
|
||||
/**
|
||||
@@ -301,6 +310,7 @@ public class LawsEnterpriseStandard implements Serializable {
|
||||
* 授权部门
|
||||
*/
|
||||
@ApiModelProperty(value = "授权部门")
|
||||
@TableField(exist = false)
|
||||
private String authDept;
|
||||
|
||||
/**
|
||||
@@ -317,6 +327,7 @@ public class LawsEnterpriseStandard implements Serializable {
|
||||
* 老法规系统Id
|
||||
*/
|
||||
@ApiModelProperty(value = "老法规系统Id")
|
||||
@TableField(exist = false)
|
||||
private String oldSystemId;
|
||||
|
||||
|
||||
|
||||
@@ -13,7 +13,8 @@ public enum TableNameEnum {
|
||||
DOMESTIC_REGULATIONS("国内标准","laws_domestic_standard","1"),
|
||||
FOREIGN_REGULATIONS("海外标准","laws_overseas_standard","2"),
|
||||
ENTERPRISE_STANDARDS("企业标准","laws_enterprise_standard","3"),
|
||||
DOCUMENT_SPLIT("条款拆分","laws_document_split","4")
|
||||
DOCUMENT_SPLIT("条款拆分","laws_document_split","4"),
|
||||
HOME_SEARCH("高级搜索(全部)","home_search","5")
|
||||
;
|
||||
|
||||
String name;
|
||||
|
||||
Reference in New Issue
Block a user