Browse Source

1. 修改理疗配置数据字段 2.销售端---理疗选项接口

wjj 5 days ago
parent
commit
5b96191551

+ 32 - 0
fs-company/src/main/java/com/fs/company/controller/his/FsProjectController.java

@@ -0,0 +1,32 @@
+package com.fs.company.controller.his;
+
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.his.domain.FsProject;
+import com.fs.his.service.IFsProjectService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 理疗配置Controller
+ * 
+ * @author fs
+ * @date 2026-04-19
+ */
+@RestController
+@RequestMapping("/company/project")
+public class FsProjectController extends BaseController
+{
+    @Autowired
+    private IFsProjectService fsProjectService;
+
+
+    @GetMapping("/options")
+    public AjaxResult selectFsProjectListOptions(){
+        List<FsProject> list = fsProjectService.selectFsProjectListOptions();
+        return AjaxResult.success(list);
+    }
+
+}

+ 29 - 13
fs-service/src/main/java/com/fs/his/domain/FsProject.java

@@ -10,7 +10,7 @@ import lombok.EqualsAndHashCode;
  * 理疗配置对象 fs_project
  *
  * @author fs
- * @date 2026-04-19
+ * @date 2026-04-20
  */
 @Data
 @EqualsAndHashCode(callSuper = true)
@@ -31,21 +31,37 @@ public class FsProject extends BaseEntity{
     @Excel(name = "经络图片地址")
     private String meridiansImgUrl;
 
-    /** 晨启·净体排浊 */
-    @Excel(name = "晨启·净体排浊")
-    private String qcField;
+    /** 第一字段 */
+    @Excel(name = "第一字段")
+    private String firstField;
 
-    /** 经络点化 */
-    @Excel(name = "经络点化")
-    private String jldhField;
+    /** 第二字段 */
+    @Excel(name = "第二字段")
+    private String secondField;
 
-    /** 心绪调摄 */
-    @Excel(name = "心绪调摄")
-    private String xxtsField;
+    /** 第三字段 */
+    @Excel(name = "第三字段")
+    private String thirdField;
 
-    /** 动静相济 */
-    @Excel(name = "动静相济")
-    private String djxjField;
+    /** 第四字段 */
+    @Excel(name = "第四字段")
+    private String fourthField;
+
+    /** 第一字段内容 */
+    @Excel(name = "第一字段内容")
+    private String firstContent;
+
+    /** 第二字段内容 */
+    @Excel(name = "第二字段内容")
+    private String secondContent;
+
+    /** 第三字段内容 */
+    @Excel(name = "第三字段内容")
+    private String thirdContent;
+
+    /** 第四字段内容 */
+    @Excel(name = "第四字段内容")
+    private String fourthContent;
 
 
 }

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

@@ -3,6 +3,7 @@ package com.fs.his.mapper;
 import java.util.List;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.fs.his.domain.FsProject;
+import org.apache.ibatis.annotations.Select;
 
 /**
  * 理疗配置Mapper接口
@@ -58,4 +59,11 @@ public interface FsProjectMapper extends BaseMapper<FsProject>{
      * @return 结果
      */
     int deleteFsProjectByIds(Long[] ids);
+
+    /**
+     * 理疗配置选项数据
+     * @return
+     */
+    @Select("SELECT id,CONCAT_WS('-',project_name,day_name) project_name  FROM fs_project ")
+    List<FsProject> selectFsProjectListOptions();
 }

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

@@ -58,4 +58,10 @@ public interface IFsProjectService extends IService<FsProject>{
      * @return 结果
      */
     int deleteFsProjectById(Long id);
+
+    /**
+     * 理疗配置选项数据
+     * @return
+     */
+    List<FsProject> selectFsProjectListOptions();
 }

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

@@ -1,5 +1,6 @@
 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;
@@ -18,6 +19,8 @@ import com.fs.his.service.IFsProjectService;
 @Service
 public class FsProjectServiceImpl extends ServiceImpl<FsProjectMapper, FsProject> implements IFsProjectService {
 
+    @Autowired
+    private FsProjectMapper fsProjectMapper;
     /**
      * 查询理疗配置
      * 
@@ -91,4 +94,9 @@ public class FsProjectServiceImpl extends ServiceImpl<FsProjectMapper, FsProject
     {
         return baseMapper.deleteFsProjectById(id);
     }
+
+    @Override
+    public List<FsProject> selectFsProjectListOptions() {
+        return fsProjectMapper.selectFsProjectListOptions();
+    }
 }

+ 41 - 20
fs-service/src/main/resources/mapper/his/FsProjectMapper.xml

@@ -11,14 +11,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <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"    />
+        <result property="firstField"    column="first_field"    />
+        <result property="secondField"    column="second_field"    />
+        <result property="thirdField"    column="third_field"    />
+        <result property="fourthField"    column="fourth_field"    />
+        <result property="firstContent"    column="first_content"    />
+        <result property="secondContent"    column="second_content"    />
+        <result property="thirdContent"    column="third_content"    />
+        <result property="fourthContent"    column="fourth_content"    />
     </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
+        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 from fs_project
     </sql>
 
     <select id="selectFsProjectList" parameterType="FsProject" resultMap="FsProjectResult">
@@ -27,9 +31,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <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>
+            <if test="firstField != null  and firstField != ''"> and first_field = #{firstField}</if>
+            <if test="secondField != null  and secondField != ''"> and second_field = #{secondField}</if>
+            <if test="thirdField != null  and thirdField != ''"> and third_field = #{thirdField}</if>
+            <if test="fourthField != null  and fourthField != ''"> and fourth_field = #{fourthField}</if>
+            <if test="firstContent != null  and firstContent != ''"> and first_content = #{firstContent}</if>
+            <if test="secondContent != null  and secondContent != ''"> and second_content = #{secondContent}</if>
+            <if test="thirdContent != null  and thirdContent != ''"> and third_content = #{thirdContent}</if>
+            <if test="fourthContent != null  and fourthContent != ''"> and fourth_content = #{fourthContent}</if>
         </where>
     </select>
     
@@ -46,10 +55,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <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>
+            <if test="firstField != null">first_field,</if>
+            <if test="secondField != null">second_field,</if>
+            <if test="thirdField != null">third_field,</if>
+            <if test="fourthField != null">fourth_field,</if>
+            <if test="firstContent != null">first_content,</if>
+            <if test="secondContent != null">second_content,</if>
+            <if test="thirdContent != null">third_content,</if>
+            <if test="fourthContent != null">fourth_content,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="projectName != null">#{projectName},</if>
@@ -57,10 +70,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <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>
+            <if test="firstField != null">#{firstField},</if>
+            <if test="secondField != null">#{secondField},</if>
+            <if test="thirdField != null">#{thirdField},</if>
+            <if test="fourthField != null">#{fourthField},</if>
+            <if test="firstContent != null">#{firstContent},</if>
+            <if test="secondContent != null">#{secondContent},</if>
+            <if test="thirdContent != null">#{thirdContent},</if>
+            <if test="fourthContent != null">#{fourthContent},</if>
          </trim>
     </insert>
 
@@ -72,10 +89,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <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>
+            <if test="firstField != null">first_field = #{firstField},</if>
+            <if test="secondField != null">second_field = #{secondField},</if>
+            <if test="thirdField != null">third_field = #{thirdField},</if>
+            <if test="fourthField != null">fourth_field = #{fourthField},</if>
+            <if test="firstContent != null">first_content = #{firstContent},</if>
+            <if test="secondContent != null">second_content = #{secondContent},</if>
+            <if test="thirdContent != null">third_content = #{thirdContent},</if>
+            <if test="fourthContent != null">fourth_content = #{fourthContent},</if>
         </trim>
         where id = #{id}
     </update>