专病路径

This commit is contained in:
zhangheng 2024-04-01 17:13:42 +08:00
parent 6560540c4a
commit c580965139
11 changed files with 169 additions and 21 deletions

View File

@ -51,6 +51,14 @@ public class LabelFieldInfoController extends BaseController {
return AjaxResult.success(labelFieldInfoService.selectLabelFieldInfoList(labelFieldInfo));
}
/**
* 查询标签字段信息列表树图
*/
@GetMapping("/labelFieldList")
public AjaxResult labelFieldList(String fieldType) {
return AjaxResult.success(labelFieldInfoService.labelFieldList(fieldType));
}
/**
* 导出标签字段信息列表
*/

View File

@ -1,6 +1,7 @@
package com.xinelu.manage.mapper.labelfieldcontent;
import com.xinelu.manage.domain.labelfieldcontent.LabelFieldContent;
import com.xinelu.manage.vo.labelfieldcontent.LabelFieldContentVO;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -69,4 +70,12 @@ public interface LabelFieldContentMapper {
* 检查除去当前记录外有没有重复内容名称
*/
int existCountByContentNameExcludingId(@Param("id") Long id, @Param("fieldId") Long fieldId, @Param("contentName") String contentName);
/**
* 查询标签信息根据标签字段信息表
*
* @param labelFieldIds 标签字段信息表
* @return LabelFieldContentVO
*/
List<LabelFieldContentVO> selectLabelFieldContent(@Param("labelFieldIds") List<Long> labelFieldIds);
}

View File

@ -1,6 +1,7 @@
package com.xinelu.manage.mapper.labelfieldinfo;
import com.xinelu.manage.domain.labelfieldinfo.LabelFieldInfo;
import com.xinelu.manage.vo.labelfieldinfo.LabelFieldVO;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -28,6 +29,14 @@ public interface LabelFieldInfoMapper {
*/
public List<LabelFieldInfo> selectLabelFieldInfoList(LabelFieldInfo labelFieldInfo);
/**
* 查询标签字段信息列表
*
* @param fieldType 标签字段信息
* @return 标签字段信息集合
*/
List<LabelFieldVO> selectLabelFieldList(String fieldType);
/**
* 新增标签字段信息
*

View File

@ -153,8 +153,8 @@ public class DepartmentServiceImpl implements IDepartmentService {
/**
* 查询科室信息列表及包含话术数量
*
* @param departmentDto
* @return
* @param departmentDto 科室信息
* @return 结果
*/
@Override
public List<DepartmentVO> selectDepartmentListScriptNum(DepartmentDTO departmentDto) {
@ -164,8 +164,8 @@ public class DepartmentServiceImpl implements IDepartmentService {
/**
* 查询科室信息列表及包含手术数量
*
* @param departmentDto
* @return
* @param departmentDto 科室信息
* @return 结果
*/
@Override
public List<DepartmentVO> selectDepartmentListOperationNum(DepartmentDTO departmentDto) {
@ -175,8 +175,8 @@ public class DepartmentServiceImpl implements IDepartmentService {
/**
* 查询科室信息列表及包含微信库数量
*
* @param departmentDto
* @return
* @param departmentDto 科室信息
* @return 结果
*/
@Override
public List<DepartmentVO> selectDepartmentListWechatTemplateNum(DepartmentDTO departmentDto) {
@ -186,8 +186,8 @@ public class DepartmentServiceImpl implements IDepartmentService {
/**
* 查询科室信息列表及包含短信库数量
*
* @param departmentDto
* @return
* @param departmentDto 科室信息
* @return 结果
*/
@Override
public List<DepartmentVO> selectDepartmentListMessageNum(DepartmentDTO departmentDto) {
@ -198,7 +198,7 @@ public class DepartmentServiceImpl implements IDepartmentService {
* 科室信息导入
*
* @param departmentList 科室信息
* @return
* @return 结果
*/
@Transactional(rollbackFor = Exception.class)
@ -244,8 +244,8 @@ public class DepartmentServiceImpl implements IDepartmentService {
/**
* 查询科室信息列表及包含服务包数量
*
* @param departmentDto
* @return
* @param departmentDto 科室
* @return 结果
*/
@Override
public List<DepartmentVO> selectListServicePackageNum(DepartmentDTO departmentDto) {

View File

@ -1,5 +1,6 @@
package com.xinelu.manage.service.labelfieldinfo;
import com.xinelu.common.core.domain.AjaxResult;
import com.xinelu.manage.domain.labelfieldinfo.LabelFieldInfo;
import com.xinelu.manage.dto.labelfieldinfo.LabelFieldInfoAddDTO;
@ -28,6 +29,14 @@ public interface ILabelFieldInfoService {
*/
List<LabelFieldInfo> selectLabelFieldInfoList(LabelFieldInfo labelFieldInfo);
/**
* 标签字段信息表 查询标签字段信息列表树图
*
* @param fieldType 字段类型
* @return AjaxResult
*/
AjaxResult labelFieldList(String fieldType);
/**
* 新增标签字段信息
*

View File

@ -1,13 +1,17 @@
package com.xinelu.manage.service.labelfieldinfo.impl;
import com.xinelu.common.constant.Constants;
import com.xinelu.common.core.domain.AjaxResult;
import com.xinelu.common.exception.ServiceException;
import com.xinelu.common.utils.SecurityUtils;
import com.xinelu.common.utils.codes.GenerateSystemCodeUtil;
import com.xinelu.manage.domain.labelfieldinfo.LabelFieldInfo;
import com.xinelu.manage.dto.labelfieldinfo.LabelFieldInfoAddDTO;
import com.xinelu.manage.mapper.labelfieldcontent.LabelFieldContentMapper;
import com.xinelu.manage.mapper.labelfieldinfo.LabelFieldInfoMapper;
import com.xinelu.manage.service.labelfieldinfo.ILabelFieldInfoService;
import com.xinelu.manage.vo.labelfieldcontent.LabelFieldContentVO;
import com.xinelu.manage.vo.labelfieldinfo.LabelFieldVO;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.stereotype.Service;
@ -17,6 +21,7 @@ import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors;
/**
@ -33,6 +38,9 @@ public class LabelFieldInfoServiceImpl implements ILabelFieldInfoService {
@Resource
private GenerateSystemCodeUtil systemCodeUtil;
@Resource
private LabelFieldContentMapper labelFieldContentMapper;
/**
* 查询标签字段信息
*
@ -55,6 +63,27 @@ public class LabelFieldInfoServiceImpl implements ILabelFieldInfoService {
return labelFieldInfoMapper.selectLabelFieldInfoList(labelFieldInfo);
}
/**
* 查询标签字段信息列表树图
*
* @param fieldType 字段类型
* @return AjaxResult
*/
@Override
public AjaxResult labelFieldList(String fieldType) {
List<LabelFieldVO> labelFieldList = labelFieldInfoMapper.selectLabelFieldList(fieldType);
List<Long> labelFieldIds = labelFieldList.stream().filter(Objects::nonNull).map(LabelFieldVO::getLabelFieldId).filter(Objects::nonNull).collect(Collectors.toList());
if (labelFieldIds.size() == 0) {
return AjaxResult.success(labelFieldList);
}
List<LabelFieldContentVO> labelFieldContentList = labelFieldContentMapper.selectLabelFieldContent(labelFieldIds);
for (LabelFieldVO labelField : labelFieldList) {
List<LabelFieldContentVO> collect = labelFieldContentList.stream().filter(Objects::nonNull).filter(item -> Objects.nonNull(item.getFieldId()) && labelField.getLabelFieldId().equals(item.getFieldId())).collect(Collectors.toList());
labelField.setLabelFieldContentList(collect);
}
return AjaxResult.success(labelFieldList);
}
/**
* 新增标签字段信息
*

View File

@ -0,0 +1,21 @@
package com.xinelu.manage.vo.labelfieldcontent;
import com.xinelu.manage.domain.labelfieldcontent.LabelFieldContent;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 标签字段内容信息对象 label_field_content
*
* @author xinelu
* @date 2024-03-11
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class LabelFieldContentVO extends LabelFieldContent {
/**
* 标签内容表
*/
private Long LabelFieldContentId;
}

View File

@ -0,0 +1,29 @@
package com.xinelu.manage.vo.labelfieldinfo;
import com.xinelu.manage.domain.labelfieldinfo.LabelFieldInfo;
import com.xinelu.manage.vo.labelfieldcontent.LabelFieldContentVO;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.List;
/**
* 标签字段信息对象 label_field_info
*
* @author xinelu
* @date 2024-03-11
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class LabelFieldVO extends LabelFieldInfo {
/**
* 标签字段表
*/
private Long LabelFieldId;
/**
* 标签内容
*/
private List<LabelFieldContentVO> labelFieldContentList;
}

View File

@ -30,7 +30,7 @@ public class SpecialDiseaseRouteVO extends SpecialDiseaseRoute {
List<SpecialDiseaseNodeVO> specialDiseaseNodeList;
/**
* 节点信息
* 触发条件信息
*/
List<TriggerConditionVO> triggerConditionList;
}

View File

@ -212,4 +212,26 @@
#{id}
</foreach>
</delete>
<select id="selectLabelFieldContent"
resultType="com.xinelu.manage.vo.labelfieldcontent.LabelFieldContentVO">
select id LabelFieldContentId,
field_id,
field_name,
content_name,
content_code,
result_preview,
content_sort,
content_remark,
field_mark
from label_field_content
<where>
<if test="labelFieldIds != null and labelFieldIds.size() > 0">
field_id in
<foreach item="labelFieldIds" collection="labelFieldIds" open="(" separator="," close=")">
#{labelFieldIds}
</foreach>
</if>
</where>
</select>
</mapper>

View File

@ -59,6 +59,18 @@
</where>
</select>
<select id="selectLabelFieldList" resultType="com.xinelu.manage.vo.labelfieldinfo.LabelFieldVO">
select id LabelFieldId,
field_name,
field_code,
field_type,
field_sort,
field_remark
from label_field_info
where field_type = #{fieldType}
</select>
<select id="selectLabelFieldInfoById" parameterType="Long"
resultMap="LabelFieldInfoResult">
<include refid="selectLabelFieldInfoVo"/>
@ -131,31 +143,31 @@
update label_field_info
<trim prefix="SET" suffixOverrides=",">
<if test="fieldName != null">field_name =
#{fieldName},
#{fieldName},
</if>
<if test="fieldCode != null">field_code =
#{fieldCode},
#{fieldCode},
</if>
<if test="fieldType != null">field_type =
#{fieldType},
#{fieldType},
</if>
<if test="fieldSort != null">field_sort =
#{fieldSort},
#{fieldSort},
</if>
<if test="fieldRemark != null">field_remark =
#{fieldRemark},
#{fieldRemark},
</if>
<if test="createBy != null">create_by =
#{createBy},
#{createBy},
</if>
<if test="createTime != null">create_time =
#{createTime},
#{createTime},
</if>
<if test="updateBy != null">update_by =
#{updateBy},
#{updateBy},
</if>
<if test="updateTime != null">update_time =
#{updateTime},
#{updateTime},
</if>
</trim>
where id = #{id}