提交 d662d72c 作者: 925993793@qq.com

Merge branch 'event_fusion' into dev_0710

...@@ -98,10 +98,13 @@ public class EventManageController { ...@@ -98,10 +98,13 @@ public class EventManageController {
@RequestParam(name = "startTime", required = false) String startTime, @RequestParam(name = "startTime", required = false) String startTime,
@RequestParam(name = "endTime", required = false) String endTime, @RequestParam(name = "endTime", required = false) String endTime,
@RequestParam(name = "order", required = false) String order, @RequestParam(name = "order", required = false) String order,
@RequestParam(name = "subjectTypeId", required = false) String subjectTypeId,
@RequestParam(name = "id", required = false) String id,
@RequestParam(name = "createBy", required = false) String createBy,
@RequestParam(name = "orderType", defaultValue = "asc") String orderType, @RequestParam(name = "orderType", defaultValue = "asc") String orderType,
@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) {
IPage<EventManageVO> pageList = eventService.pageList(eventName, eventType, facePublic, publishStatus, startTime, endTime, order, orderType, pageNo, pageSize); IPage<EventManageVO> pageList = eventService.pageList(eventName, eventType, facePublic, publishStatus, startTime, endTime, order, orderType, pageNo, pageSize, subjectTypeId, id,createBy);
return Result.OK(pageList); return Result.OK(pageList);
} }
......
...@@ -990,6 +990,9 @@ public class SubjectManageController { ...@@ -990,6 +990,9 @@ public class SubjectManageController {
subjectInfoSourceMap.setSourceId(labelCode); subjectInfoSourceMap.setSourceId(labelCode);
subjectInfoSourceMap.setSourceItemId(labelItemCode); subjectInfoSourceMap.setSourceItemId(labelItemCode);
subjectInfoSourceMap.setType(312); subjectInfoSourceMap.setType(312);
UserVo currentUser = UserUtil.getLoginUser();
subjectInfoSourceMap.setCreateBy(currentUser.getUsername());
subjectInfoSourceMap.setCreateTime(new Date());
dataList.add(subjectInfoSourceMap); dataList.add(subjectInfoSourceMap);
} }
if (CollectionUtils.isNotEmpty(dataList)) { if (CollectionUtils.isNotEmpty(dataList)) {
......
...@@ -153,7 +153,6 @@ public class StatisticalAnalysisController { ...@@ -153,7 +153,6 @@ public class StatisticalAnalysisController {
} }
} }
} }
for (CountVO countVO : dataList) { for (CountVO countVO : dataList) {
List<CountVO> children = countVO.getChildren(); List<CountVO> children = countVO.getChildren();
sysDictItemService.changeKey(children, dictItemList); sysDictItemService.changeKey(children, dictItemList);
...@@ -188,7 +187,6 @@ public class StatisticalAnalysisController { ...@@ -188,7 +187,6 @@ public class StatisticalAnalysisController {
dataList.add(countVO); dataList.add(countVO);
} }
} }
sysDictItemService.changeKey(dataList, dictItemList); sysDictItemService.changeKey(dataList, dictItemList);
return Result.OK(dataList); return Result.OK(dataList);
} }
...@@ -294,7 +292,7 @@ public class StatisticalAnalysisController { ...@@ -294,7 +292,7 @@ public class StatisticalAnalysisController {
List<SysDictItem> dictItemList = sysDictItemService.listByDictCode("label_infosource_main_type"); List<SysDictItem> dictItemList = sysDictItemService.listByDictCode("label_infosource_main_type");
for (SysDictItem sysDictItem : dictItemList) { for (SysDictItem sysDictItem : dictItemList) {
Label label = new Label(); Label label = new Label();
label.setRelationId(sysDictItem.getId()); label.setRelationId(sysDictItem.getItemValue());
label.setLabelMark("LABEL-20250618-0004"); label.setLabelMark("LABEL-20250618-0004");
label.setRelationName(sysDictItem.getItemText()); label.setRelationName(sysDictItem.getItemText());
labels.add(label); labels.add(label);
......
...@@ -41,4 +41,10 @@ public class SubjectInfoSourceMap implements Serializable { ...@@ -41,4 +41,10 @@ public class SubjectInfoSourceMap implements Serializable {
private Integer isExemptKeyword; private Integer isExemptKeyword;
/**是否免审核 0否 1是*/ /**是否免审核 0否 1是*/
private Integer isFreeCheck; private Integer isFreeCheck;
/**创建人*/
@ApiModelProperty(value = "创建人")
private java.lang.String createBy;
/**创建日期*/
@ApiModelProperty(value = "创建日期")
private java.util.Date createTime;
} }
...@@ -3,6 +3,8 @@ package com.zzsn.event.es; ...@@ -3,6 +3,8 @@ package com.zzsn.event.es;
import cn.hutool.core.date.DateTime; import cn.hutool.core.date.DateTime;
import cn.hutool.core.map.MapUtil; import cn.hutool.core.map.MapUtil;
import cn.hutool.core.net.URLDecoder; import cn.hutool.core.net.URLDecoder;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONUtil; import cn.hutool.json.JSONUtil;
import com.alibaba.fastjson2.JSON; import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONArray; import com.alibaba.fastjson2.JSONArray;
...@@ -1724,11 +1726,12 @@ public class EsService { ...@@ -1724,11 +1726,12 @@ public class EsService {
subjectIds.add(searchCondition.getSubjectId()); subjectIds.add(searchCondition.getSubjectId());
BoolQueryBuilder boolQuery = buildQuery(searchCondition, subjectIds); BoolQueryBuilder boolQuery = buildQuery(searchCondition, subjectIds);
searchSourceBuilder.query(boolQuery); searchSourceBuilder.query(boolQuery);
String[] includeValues = searchCondition.getIncludeValues();
NestedAggregationBuilder nestedAggregationBuilder = AggregationBuilders.nested("labels", "labels") NestedAggregationBuilder nestedAggregationBuilder = AggregationBuilders.nested("labels", "labels")
.subAggregation(AggregationBuilders.terms("groupTag") .subAggregation(AggregationBuilders.terms("groupTag")
.field("labels.relationId") .field("labels.relationId")
.size(10) .size(includeValues.length)
.includeExclude(new IncludeExclude(searchCondition.getIncludeValues(), searchCondition.getExcludeValues()))); .includeExclude(new IncludeExclude(includeValues, searchCondition.getExcludeValues())));
searchSourceBuilder.aggregation(nestedAggregationBuilder); searchSourceBuilder.aggregation(nestedAggregationBuilder);
searchRequest.source(searchSourceBuilder); searchRequest.source(searchSourceBuilder);
try { try {
...@@ -2486,6 +2489,39 @@ public class EsService { ...@@ -2486,6 +2489,39 @@ public class EsService {
TermsQueryBuilder sortFieldQuery = QueryBuilders.termsQuery("sortField.fieldType", searchCondition.getKeywordList()); TermsQueryBuilder sortFieldQuery = QueryBuilders.termsQuery("sortField.fieldType", searchCondition.getKeywordList());
boolQuery.must(QueryBuilders.nestedQuery("sortField", sortFieldQuery, ScoreMode.None)); boolQuery.must(QueryBuilders.nestedQuery("sortField", sortFieldQuery, ScoreMode.None));
} }
//实体标签参数
if (CollectionUtils.isNotEmpty(searchCondition.getSpecialLabelParams())) {
cn.hutool.json.JSONObject params = searchCondition.getSpecialLabelParams();
String entityObjectId = params.getStr("entityObjectId");
if (StrUtil.isNotBlank(entityObjectId) && ("1892197364882550786".equals(entityObjectId) || "1874728877847257089".equals(entityObjectId))){
cn.hutool.json.JSONArray jsonArray = params.getJSONArray("labelCodeList");
if (ObjectUtil.isNotEmpty(jsonArray) && !jsonArray.isEmpty()){
jsonArray.forEach(e -> {
cn.hutool.json.JSONObject jsonObject = (cn.hutool.json.JSONObject) e;
String labelCode = jsonObject.getStr("labelCode");
if (StrUtil.isNotBlank(labelCode)){
cn.hutool.json.JSONArray jsonArray1 = jsonObject.getJSONArray("children");
if (jsonArray1 != null && !jsonArray1.isEmpty()){
List<String> reids = new ArrayList<>();
jsonArray1.forEach(f -> {
cn.hutool.json.JSONObject jsonObject1 = (cn.hutool.json.JSONObject) f;
String labelItemCode = jsonObject1.getStr("labelItemCode");
if (StrUtil.isNotBlank(labelItemCode)){
reids.add(labelCode+"-"+labelItemCode);
}
});
if (CollectionUtils.isNotEmpty(reids)){
BoolQueryBuilder specialLabelQuery = QueryBuilders.boolQuery();
specialLabelQuery.must(QueryBuilders.nestedQuery("labels",QueryBuilders.termsQuery("labels.relationId",reids),ScoreMode.None));
boolQuery.must(specialLabelQuery);
}
}
}
});
}
}
}
return boolQuery; return boolQuery;
} }
......
...@@ -49,7 +49,9 @@ public interface EventMapper extends BaseMapper<Event> { ...@@ -49,7 +49,9 @@ public interface EventMapper extends BaseMapper<Event> {
@Param("facePublic") Integer facePublic, @Param("publishStatus") Integer publishStatus, @Param("facePublic") Integer facePublic, @Param("publishStatus") Integer publishStatus,
@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("startTime") String startTime, @Param("endTime") String endTime,
@Param("order") String order, @Param("orderType") String orderType, @Param("order") String order, @Param("orderType") String orderType,
@Param("offset") Integer offset, @Param("pageSize") Integer pageSize); @Param("offset") Integer offset, @Param("pageSize") Integer pageSize,
@Param("typeIds") List<String> typeIds, @Param("id") String id, @Param("createBy") String createBy
);
/** /**
* 总数量-后台管理 * 总数量-后台管理
...@@ -63,7 +65,7 @@ public interface EventMapper extends BaseMapper<Event> { ...@@ -63,7 +65,7 @@ public interface EventMapper extends BaseMapper<Event> {
*/ */
Integer totalCount(@Param("eventName") String eventName, @Param("eventType") Integer eventType, Integer totalCount(@Param("eventName") String eventName, @Param("eventType") Integer eventType,
@Param("facePublic") Integer facePublic, @Param("publishStatus") Integer publishStatus, @Param("facePublic") Integer facePublic, @Param("publishStatus") Integer publishStatus,
@Param("startTime") String startTime, @Param("endTime") String endTime); @Param("startTime") String startTime, @Param("endTime") String endTime,@Param("typeIds") List<String> typeIds, @Param("id") String id, @Param("createBy") String createBy);
/** /**
* 分页列表-门户(全部) * 分页列表-门户(全部)
......
...@@ -50,11 +50,26 @@ ...@@ -50,11 +50,26 @@
</select> </select>
<select id="pageList" resultType="com.zzsn.event.vo.EventManageVO"> <select id="pageList" resultType="com.zzsn.event.vo.EventManageVO">
select t2.type_name,t1.id,t1.event_icon,t1.event_name,t1.event_label,t1.status, select t2.type_name,t1.id,t1.event_icon,t1.event_name,m.subjectTypeName,t1.event_label,t1.status,
t1.face_public,t1.publish_status,t1.create_time,t1.publish_date,t1.start_time,t1.end_time,t1.create_by t1.face_public,t1.publish_status,t1.create_time,t1.publish_date,t1.start_time,t1.end_time,t1.create_by
from event t1 from event t1
inner join event_category t2 on t1.event_type =t2.id inner join event_category t2 on t1.event_type =t2.id
INNER JOIN
(
select stm.subject_id,st.type_name as subjectTypeName from subject_type_map stm inner join subject_type st on stm.type_id = st.id
where 1=1 where 1=1
<if test="typeIds!=null and typeIds.size()>0">
and stm.type_id in
<foreach collection="typeIds" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
) m
on t1.id = m.subject_id
where 1=1
<if test="id !=null and id !=''">
and t1.id =#{id}
</if>
<if test="eventName!=null and eventName != ''"> <if test="eventName!=null and eventName != ''">
and t1.event_name like CONCAT('%',#{eventName},'%') and t1.event_name like CONCAT('%',#{eventName},'%')
</if> </if>
...@@ -73,6 +88,9 @@ ...@@ -73,6 +88,9 @@
<if test="endTime!=null and endTime != ''"> <if test="endTime!=null and endTime != ''">
and t1.create_time <![CDATA[ <= ]]> #{endTime} and t1.create_time <![CDATA[ <= ]]> #{endTime}
</if> </if>
<if test="createBy!=null and createBy != ''">
and t1.create_by like CONCAT('%',#{create_by},'%')
</if>
<if test="order!=null and order != ''"> <if test="order!=null and order != ''">
order by t1.${order} order by t1.${order}
<if test="orderType!=null and orderType != ''"> <if test="orderType!=null and orderType != ''">
...@@ -84,7 +102,22 @@ ...@@ -84,7 +102,22 @@
<select id="totalCount" resultType="java.lang.Integer"> <select id="totalCount" resultType="java.lang.Integer">
select count(1) from event t1 select count(1) from event t1
inner join event_category t2 on t1.event_type =t2.id inner join event_category t2 on t1.event_type =t2.id
INNER JOIN
(
select stm.subject_id,st.type_name from subject_type_map stm inner join subject_type st on stm.type_id = st.id
where 1=1
<if test="typeIds!=null and typeIds.size()>0">
and stm.type_id in
<foreach collection="typeIds" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
) m
on t1.id = m.subject_id
where 1=1 where 1=1
<if test="id !=null and id !=''">
and t1.id =#{id}
</if>
<if test="eventName!=null and eventName != ''"> <if test="eventName!=null and eventName != ''">
and t1.event_name like CONCAT('%',#{eventName},'%') and t1.event_name like CONCAT('%',#{eventName},'%')
</if> </if>
...@@ -103,6 +136,9 @@ ...@@ -103,6 +136,9 @@
<if test="endTime!=null and endTime != ''"> <if test="endTime!=null and endTime != ''">
and t1.create_time <![CDATA[ <= ]]> #{endTime} and t1.create_time <![CDATA[ <= ]]> #{endTime}
</if> </if>
<if test="createBy!=null and createBy != ''">
and t1.create_by like CONCAT('%',#{create_by},'%')
</if>
</select> </select>
<select id="frontAllPageList" resultType="com.zzsn.event.vo.EventFrontVO"> <select id="frontAllPageList" resultType="com.zzsn.event.vo.EventFrontVO">
......
...@@ -254,6 +254,7 @@ ...@@ -254,6 +254,7 @@
<result column="time_enable" property="timeEnable"/> <result column="time_enable" property="timeEnable"/>
<result column="time_disable" property="timeDisable"/> <result column="time_disable" property="timeDisable"/>
<result column="library" property="library"/> <result column="library" property="library"/>
<result column="data_scope" property="dataScope"/>
<result column="face_public" property="facePublic"/> <result column="face_public" property="facePublic"/>
<result column="first_open_time" property="firstOpenTime"/> <result column="first_open_time" property="firstOpenTime"/>
<result column="estimate_status" property="estimateStatus"/> <result column="estimate_status" property="estimateStatus"/>
...@@ -273,6 +274,7 @@ ...@@ -273,6 +274,7 @@
s.data_source, s.data_source,
s.face_public, s.face_public,
s.library, s.library,
s.data_scope,
s.estimate_status, s.estimate_status,
s.first_open_time, s.first_open_time,
c.id as subjectTypeId, c.id as subjectTypeId,
......
...@@ -241,9 +241,13 @@ ...@@ -241,9 +241,13 @@
</select> </select>
<select id="allList" resultType="com.zzsn.event.entity.SubjectType"> <select id="allList" resultType="com.zzsn.event.entity.SubjectType">
select t.* from subject_type t select t.* from subject_type t where 1=1
<if test="userId !=null and userId != ''"> <if test="userId !=null and userId != ''">
inner join sys_user_data_permission dp on t.id=dp.permission_id and dp.user_id = #{userId} inner join sys_user_data_permission dp on t.id=dp.permission_id and dp.user_id = #{userId}
</if> </if>
<if test="category !=null">
and t.category = #{category}
</if>
</select> </select>
</mapper> </mapper>
...@@ -34,19 +34,21 @@ public interface IEventService extends IService<Event> { ...@@ -34,19 +34,21 @@ public interface IEventService extends IService<Event> {
/** /**
* 分页列表-后台管理 * 分页列表-后台管理
* *
* @param eventName 事件名称 * @param eventName 事件名称
* @param eventType 事件分类id * @param eventType 事件分类id
* @param startTime 开始时间 * @param startTime 开始时间
* @param endTime 结束时间 * @param endTime 结束时间
* @param order 排序字段 * @param order 排序字段
* @param orderType 排序方式 * @param orderType 排序方式
* @param pageNo 偏移量 * @param pageNo 偏移量
* @param pageSize 返回条数 * @param pageSize 返回条数
* @param subjectTypeId
* @param id
* @author lkg * @author lkg
* @date 2024/4/8 * @date 2024/4/8
*/ */
IPage<EventManageVO> pageList(String eventName, Integer eventType, Integer facePublic, Integer publishStatus, String startTime, String endTime, IPage<EventManageVO> pageList(String eventName, Integer eventType, Integer facePublic, Integer publishStatus, String startTime, String endTime,
String order, String orderType, Integer pageNo, Integer pageSize); String order, String orderType, Integer pageNo, Integer pageSize, String subjectTypeId, String id, String createBy);
/** /**
* 分页列表-门户(全部) * 分页列表-门户(全部)
......
package com.zzsn.event.service.impl; package com.zzsn.event.service.impl;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.map.MapUtil; import cn.hutool.core.map.MapUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
...@@ -9,8 +12,10 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -9,8 +12,10 @@ 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.zzsn.event.constant.Constants; import com.zzsn.event.constant.Constants;
import com.zzsn.event.entity.*; import com.zzsn.event.entity.*;
import com.zzsn.event.entity.arrange.ClbModelArrange;
import com.zzsn.event.enums.BindTypeEnum; import com.zzsn.event.enums.BindTypeEnum;
import com.zzsn.event.enums.CodePrefixEnum; import com.zzsn.event.enums.CodePrefixEnum;
import com.zzsn.event.enums.SourceTypeEnum;
import com.zzsn.event.es.EsService; import com.zzsn.event.es.EsService;
import com.zzsn.event.mapper.EventMapper; import com.zzsn.event.mapper.EventMapper;
import com.zzsn.event.service.*; import com.zzsn.event.service.*;
...@@ -111,6 +116,8 @@ public class EventServiceImpl extends ServiceImpl<EventMapper, Event> implements ...@@ -111,6 +116,8 @@ public class EventServiceImpl extends ServiceImpl<EventMapper, Event> implements
private PythonUtil pythonUtil; private PythonUtil pythonUtil;
@Autowired @Autowired
private EsOpUtil esOpUtil; private EsOpUtil esOpUtil;
@Autowired
private IClbModelArrangeService clbModelArrangeService;
@Value("${kafka.topic.event.run:}") @Value("${kafka.topic.event.run:}")
private String EVENT_MODEL_KAFKA_CHANNEL; private String EVENT_MODEL_KAFKA_CHANNEL;
...@@ -146,13 +153,29 @@ public class EventServiceImpl extends ServiceImpl<EventMapper, Event> implements ...@@ -146,13 +153,29 @@ public class EventServiceImpl extends ServiceImpl<EventMapper, Event> implements
} }
@Override @Override
public IPage<EventManageVO> pageList(String eventName, Integer eventType, Integer facePublic, Integer publishStatus, String startTime, String endTime, String order, String orderType, Integer pageNo, Integer pageSize) { public IPage<EventManageVO> pageList(String eventName, Integer eventType, Integer facePublic, Integer publishStatus, String startTime, String endTime, String order, String orderType, Integer pageNo, Integer pageSize, String subjectTypeId, String id, String createBy) {
List<String> typeIds = new ArrayList<>();
if (StringUtils.isNotEmpty(subjectTypeId) && !"0".equals(subjectTypeId)) {
typeIds = iSubjectTypeService.belowIdList(subjectTypeId, 2);
}
int offset = (pageNo - 1) * pageSize; int offset = (pageNo - 1) * pageSize;
List<EventManageVO> pageList = baseMapper.pageList(eventName, eventType, facePublic, publishStatus, startTime, endTime, order, orderType, offset, pageSize); List<EventManageVO> pageList = baseMapper.pageList(eventName, eventType, facePublic, publishStatus, startTime, endTime, order, orderType, offset, pageSize,typeIds,id,createBy);
//获取总条数 //获取总条数
Integer count = baseMapper.totalCount(eventName, eventType, facePublic, publishStatus, startTime, endTime); Integer count = baseMapper.totalCount(eventName, eventType, facePublic, publishStatus, startTime, endTime,typeIds,id,createBy);
IPage<EventManageVO> pageData = new Page<>(pageNo, pageSize, count); IPage<EventManageVO> pageData = new Page<>(pageNo, pageSize, count);
pageData.setRecords(pageList); pageData.setRecords(pageList);
List<EventManageVO> records = pageData.getRecords();
if (CollUtil.isNotEmpty(records)) {
List<String> idList = records.stream().map(EventManageVO::getId).collect(Collectors.toList());
//查询绑定的流程
List<ClbModelArrange> clbModelArranges = clbModelArrangeService.listBySubjectIds(idList);
if (CollectionUtil.isNotEmpty(clbModelArranges)) {
clbModelArranges.forEach(e -> e.setType(SourceTypeEnum.getValueNameByValue(e.getType())));
Map<String, List<ClbModelArrange>> collect = clbModelArranges.stream().collect(Collectors.groupingBy(ClbModelArrange::getSubjectId));
records.forEach(e -> e.setClbModelArranges(collect.get(e.getId())));
}
}
return pageData; return pageData;
} }
......
...@@ -11,6 +11,7 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; ...@@ -11,6 +11,7 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.zzsn.event.constant.Constants; import com.zzsn.event.constant.Constants;
import com.zzsn.event.entity.*; import com.zzsn.event.entity.*;
import com.zzsn.event.enums.BindTypeEnum;
import com.zzsn.event.enums.CodePrefixEnum; import com.zzsn.event.enums.CodePrefixEnum;
import com.zzsn.event.feign.api.RemoteModelService; import com.zzsn.event.feign.api.RemoteModelService;
import com.zzsn.event.service.*; import com.zzsn.event.service.*;
...@@ -252,7 +253,7 @@ public class SubjectSimpleServiceImpl implements SubjectSimpleService { ...@@ -252,7 +253,7 @@ public class SubjectSimpleServiceImpl implements SubjectSimpleService {
return false; return false;
} }
//判断信息源标签配置是否变化,变化则校验不通过;反之通过 //判断信息源标签配置是否变化,变化则校验不通过;反之通过
boolean judgeInfoSourceLabel = judgeInfoSourceLabel(subjectId, subjectParamsCheckVO.getSubjectSourceTagVO()); boolean judgeInfoSourceLabel = judgeInfoSourceLabel(subjectId,subjectDetailVO.getDataScope(),subjectParamsCheckVO.getDataScope(), subjectParamsCheckVO.getInfoSourceMainLabelVO());
//判断定向信息源是否发生变化(前端传参),true 是;false 否 //判断定向信息源是否发生变化(前端传参),true 是;false 否
boolean directSourceChange = subjectParamsCheckVO.isDirectSourceChange(); boolean directSourceChange = subjectParamsCheckVO.isDirectSourceChange();
return !judgeInfoSourceLabel && !directSourceChange; return !judgeInfoSourceLabel && !directSourceChange;
...@@ -300,37 +301,39 @@ public class SubjectSimpleServiceImpl implements SubjectSimpleService { ...@@ -300,37 +301,39 @@ public class SubjectSimpleServiceImpl implements SubjectSimpleService {
* 判断信息源配置是否发生变化 true 是;false 否 * 判断信息源配置是否发生变化 true 是;false 否
* *
* @param subjectId 专题id * @param subjectId 专题id
* @param subjectSourceTagVO 信息源标签信息(编辑时前端传参) * @param infoSourceMainLabelVO 信息源标签信息(编辑时前端传参)
* @author lkg * @author lkg
* @date 2025/2/5 * @date 2025/2/5
*/ */
private boolean judgeInfoSourceLabel(String subjectId, SubjectSourceTagVO subjectSourceTagVO) { private boolean judgeInfoSourceLabel(String subjectId, Integer oldDataScope,Integer newDataScope,InfoSourceMainLabelVO infoSourceMainLabelVO) {
boolean flag = false; boolean flag = false;
LambdaQueryWrapper<SubjectInfoSourceMap> queryWrapper = Wrappers.lambdaQuery(); if (oldDataScope == null) {
queryWrapper.eq(SubjectInfoSourceMap::getSubjectId, subjectId); oldDataScope = 0;
List<SubjectInfoSourceMap> mapList = subjectInfoSourceMapService.list(queryWrapper); }
//判断绑定的信息源标签是否发生变化 //是否全选,判断绑定的信息源标签是否发生变化
if (CollectionUtils.isEmpty(mapList)) { if (!Objects.equals(newDataScope, oldDataScope)) {
if (subjectSourceTagVO != null) { flag = true;
flag = true;
}
} else { } else {
//判断 是否绑定信息源标签 LambdaQueryWrapper<SubjectInfoSourceMap> queryWrapper = Wrappers.lambdaQuery();
Set<String> sourceLabelCodeSet = mapList.stream().filter(e -> e.getType() == 12).map(SubjectInfoSourceMap::getSourceItemId).collect(Collectors.toSet()); queryWrapper.eq(SubjectInfoSourceMap::getSubjectId, subjectId);
if (CollectionUtils.isNotEmpty(sourceLabelCodeSet)) { List<SubjectInfoSourceMap> mapList = subjectInfoSourceMapService.list(queryWrapper);
if (subjectSourceTagVO != null) { //判断绑定的信息源标签是否发生变化
Set<String> labelItemCodeSetAll = new HashSet<>(); if (CollectionUtils.isEmpty(mapList)) {
List<InfoSourceLabelVO> labelList = subjectSourceTagVO.getLabelList(); if (infoSourceMainLabelVO != null && infoSourceMainLabelVO.getInfoSourceLabelItemList().size() > 0) {
for (InfoSourceLabelVO infoSourceLabelVO : labelList) { flag = true;
List<InfoSourceLabelItemVO> infoSourceLabelItemList = infoSourceLabelVO.getInfoSourceLabelItemList(); }
Set<String> labelItemCodeSet = infoSourceLabelItemList.stream().map(InfoSourceLabelItemVO::getLabelItemCode).collect(Collectors.toSet()); } else {
labelItemCodeSetAll.addAll(labelItemCodeSet); //判断 是否绑定信息源标签
} List<String> sourceLabelCodeList = mapList.stream().filter(e -> Objects.equals(e.getType(), BindTypeEnum.INFO_SOURCE_MAIN_LABEL.getvalue())).map(SubjectInfoSourceMap::getSourceItemId).collect(Collectors.toList());
if (!sourceLabelCodeSet.equals(labelItemCodeSetAll)) { if (CollectionUtils.isNotEmpty(sourceLabelCodeList)) {
if (infoSourceMainLabelVO != null) {
List<String> labelItemCodeSetAll = infoSourceMainLabelVO.getInfoSourceLabelItemList();
if (!sourceLabelCodeList.equals(labelItemCodeSetAll)) {
flag = true;
}
} else {
flag = true; flag = true;
} }
} else {
flag = true;
} }
} }
} }
......
package com.zzsn.event.vo; package com.zzsn.event.vo;
import com.zzsn.event.entity.arrange.ClbModelArrange;
import lombok.Data; import lombok.Data;
import java.util.List;
/** /**
* *
* *
...@@ -16,6 +19,7 @@ public class EventManageVO { ...@@ -16,6 +19,7 @@ public class EventManageVO {
private String eventIcon; private String eventIcon;
private String eventName; private String eventName;
private String typeName; private String typeName;
private String subjectTypeName;
private String eventLabel; private String eventLabel;
private Integer facePublic; private Integer facePublic;
private Integer publishStatus; private Integer publishStatus;
...@@ -25,4 +29,6 @@ public class EventManageVO { ...@@ -25,4 +29,6 @@ public class EventManageVO {
private String startTime; private String startTime;
private String endTime; private String endTime;
private Integer status; private Integer status;
/**专题题绑定流程信息*/
private List<ClbModelArrange> clbModelArranges;
} }
package com.zzsn.event.vo; package com.zzsn.event.vo;
import cn.hutool.json.JSONObject;
import com.zzsn.event.vo.es.Label; import com.zzsn.event.vo.es.Label;
import lombok.Data; import lombok.Data;
...@@ -64,6 +65,8 @@ public class InfoDataSearchCondition { ...@@ -64,6 +65,8 @@ public class InfoDataSearchCondition {
//平台-审核状态(null-全部;1-通过;2-未审核;3-暂定;4-删除;5-免审核) //平台-审核状态(null-全部;1-通过;2-未审核;3-暂定;4-删除;5-免审核)
private Integer auditStatus; private Integer auditStatus;
//审核操作(0:未审核 1:审核通过 2:审核未通过 3:暂定 默认值为0) //审核操作(0:未审核 1:审核通过 2:审核未通过 3:暂定 默认值为0)
private Integer checkStatus; private Integer checkStatus;
//删除标记(1:删除;0:未删除) //删除标记(1:删除;0:未删除)
...@@ -205,4 +208,5 @@ public class InfoDataSearchCondition { ...@@ -205,4 +208,5 @@ public class InfoDataSearchCondition {
* 本次任务使用的流程id * 本次任务使用的流程id
*/ */
private String flowId; private String flowId;
private JSONObject specialLabelParams;
} }
...@@ -37,6 +37,8 @@ public class SubjectDetailVO { ...@@ -37,6 +37,8 @@ public class SubjectDetailVO {
private Integer dataSource; private Integer dataSource;
/**划分专题库*/ /**划分专题库*/
private String library; private String library;
/**是否全选(1-是;0-否)*/
private Integer dataScope;
/**第一次启用时间*/ /**第一次启用时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
......
...@@ -13,11 +13,14 @@ import java.util.List; ...@@ -13,11 +13,14 @@ import java.util.List;
@Data @Data
public class SubjectParamsCheckVO { public class SubjectParamsCheckVO {
/**专题新增参数*/ /**专题基本信息参数*/
private SubjectSimpleVO subjectSimpleVO; private SubjectSimpleVO subjectSimpleVO;
/**(信息源标签)是否全选(1-是;0-否)*/
private Integer dataScope;
/**信息源标签*/ /**信息源标签*/
private SubjectSourceTagVO subjectSourceTagVO; private InfoSourceMainLabelVO infoSourceMainLabelVO;
/**定向信息源是否发生变化*/ /**定向信息源是否发生变化*/
private boolean directSourceChange; private boolean directSourceChange;
......
...@@ -144,4 +144,46 @@ public class DisplayInfo { ...@@ -144,4 +144,46 @@ public class DisplayInfo {
* 是否是主条目,0为非主条目,1为主条目 * 是否是主条目,0为非主条目,1为主条目
*/ */
private Integer ismain; private Integer ismain;
//政策文件信息字段
/**
* 索引号
*/
private String indexNumber;
/**
* 主题词
*/
private String topicInfo;
/**
* 实施日期
*/
private String implementDate;
/**
* 失效日期
*/
private String invalidDate;
/**
* 时效
*/
private String effectiveness;
/**
* 信息来源
*/
private String informationSources;
/**
* 公文种类
*/
private String officialDocumentType;
/**
* 效力位阶
*/
private String legalPrecedenceHierarchy;
//政策文件信息字段结束
/**克虏宝平台基础索引库名 来源基础库*/
private String sourceDbType;
} }
...@@ -123,4 +123,58 @@ public class ESData { ...@@ -123,4 +123,58 @@ public class ESData {
private String checkDate; private String checkDate;
/**原创性*/ /**原创性*/
private String originality; private String originality;
//政策文件信息字段
/**
* 索引号
*/
private String indexNumber;
/**
* 发文机关
*/
private String organ;
/**
* 发文字号
*/
private String issuedNumber;
/**
* 主题词
*/
private String topicInfo;
/**
* 主题分类
*/
private String topicClassification;
/**
* 成文日期
*/
private String writtenDate;
/**
* 实施日期
*/
private String implementDate;
/**
* 失效日期
*/
private String invalidDate;
/**
* 时效
*/
private String effectiveness;
/**
* 信息来源
*/
private String informationSources;
/**
* 公文种类
*/
private String officialDocumentType;
/**
* 效力位阶
*/
private String legalPrecedenceHierarchy;
//政策文件信息字段结束
/**克虏宝平台基础索引库名 来源基础库*/
private String sourceDbType;
} }
...@@ -150,6 +150,62 @@ public class SpecialInformation { ...@@ -150,6 +150,62 @@ public class SpecialInformation {
private Integer dataFrom; private Integer dataFrom;
//政策文件信息字段
/**
* 索引号
*/
private String indexNumber;
/**
* 发文机关
*/
private String organ;
/**
* 发文字号
*/
private String issuedNumber;
/**
* 主题词
*/
private String topicInfo;
/**
* 主题分类
*/
private String topicClassification;
/**
* 成文日期
*/
private String writtenDate;
/**
* 实施日期
*/
private String implementDate;
/**
* 失效日期
*/
private String invalidDate;
/**
* 时效
*/
private String effectiveness;
/**
* 信息来源
*/
private String informationSources;
/**
* 公文种类
*/
private String officialDocumentType;
/**
* 效力位阶
*/
private String legalPrecedenceHierarchy;
//政策文件信息字段结束
/**克虏宝平台基础索引库名 来源基础库*/
private String sourceDbType;
public List<String> toExcelList(){ public List<String> toExcelList(){
List<String> list = new ArrayList<>(); List<String> list = new ArrayList<>();
list.add(getRealValue(score)); list.add(getRealValue(score));
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论