wjj 6 napja
szülő
commit
d3db20c45d

+ 103 - 0
fs-admin/src/main/java/com/fs/his/controller/FsProjectController.java

@@ -0,0 +1,103 @@
+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.FsProject;
+import com.fs.his.service.IFsProjectService;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.common.core.page.TableDataInfo;
+
+/**
+ * 理疗配置Controller
+ * 
+ * @author fs
+ * @date 2026-04-19
+ */
+@RestController
+@RequestMapping("/his/project")
+public class FsProjectController extends BaseController
+{
+    @Autowired
+    private IFsProjectService fsProjectService;
+
+    /**
+     * 查询理疗配置列表
+     */
+    @PreAuthorize("@ss.hasPermi('his:project:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(FsProject fsProject)
+    {
+        startPage();
+        List<FsProject> list = fsProjectService.selectFsProjectList(fsProject);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出理疗配置列表
+     */
+    @PreAuthorize("@ss.hasPermi('his:project:export')")
+    @Log(title = "理疗配置", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(FsProject fsProject)
+    {
+        List<FsProject> list = fsProjectService.selectFsProjectList(fsProject);
+        ExcelUtil<FsProject> util = new ExcelUtil<FsProject>(FsProject.class);
+        return util.exportExcel(list, "理疗配置数据");
+    }
+
+    /**
+     * 获取理疗配置详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('his:project:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(fsProjectService.selectFsProjectById(id));
+    }
+
+    /**
+     * 新增理疗配置
+     */
+    @PreAuthorize("@ss.hasPermi('his:project:add')")
+    @Log(title = "理疗配置", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody FsProject fsProject)
+    {
+        return toAjax(fsProjectService.insertFsProject(fsProject));
+    }
+
+    /**
+     * 修改理疗配置
+     */
+    @PreAuthorize("@ss.hasPermi('his:project:edit')")
+    @Log(title = "理疗配置", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody FsProject fsProject)
+    {
+        return toAjax(fsProjectService.updateFsProject(fsProject));
+    }
+
+    /**
+     * 删除理疗配置
+     */
+    @PreAuthorize("@ss.hasPermi('his:project:remove')")
+    @Log(title = "理疗配置", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(fsProjectService.deleteFsProjectByIds(ids));
+    }
+}

+ 61 - 0
fs-service/src/main/java/com/fs/his/mapper/FsProjectMapper.java

@@ -0,0 +1,61 @@
+package com.fs.his.mapper;
+
+import java.util.List;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.fs.his.domain.FsProject;
+
+/**
+ * 理疗配置Mapper接口
+ * 
+ * @author fs
+ * @date 2026-04-19
+ */
+public interface FsProjectMapper extends BaseMapper<FsProject>{
+    /**
+     * 查询理疗配置
+     * 
+     * @param id 理疗配置主键
+     * @return 理疗配置
+     */
+    FsProject selectFsProjectById(Long id);
+
+    /**
+     * 查询理疗配置列表
+     * 
+     * @param fsProject 理疗配置
+     * @return 理疗配置集合
+     */
+    List<FsProject> selectFsProjectList(FsProject fsProject);
+
+    /**
+     * 新增理疗配置
+     * 
+     * @param fsProject 理疗配置
+     * @return 结果
+     */
+    int insertFsProject(FsProject fsProject);
+
+    /**
+     * 修改理疗配置
+     * 
+     * @param fsProject 理疗配置
+     * @return 结果
+     */
+    int updateFsProject(FsProject fsProject);
+
+    /**
+     * 删除理疗配置
+     * 
+     * @param id 理疗配置主键
+     * @return 结果
+     */
+    int deleteFsProjectById(Long id);
+
+    /**
+     * 批量删除理疗配置
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    int deleteFsProjectByIds(Long[] ids);
+}

+ 61 - 0
fs-service/src/main/java/com/fs/his/service/IFsProjectService.java

@@ -0,0 +1,61 @@
+package com.fs.his.service;
+
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.fs.his.domain.FsProject;
+
+/**
+ * 理疗配置Service接口
+ * 
+ * @author fs
+ * @date 2026-04-19
+ */
+public interface IFsProjectService extends IService<FsProject>{
+    /**
+     * 查询理疗配置
+     * 
+     * @param id 理疗配置主键
+     * @return 理疗配置
+     */
+    FsProject selectFsProjectById(Long id);
+
+    /**
+     * 查询理疗配置列表
+     * 
+     * @param fsProject 理疗配置
+     * @return 理疗配置集合
+     */
+    List<FsProject> selectFsProjectList(FsProject fsProject);
+
+    /**
+     * 新增理疗配置
+     * 
+     * @param fsProject 理疗配置
+     * @return 结果
+     */
+    int insertFsProject(FsProject fsProject);
+
+    /**
+     * 修改理疗配置
+     * 
+     * @param fsProject 理疗配置
+     * @return 结果
+     */
+    int updateFsProject(FsProject fsProject);
+
+    /**
+     * 批量删除理疗配置
+     * 
+     * @param ids 需要删除的理疗配置主键集合
+     * @return 结果
+     */
+    int deleteFsProjectByIds(Long[] ids);
+
+    /**
+     * 删除理疗配置信息
+     * 
+     * @param id 理疗配置主键
+     * @return 结果
+     */
+    int deleteFsProjectById(Long id);
+}

+ 94 - 0
fs-service/src/main/java/com/fs/his/service/impl/FsProjectServiceImpl.java

@@ -0,0 +1,94 @@
+package com.fs.his.service.impl;
+
+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.FsProjectMapper;
+import com.fs.his.domain.FsProject;
+import com.fs.his.service.IFsProjectService;
+
+/**
+ * 理疗配置Service业务层处理
+ * 
+ * @author fs
+ * @date 2026-04-19
+ */
+@Service
+public class FsProjectServiceImpl extends ServiceImpl<FsProjectMapper, FsProject> implements IFsProjectService {
+
+    /**
+     * 查询理疗配置
+     * 
+     * @param id 理疗配置主键
+     * @return 理疗配置
+     */
+    @Override
+    public FsProject selectFsProjectById(Long id)
+    {
+        return baseMapper.selectFsProjectById(id);
+    }
+
+    /**
+     * 查询理疗配置列表
+     * 
+     * @param fsProject 理疗配置
+     * @return 理疗配置
+     */
+    @Override
+    public List<FsProject> selectFsProjectList(FsProject fsProject)
+    {
+        return baseMapper.selectFsProjectList(fsProject);
+    }
+
+    /**
+     * 新增理疗配置
+     * 
+     * @param fsProject 理疗配置
+     * @return 结果
+     */
+    @Override
+    public int insertFsProject(FsProject fsProject)
+    {
+        fsProject.setCreateTime(DateUtils.getNowDate());
+        return baseMapper.insertFsProject(fsProject);
+    }
+
+    /**
+     * 修改理疗配置
+     * 
+     * @param fsProject 理疗配置
+     * @return 结果
+     */
+    @Override
+    public int updateFsProject(FsProject fsProject)
+    {
+        fsProject.setUpdateTime(DateUtils.getNowDate());
+        return baseMapper.updateFsProject(fsProject);
+    }
+
+    /**
+     * 批量删除理疗配置
+     * 
+     * @param ids 需要删除的理疗配置主键
+     * @return 结果
+     */
+    @Override
+    public int deleteFsProjectByIds(Long[] ids)
+    {
+        return baseMapper.deleteFsProjectByIds(ids);
+    }
+
+    /**
+     * 删除理疗配置信息
+     * 
+     * @param id 理疗配置主键
+     * @return 结果
+     */
+    @Override
+    public int deleteFsProjectById(Long id)
+    {
+        return baseMapper.deleteFsProjectById(id);
+    }
+}

+ 93 - 0
fs-service/src/main/resources/mapper/his/FsProjectMapper.xml

@@ -0,0 +1,93 @@
+<?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.FsProjectMapper">
+    
+    <resultMap type="FsProject" id="FsProjectResult">
+        <result property="id"    column="id"    />
+        <result property="projectName"    column="project_name"    />
+        <result property="dayName"    column="day_name"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="meridiansImgUrl"    column="meridians_img_url"    />
+        <result property="qcField"    column="qc_field"    />
+        <result property="jldhField"    column="jldh_field"    />
+        <result property="xxtsField"    column="xxts_field"    />
+        <result property="djxjField"    column="djxj_field"    />
+    </resultMap>
+
+    <sql id="selectFsProjectVo">
+        select id, project_name, day_name, create_time, update_time, meridians_img_url, qc_field, jldh_field, xxts_field, djxj_field from fs_project
+    </sql>
+
+    <select id="selectFsProjectList" parameterType="FsProject" resultMap="FsProjectResult">
+        <include refid="selectFsProjectVo"/>
+        <where>  
+            <if test="projectName != null  and projectName != ''"> and project_name like concat('%', #{projectName}, '%')</if>
+            <if test="dayName != null  and dayName != ''"> and day_name like concat('%', #{dayName}, '%')</if>
+            <if test="meridiansImgUrl != null  and meridiansImgUrl != ''"> and meridians_img_url = #{meridiansImgUrl}</if>
+            <if test="qcField != null  and qcField != ''"> and qc_field = #{qcField}</if>
+            <if test="jldhField != null  and jldhField != ''"> and jldh_field = #{jldhField}</if>
+            <if test="xxtsField != null  and xxtsField != ''"> and xxts_field = #{xxtsField}</if>
+        </where>
+    </select>
+    
+    <select id="selectFsProjectById" parameterType="Long" resultMap="FsProjectResult">
+        <include refid="selectFsProjectVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertFsProject" parameterType="FsProject" useGeneratedKeys="true" keyProperty="id">
+        insert into fs_project
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="projectName != null">project_name,</if>
+            <if test="dayName != null">day_name,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="meridiansImgUrl != null">meridians_img_url,</if>
+            <if test="qcField != null">qc_field,</if>
+            <if test="jldhField != null">jldh_field,</if>
+            <if test="xxtsField != null">xxts_field,</if>
+            <if test="djxjField != null">djxj_field,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="projectName != null">#{projectName},</if>
+            <if test="dayName != null">#{dayName},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="meridiansImgUrl != null">#{meridiansImgUrl},</if>
+            <if test="qcField != null">#{qcField},</if>
+            <if test="jldhField != null">#{jldhField},</if>
+            <if test="xxtsField != null">#{xxtsField},</if>
+            <if test="djxjField != null">#{djxjField},</if>
+         </trim>
+    </insert>
+
+    <update id="updateFsProject" parameterType="FsProject">
+        update fs_project
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="projectName != null">project_name = #{projectName},</if>
+            <if test="dayName != null">day_name = #{dayName},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="meridiansImgUrl != null">meridians_img_url = #{meridiansImgUrl},</if>
+            <if test="qcField != null">qc_field = #{qcField},</if>
+            <if test="jldhField != null">jldh_field = #{jldhField},</if>
+            <if test="xxtsField != null">xxts_field = #{xxtsField},</if>
+            <if test="djxjField != null">djxj_field = #{djxjField},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteFsProjectById" parameterType="Long">
+        delete from fs_project where id = #{id}
+    </delete>
+
+    <delete id="deleteFsProjectByIds" parameterType="String">
+        delete from fs_project where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>