wjj vor 2 Tagen
Ursprung
Commit
696aa85e7e

+ 109 - 0
fs-admin/src/main/java/com/fs/his/controller/FsProjectCateController.java

@@ -0,0 +1,109 @@
+package com.fs.his.controller;
+
+import java.util.List;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.enums.BusinessType;
+import com.fs.his.domain.FsProjectCate;
+import com.fs.his.service.IFsProjectCateService;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.common.core.page.TableDataInfo;
+
+/**
+ * 理疗分类Controller
+ * 
+ * @author fs
+ * @date 2026-05-14
+ */
+@RestController
+@RequestMapping("/his/projectCate")
+public class FsProjectCateController extends BaseController
+{
+    @Autowired
+    private IFsProjectCateService fsProjectCateService;
+
+    /**
+     * 查询理疗分类列表
+     */
+    @PreAuthorize("@ss.hasPermi('his:projectCate:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(FsProjectCate fsProjectCate)
+    {
+        startPage();
+        List<FsProjectCate> list = fsProjectCateService.selectFsProjectCateList(fsProjectCate);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出理疗分类列表
+     */
+    @PreAuthorize("@ss.hasPermi('his:projectCate:export')")
+    @Log(title = "理疗分类", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(FsProjectCate fsProjectCate)
+    {
+        List<FsProjectCate> list = fsProjectCateService.selectFsProjectCateList(fsProjectCate);
+        ExcelUtil<FsProjectCate> util = new ExcelUtil<FsProjectCate>(FsProjectCate.class);
+        return util.exportExcel(list, "理疗分类数据");
+    }
+
+    /**
+     * 获取理疗分类详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('his:projectCate:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(fsProjectCateService.selectFsProjectCateById(id));
+    }
+
+    /**
+     * 新增理疗分类
+     */
+    @PreAuthorize("@ss.hasPermi('his:projectCate:add')")
+    @Log(title = "理疗分类", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody FsProjectCate fsProjectCate)
+    {
+        return toAjax(fsProjectCateService.insertFsProjectCate(fsProjectCate));
+    }
+
+    /**
+     * 修改理疗分类
+     */
+    @PreAuthorize("@ss.hasPermi('his:projectCate:edit')")
+    @Log(title = "理疗分类", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody FsProjectCate fsProjectCate)
+    {
+        return toAjax(fsProjectCateService.updateFsProjectCate(fsProjectCate));
+    }
+
+    /**
+     * 删除理疗分类
+     */
+    @PreAuthorize("@ss.hasPermi('his:projectCate:remove')")
+    @Log(title = "理疗分类", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(fsProjectCateService.deleteFsProjectCateByIds(ids));
+    }
+
+    @GetMapping("/options")
+    public AjaxResult selectFsProjectCateListOptions(){
+        List<FsProjectCate> list = fsProjectCateService.selectFsProjectCateListOptions();
+        return AjaxResult.success(list);
+    }
+}

+ 10 - 0
fs-service/src/main/java/com/fs/his/domain/FsProject.java

@@ -82,4 +82,14 @@ public class FsProject extends BaseEntity{
      * 证型调理开关 1-开 0-关
      */
     private Integer treatmentTargetTag;
+
+    /**
+     * 分类 id
+     */
+    private Long cateId;
+
+    /**
+     * 子标题
+     */
+    private String subTitle;
 }

+ 32 - 0
fs-service/src/main/java/com/fs/his/domain/FsProjectCate.java

@@ -0,0 +1,32 @@
+package com.fs.his.domain;
+
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.fs.common.annotation.Excel;
+import lombok.Data;
+import com.fs.common.core.domain.BaseEntity;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 理疗分类对象 fs_project_cate
+ *
+ * @author fs
+ * @date 2026-05-14
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class FsProjectCate extends BaseEntity{
+
+    /** $column.columnComment */
+    private Long id;
+
+    /** 分类名称 */
+    @Excel(name = "分类名称")
+    private String cateName;
+
+    /**
+     * 状态 0-禁用 1-正常
+     */
+    private Integer status;
+
+
+}

+ 65 - 0
fs-service/src/main/java/com/fs/his/mapper/FsProjectCateMapper.java

@@ -0,0 +1,65 @@
+package com.fs.his.mapper;
+
+import java.util.List;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.fs.his.domain.FsProjectCate;
+import org.apache.ibatis.annotations.Select;
+
+/**
+ * 理疗分类Mapper接口
+ * 
+ * @author fs
+ * @date 2026-05-14
+ */
+public interface FsProjectCateMapper extends BaseMapper<FsProjectCate>{
+    /**
+     * 查询理疗分类
+     * 
+     * @param id 理疗分类主键
+     * @return 理疗分类
+     */
+    FsProjectCate selectFsProjectCateById(Long id);
+
+    /**
+     * 查询理疗分类列表
+     * 
+     * @param fsProjectCate 理疗分类
+     * @return 理疗分类集合
+     */
+    List<FsProjectCate> selectFsProjectCateList(FsProjectCate fsProjectCate);
+
+    /**
+     * 新增理疗分类
+     * 
+     * @param fsProjectCate 理疗分类
+     * @return 结果
+     */
+    int insertFsProjectCate(FsProjectCate fsProjectCate);
+
+    /**
+     * 修改理疗分类
+     * 
+     * @param fsProjectCate 理疗分类
+     * @return 结果
+     */
+    int updateFsProjectCate(FsProjectCate fsProjectCate);
+
+    /**
+     * 删除理疗分类
+     * 
+     * @param id 理疗分类主键
+     * @return 结果
+     */
+    int deleteFsProjectCateById(Long id);
+
+    /**
+     * 批量删除理疗分类
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    int deleteFsProjectCateByIds(Long[] ids);
+
+    @Select("SELECT id,cate_name FROM fs_project_cate where status = 1")
+    List<FsProjectCate> selectFsProjectCateListOptions();
+}

+ 63 - 0
fs-service/src/main/java/com/fs/his/service/IFsProjectCateService.java

@@ -0,0 +1,63 @@
+package com.fs.his.service;
+
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.fs.his.domain.FsProjectCate;
+
+/**
+ * 理疗分类Service接口
+ * 
+ * @author fs
+ * @date 2026-05-14
+ */
+public interface IFsProjectCateService extends IService<FsProjectCate>{
+    /**
+     * 查询理疗分类
+     * 
+     * @param id 理疗分类主键
+     * @return 理疗分类
+     */
+    FsProjectCate selectFsProjectCateById(Long id);
+
+    /**
+     * 查询理疗分类列表
+     * 
+     * @param fsProjectCate 理疗分类
+     * @return 理疗分类集合
+     */
+    List<FsProjectCate> selectFsProjectCateList(FsProjectCate fsProjectCate);
+
+    /**
+     * 新增理疗分类
+     * 
+     * @param fsProjectCate 理疗分类
+     * @return 结果
+     */
+    int insertFsProjectCate(FsProjectCate fsProjectCate);
+
+    /**
+     * 修改理疗分类
+     * 
+     * @param fsProjectCate 理疗分类
+     * @return 结果
+     */
+    int updateFsProjectCate(FsProjectCate fsProjectCate);
+
+    /**
+     * 批量删除理疗分类
+     * 
+     * @param ids 需要删除的理疗分类主键集合
+     * @return 结果
+     */
+    int deleteFsProjectCateByIds(Long[] ids);
+
+    /**
+     * 删除理疗分类信息
+     * 
+     * @param id 理疗分类主键
+     * @return 结果
+     */
+    int deleteFsProjectCateById(Long id);
+
+    List<FsProjectCate> selectFsProjectCateListOptions();
+}

+ 103 - 0
fs-service/src/main/java/com/fs/his/service/impl/FsProjectCateServiceImpl.java

@@ -0,0 +1,103 @@
+package com.fs.his.service.impl;
+
+import java.util.Collections;
+import java.util.List;
+import com.fs.common.utils.DateUtils;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.fs.his.mapper.FsProjectCateMapper;
+import com.fs.his.domain.FsProjectCate;
+import com.fs.his.service.IFsProjectCateService;
+
+/**
+ * 理疗分类Service业务层处理
+ * 
+ * @author fs
+ * @date 2026-05-14
+ */
+@Service
+public class FsProjectCateServiceImpl extends ServiceImpl<FsProjectCateMapper, FsProjectCate> implements IFsProjectCateService {
+    
+    @Autowired
+    private FsProjectCateMapper fsProjectCateMapper;
+    
+    /**
+     * 查询理疗分类
+     * 
+     * @param id 理疗分类主键
+     * @return 理疗分类
+     */
+    @Override
+    public FsProjectCate selectFsProjectCateById(Long id)
+    {
+        return baseMapper.selectFsProjectCateById(id);
+    }
+
+    /**
+     * 查询理疗分类列表
+     * 
+     * @param fsProjectCate 理疗分类
+     * @return 理疗分类
+     */
+    @Override
+    public List<FsProjectCate> selectFsProjectCateList(FsProjectCate fsProjectCate)
+    {
+        return baseMapper.selectFsProjectCateList(fsProjectCate);
+    }
+
+    /**
+     * 新增理疗分类
+     * 
+     * @param fsProjectCate 理疗分类
+     * @return 结果
+     */
+    @Override
+    public int insertFsProjectCate(FsProjectCate fsProjectCate)
+    {
+        fsProjectCate.setCreateTime(DateUtils.getNowDate());
+        return baseMapper.insertFsProjectCate(fsProjectCate);
+    }
+
+    /**
+     * 修改理疗分类
+     * 
+     * @param fsProjectCate 理疗分类
+     * @return 结果
+     */
+    @Override
+    public int updateFsProjectCate(FsProjectCate fsProjectCate)
+    {
+        fsProjectCate.setUpdateTime(DateUtils.getNowDate());
+        return baseMapper.updateFsProjectCate(fsProjectCate);
+    }
+
+    /**
+     * 批量删除理疗分类
+     * 
+     * @param ids 需要删除的理疗分类主键
+     * @return 结果
+     */
+    @Override
+    public int deleteFsProjectCateByIds(Long[] ids)
+    {
+        return baseMapper.deleteFsProjectCateByIds(ids);
+    }
+
+    /**
+     * 删除理疗分类信息
+     * 
+     * @param id 理疗分类主键
+     * @return 结果
+     */
+    @Override
+    public int deleteFsProjectCateById(Long id)
+    {
+        return baseMapper.deleteFsProjectCateById(id);
+    }
+
+    @Override
+    public List<FsProjectCate> selectFsProjectCateListOptions() {
+        return fsProjectCateMapper.selectFsProjectCateListOptions();
+    }
+}

+ 6 - 0
fs-service/src/main/java/com/fs/patient/service/impl/FsPatientBaseInfoServiceImpl.java

@@ -24,6 +24,7 @@ import com.fs.course.domain.FsVideoResource;
 import com.fs.course.mapper.FsCourseTrafficLogMapper;
 import com.fs.course.mapper.FsVideoResourceMapper;
 import com.fs.his.domain.*;
+import com.fs.his.mapper.FsProjectCateMapper;
 import com.fs.his.mapper.FsProjectRedDetailMapper;
 import com.fs.his.mapper.FsUserMapper;
 import com.fs.his.param.FsPatientBaseInfoListDParam;
@@ -112,6 +113,9 @@ public class FsPatientBaseInfoServiceImpl extends ServiceImpl<FsPatientBaseInfoM
 
     @Autowired
     private FsCourseTrafficLogMapper fsCourseTrafficLogMapper;
+
+    @Autowired
+    private FsProjectCateMapper fsProjectCateMapper;
     /**
      * 查询患者基本信息
      * 
@@ -348,6 +352,8 @@ public class FsPatientBaseInfoServiceImpl extends ServiceImpl<FsPatientBaseInfoM
             if (resource != null) {
                 patientBaseInfoVO.setDuration(resource.getDuration());
             }
+            FsProjectCate fsProjectCate = fsProjectCateMapper.selectFsProjectCateById(fsProject.getCateId());
+            patientBaseInfoVO.setCate(fsProjectCate);
         }
 
         //红包配置信息

+ 3 - 0
fs-service/src/main/java/com/fs/patient/vo/PatientBaseInfoVO.java

@@ -2,6 +2,7 @@ package com.fs.patient.vo;
 
 import com.fs.common.annotation.Excel;
 import com.fs.his.domain.FsProject;
+import com.fs.his.domain.FsProjectCate;
 import lombok.Data;
 
 import java.math.BigDecimal;
@@ -66,4 +67,6 @@ public class PatientBaseInfoVO {
     private Integer type;
 
     private Integer duration; //时长
+
+    private FsProjectCate cate;
 }

+ 68 - 0
fs-service/src/main/resources/mapper/his/FsProjectCateMapper.xml

@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.fs.his.mapper.FsProjectCateMapper">
+    
+    <resultMap type="FsProjectCate" id="FsProjectCateResult">
+        <result property="id"    column="id"    />
+        <result property="cateName"    column="cate_name"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="status"    column="status"    />
+    </resultMap>
+
+    <sql id="selectFsProjectCateVo">
+        select id, cate_name, create_time, update_time, status from fs_project_cate
+    </sql>
+
+    <select id="selectFsProjectCateList" parameterType="FsProjectCate" resultMap="FsProjectCateResult">
+        <include refid="selectFsProjectCateVo"/>
+        <where>  
+            <if test="cateName != null  and cateName != ''"> and cate_name like concat('%', #{cateName}, '%')</if>
+        </where>
+    </select>
+    
+    <select id="selectFsProjectCateById" parameterType="Long" resultMap="FsProjectCateResult">
+        <include refid="selectFsProjectCateVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertFsProjectCate" parameterType="FsProjectCate" useGeneratedKeys="true" keyProperty="id">
+        insert into fs_project_cate
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="cateName != null">cate_name,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="status != null">status,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="cateName != null">#{cateName},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="status != null">#{status},</if>
+         </trim>
+    </insert>
+
+    <update id="updateFsProjectCate" parameterType="FsProjectCate">
+        update fs_project_cate
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="cateName != null">cate_name = #{cateName},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="status != null">status = #{status},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteFsProjectCateById" parameterType="Long">
+        delete from fs_project_cate where id = #{id}
+    </delete>
+
+    <delete id="deleteFsProjectCateByIds" parameterType="String">
+        delete from fs_project_cate where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 9 - 1
fs-service/src/main/resources/mapper/his/FsProjectMapper.xml

@@ -23,13 +23,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="soundUrl"    column="sound_url"    />
         <result property="soundStatus"    column="sound_status"    />
         <result property="treatmentTargetTag"    column="treatment_target_tag"    />
+        <result property="cateId"    column="cate_id"    />
+        <result property="subTitle"    column="sub_title"    />
     </resultMap>
 
     <sql id="selectFsProjectVo">
         select id, project_name, day_name, create_time, update_time, meridians_img_url
              , first_field, second_field, third_field, fourth_field, first_content
              , second_content, third_content, fourth_content,video_url
-             , sound_url, sound_status, treatment_target_tag from fs_project
+             , sound_url, sound_status, treatment_target_tag, cate_id, sub_title from fs_project
     </sql>
 
     <select id="selectFsProjectList" parameterType="FsProject" resultMap="FsProjectResult">
@@ -74,6 +76,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="soundUrl != null">sound_url,</if>
             <if test="soundStatus != null">sound_status,</if>
             <if test="treatmentTargetTag != null">treatment_target_tag,</if>
+            <if test="cateId != null">cate_id,</if>
+            <if test="subTitle != null">sub_title,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="projectName != null">#{projectName},</if>
@@ -93,6 +97,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="soundUrl != null">#{soundUrl},</if>
             <if test="soundStatus != null">#{soundStatus},</if>
             <if test="treatmentTargetTag != null">#{treatmentTargetTag},</if>
+            <if test="cateId != null">#{cateId},</if>
+            <if test="subTitle != null">#{subTitle},</if>
          </trim>
     </insert>
 
@@ -116,6 +122,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="soundUrl != null">sound_url = #{soundUrl},</if>
             <if test="soundStatus != null">sound_status = #{soundStatus},</if>
             <if test="treatmentTargetTag != null">treatment_target_tag = #{treatmentTargetTag},</if>
+            <if test="cateId != null">cate_id = #{cateId},</if>
+            <if test="subTitle != null">sub_title = #{subTitle},</if>
         </trim>
         where id = #{id}
     </update>