管理端知识库无数据修改

This commit is contained in:
zhangheng 2024-07-09 16:05:25 +08:00
parent 7dbf152a62
commit f959cbc0a0
3 changed files with 19 additions and 5 deletions

View File

@ -116,6 +116,9 @@ public class LabelFieldInfoController extends BaseController {
return toAjax(labelFieldInfoService.deleteLabelFieldInfoByIds(ids));
}
/**
* 任务类型分组
*/
@GetMapping("/taskTypeGrouping")
public AjaxResult taskTypeGrouping() {
return labelFieldInfoService.taskTypeGrouping();

View File

@ -181,14 +181,25 @@ public class LabelFieldInfoServiceImpl implements ILabelFieldInfoService {
return 1;
}
/**
* 查询字段信息
*
* @return AjaxResult
*/
@Override
public AjaxResult taskTypeGrouping() {
//查询任务类型
List<TaskTypeDictVO> taskTypeDictList = taskTypeDictMapper.selectTaskTypeDicts();
List<Long> ids = taskTypeDictList.stream().filter(Objects::nonNull).map(TaskTypeDictVO::getTaskTypeId).filter(Objects::nonNull).collect(Collectors.toList());
//查询细分类型
if (CollectionUtils.isEmpty(taskTypeDictList)) {
return AjaxResult.success(taskTypeDictList);
}
List<TaskPartitionDict> taskPartitionDicts = taskPartitionDictMapper.selectTaskPartitionList(ids);
if (CollectionUtils.isEmpty(taskPartitionDicts)) {
return AjaxResult.success(taskPartitionDicts);
}
//组装
for (TaskTypeDictVO taskTypeDictVO : taskTypeDictList) {
List<TaskPartitionDict> collect = taskPartitionDicts.stream().filter(Objects::nonNull).filter(item -> Objects.nonNull(item.getTaskTypeId()) && taskTypeDictVO.getTaskTypeId().equals(item.getTaskTypeId())).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(collect)) {

View File

@ -125,14 +125,14 @@
wt.template_sort,
wt.template_remark,
wtst.id AS taskId,
GROUP_CONCAT(wtst.suit_task_type_name SEPARATOR ',') as suitTaskTypeName
GROUP_CONCAT(wtst.suit_task_type_name SEPARATOR ',') as suitTaskTypeName
from wechat_template wt
left join wechat_template_suit_task wtst on wt.id = wtst.wechat_template_id
left join department d on d.id = wt.department_id
<where>
<if test="hospitalAgencyId != null">
and d.hospital_agency_id = #{hospitalAgencyId}
</if>
<if test="hospitalAgencyId != null">
and d.hospital_agency_id = #{hospitalAgencyId}
</if>
<if test="departmentId != null ">
and wt.department_id =
#{departmentId}
@ -156,7 +156,7 @@
<!-- 数据范围过滤 -->
${params.dataScope}
</where>
group by wt.id order by wt.create_time DESC,wtst.create_time DESC
group by wt.id,wtst.id order by wt.create_time DESC,wtst.create_time DESC
</select>
<select id="selectWechatTemplateDtoById" resultMap="WechatTemplateVOResultMap">
select wt.id,