Переглянути джерело

新增医生端sop任务逻辑

cgp 2 тижнів тому
батько
коміт
ba19f97273

+ 3 - 2
fs-doctor-app/src/main/java/com/fs/app/controller/FsPrescribeController.java

@@ -8,6 +8,7 @@ import com.fs.common.core.domain.R;
 import com.fs.common.core.page.TableDataInfo;
 import com.fs.common.core.redis.RedisCache;
 import com.fs.common.enums.BusinessType;
+import com.fs.common.exception.CustomException;
 import com.fs.common.utils.SecurityUtils;
 import com.fs.common.utils.ServletUtils;
 import com.fs.his.domain.*;
@@ -78,8 +79,8 @@ public class FsPrescribeController extends BaseController
     @PutMapping("/handleReject")
     public R handleReject(@RequestBody PrescribeRejectDTO rejectDTO){
         try {
-            rejectDTO.setTerminatedBy(getUserId()); //这里似乎获取不到用户信息
-        } catch (Exception e){
+            rejectDTO.setTerminatedBy(Long.valueOf(getDoctorId())); //这里似乎获取不到用户信息
+        } catch (CustomException e){
             logger.error("获取拒访医生信息失败");
         }
         fsPrescribeService.handleReject(rejectDTO);

+ 127 - 0
fs-doctor-app/src/main/java/com/fs/app/controller/FsSopDoctorTaskController.java

@@ -0,0 +1,127 @@
+package com.fs.app.controller;
+
+import java.util.List;
+
+
+import com.fs.app.utils.JwtUtils;
+import com.fs.common.core.redis.RedisCache;
+import com.fs.common.utils.ServletUtils;
+import com.fs.his.dto.SopDoctorTaskDto;
+import com.fs.his.vo.SopDoctorTaskVo;
+import io.jsonwebtoken.Claims;
+import lombok.extern.slf4j.Slf4j;
+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.FsSopDoctorTask;
+import com.fs.his.service.IFsSopDoctorTaskService;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.common.core.page.TableDataInfo;
+
+/**
+ * 医生处理sop任务Controller
+ * 
+ * @author fs
+ * @date 2025-12-25
+ */
+@Slf4j
+@RestController
+@RequestMapping("/his/doctorTask")
+public class FsSopDoctorTaskController extends BaseController
+{
+    @Autowired
+    private IFsSopDoctorTaskService fsSopDoctorTaskService;
+    @Autowired
+    JwtUtils jwtUtils;
+
+    @Autowired
+    RedisCache redisCache;
+
+    /**
+     * 查询医生处理sop任务列表
+     */
+    @PreAuthorize("@ss.hasPermi('his:doctorTask:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(SopDoctorTaskDto queryDto)
+    {
+        queryDto.setDoctorId(Long.valueOf(getDoctorId()));
+        startPage();
+        List<SopDoctorTaskVo> list = fsSopDoctorTaskService.selectFsSopDoctorTaskVoList(queryDto);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出医生处理sop任务列表
+     */
+    @PreAuthorize("@ss.hasPermi('his:doctorTask:export')")
+    @Log(title = "医生处理sop任务", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(SopDoctorTaskDto queryDto)
+    {
+        List<SopDoctorTaskVo> list = fsSopDoctorTaskService.selectFsSopDoctorTaskVoList(queryDto);
+        ExcelUtil<SopDoctorTaskVo> util = new ExcelUtil<SopDoctorTaskVo>(SopDoctorTaskVo.class);
+        return util.exportExcel(list, "医生处理sop任务数据");
+    }
+
+    /**
+     * 获取医生处理sop任务详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('his:doctorTask:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(fsSopDoctorTaskService.selectFsSopDoctorTaskById(id));
+    }
+
+    /**
+     * 新增医生处理sop任务
+     */
+    @PreAuthorize("@ss.hasPermi('his:doctorTask:add')")
+    @Log(title = "医生处理sop任务", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody FsSopDoctorTask fsSopDoctorTask)
+    {
+        return toAjax(fsSopDoctorTaskService.insertFsSopDoctorTask(fsSopDoctorTask));
+    }
+
+    /**
+     * 修改医生处理sop任务
+     */
+    @PreAuthorize("@ss.hasPermi('his:doctorTask:edit')")
+    @Log(title = "医生处理sop任务", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody FsSopDoctorTask fsSopDoctorTask)
+    {
+        return toAjax(fsSopDoctorTaskService.updateFsSopDoctorTask(fsSopDoctorTask));
+    }
+
+    /**
+     * 删除医生处理sop任务
+     */
+    @PreAuthorize("@ss.hasPermi('his:doctorTask:remove')")
+    @Log(title = "医生处理sop任务", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(fsSopDoctorTaskService.deleteFsSopDoctorTaskByIds(ids));
+    }
+
+    public String getDoctorId()
+    {
+        String headValue =  ServletUtils.getRequest().getHeader("APPToken");
+        Claims claims=jwtUtils.getClaimByToken(headValue);
+        String doctorId = claims.getSubject().toString();
+        return doctorId;
+    }
+}

+ 46 - 0
fs-service/src/main/java/com/fs/his/domain/FsSopDoctorTask.java

@@ -0,0 +1,46 @@
+package com.fs.his.domain;
+
+import com.fs.common.annotation.Excel;
+import lombok.Data;
+import com.fs.common.core.domain.BaseEntity;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 医生处理sop任务对象 fs_sop_doctor_task
+ *
+ * @author fs
+ * @date 2025-12-25
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class FsSopDoctorTask extends BaseEntity{
+
+    /** 主键 */
+    private Long id;
+
+    /** 销售id */
+    @Excel(name = "销售id")
+    private Long companyUserId;
+
+    /** 用户id */
+    @Excel(name = "用户id")
+    private Long userId;
+
+    /** 0:待处理,1:已处理 */
+    @Excel(name = "0:待处理,1:已处理")
+    private Long status;
+
+    /** 套餐包Id */
+    @Excel(name = "套餐包Id")
+    private Long packageId;
+
+    /** 订单号 */
+    @Excel(name = "订单号")
+    private String orderCode;
+
+    /** 备用id */
+    @Excel(name = "备用id")
+    private Long standbyId;
+
+
+}

+ 38 - 0
fs-service/src/main/java/com/fs/his/dto/SopDoctorTaskDto.java

@@ -0,0 +1,38 @@
+package com.fs.his.dto;
+
+import com.fs.common.core.domain.BaseEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class SopDoctorTaskDto  extends BaseEntity {
+    /** 主键*/
+    private Long id;
+
+    /** 销售名称 */
+    private String companyUserName;
+
+    private Long doctorId;
+
+    /** 用户姓名 */
+    private String name;
+
+    /** 客户id */
+    private Long userId;
+
+    /** 销售id */
+    private Long companyUserId;
+
+    /** 企微用户id */
+    private Long qwUserId;
+
+    /** 套餐包Id */
+    private Long packageId;
+
+    /** 订单号 */
+    private String orderCode;
+
+    /** 0:待处理,1:已处理 */
+    private Long status;
+}

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

@@ -0,0 +1,63 @@
+package com.fs.his.mapper;
+
+import java.util.List;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.fs.his.domain.FsSopDoctorTask;
+import com.fs.his.dto.SopDoctorTaskDto;
+import com.fs.his.vo.SopDoctorTaskVo;
+
+/**
+ * 医生处理sop任务Mapper接口
+ * 
+ * @author fs
+ * @date 2025-12-25
+ */
+public interface FsSopDoctorTaskMapper extends BaseMapper<FsSopDoctorTask>{
+    /**
+     * 查询医生处理sop任务
+     * 
+     * @param id 医生处理sop任务主键
+     * @return 医生处理sop任务
+     */
+    SopDoctorTaskVo selectFsSopDoctorTaskById(Long id);
+
+    /**
+     * 查询医生处理sop任务列表
+     * 
+     * @param queryDto 医生处理sop任务
+     * @return 医生处理sop任务集合
+     */
+    List<SopDoctorTaskVo> selectFsSopDoctorTaskVoList(SopDoctorTaskDto queryDto);
+
+    /**
+     * 新增医生处理sop任务
+     * 
+     * @param fsSopDoctorTask 医生处理sop任务
+     * @return 结果
+     */
+    int insertFsSopDoctorTask(FsSopDoctorTask fsSopDoctorTask);
+
+    /**
+     * 修改医生处理sop任务
+     * 
+     * @param fsSopDoctorTask 医生处理sop任务
+     * @return 结果
+     */
+    int updateFsSopDoctorTask(FsSopDoctorTask fsSopDoctorTask);
+
+    /**
+     * 删除医生处理sop任务
+     * 
+     * @param id 医生处理sop任务主键
+     * @return 结果
+     */
+    int deleteFsSopDoctorTaskById(Long id);
+
+    /**
+     * 批量删除医生处理sop任务
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    int deleteFsSopDoctorTaskByIds(Long[] ids);
+}

+ 63 - 0
fs-service/src/main/java/com/fs/his/service/IFsSopDoctorTaskService.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.FsSopDoctorTask;
+import com.fs.his.dto.SopDoctorTaskDto;
+import com.fs.his.vo.SopDoctorTaskVo;
+
+/**
+ * 医生处理sop任务Service接口
+ * 
+ * @author fs
+ * @date 2025-12-25
+ */
+public interface IFsSopDoctorTaskService extends IService<FsSopDoctorTask>{
+    /**
+     * 查询医生处理sop任务
+     * 
+     * @param id 医生处理sop任务主键
+     * @return 医生处理sop任务
+     */
+    SopDoctorTaskVo selectFsSopDoctorTaskById(Long id);
+
+    /**
+     * 查询医生处理sop任务列表
+     * 
+     * @param queryDto 医生处理sop任务
+     * @return 医生处理sop任务集合
+     */
+    List<SopDoctorTaskVo> selectFsSopDoctorTaskVoList(SopDoctorTaskDto queryDto);
+
+    /**
+     * 新增医生处理sop任务
+     * 
+     * @param fsSopDoctorTask 医生处理sop任务
+     * @return 结果
+     */
+    int insertFsSopDoctorTask(FsSopDoctorTask fsSopDoctorTask);
+
+    /**
+     * 修改医生处理sop任务
+     * 
+     * @param fsSopDoctorTask 医生处理sop任务
+     * @return 结果
+     */
+    int updateFsSopDoctorTask(FsSopDoctorTask fsSopDoctorTask);
+
+    /**
+     * 批量删除医生处理sop任务
+     * 
+     * @param ids 需要删除的医生处理sop任务主键集合
+     * @return 结果
+     */
+    int deleteFsSopDoctorTaskByIds(Long[] ids);
+
+    /**
+     * 删除医生处理sop任务信息
+     * 
+     * @param id 医生处理sop任务主键
+     * @return 结果
+     */
+    int deleteFsSopDoctorTaskById(Long id);
+}

+ 102 - 0
fs-service/src/main/java/com/fs/his/service/impl/FsSopDoctorTaskServiceImpl.java

@@ -0,0 +1,102 @@
+package com.fs.his.service.impl;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.List;
+import com.fs.common.utils.DateUtils;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.fs.his.dto.SopDoctorTaskDto;
+import com.fs.his.service.IFsSopDoctorTaskService;
+import com.fs.his.vo.SopDoctorTaskVo;
+import org.springframework.stereotype.Service;
+import com.fs.his.mapper.FsSopDoctorTaskMapper;
+import com.fs.his.domain.FsSopDoctorTask;
+
+/**
+ * 医生处理sop任务Service业务层处理
+ * 
+ * @author fs
+ * @date 2025-12-25
+ */
+@Service
+public class FsSopDoctorTaskServiceImpl extends ServiceImpl<FsSopDoctorTaskMapper, FsSopDoctorTask> implements IFsSopDoctorTaskService {
+
+    /**
+     * 查询医生处理sop任务
+     * 
+     * @param id 医生处理sop任务主键
+     * @return 医生处理sop任务
+     */
+    @Override
+    public SopDoctorTaskVo selectFsSopDoctorTaskById(Long id)
+    {
+        return baseMapper.selectFsSopDoctorTaskById(id);
+    }
+
+    /**
+     * 查询医生处理sop任务列表
+     * 
+     * @param queryDto 医生处理sop任务
+     * @return 医生处理sop任务
+     */
+    @Override
+    public List<SopDoctorTaskVo> selectFsSopDoctorTaskVoList(SopDoctorTaskDto queryDto)
+    {
+        // 强制限定创建时间为今天
+        String todayStart = new SimpleDateFormat("yyyy-MM-dd 00:00:00").format(new Date());
+        String todayEnd = new SimpleDateFormat("yyyy-MM-dd 23:59:59").format(new Date());
+        queryDto.setBeginTime(todayStart);
+        queryDto.setEndTime(todayEnd);
+        return baseMapper.selectFsSopDoctorTaskVoList(queryDto);
+    }
+
+    /**
+     * 新增医生处理sop任务
+     * 
+     * @param fsSopDoctorTask 医生处理sop任务
+     * @return 结果
+     */
+    @Override
+    public int insertFsSopDoctorTask(FsSopDoctorTask fsSopDoctorTask)
+    {
+        fsSopDoctorTask.setCreateTime(DateUtils.getNowDate());
+        return baseMapper.insertFsSopDoctorTask(fsSopDoctorTask);
+    }
+
+    /**
+     * 修改医生处理sop任务
+     * 
+     * @param fsSopDoctorTask 医生处理sop任务
+     * @return 结果
+     */
+    @Override
+    public int updateFsSopDoctorTask(FsSopDoctorTask fsSopDoctorTask)
+    {
+        fsSopDoctorTask.setUpdateTime(DateUtils.getNowDate());
+        return baseMapper.updateFsSopDoctorTask(fsSopDoctorTask);
+    }
+
+    /**
+     * 批量删除医生处理sop任务
+     * 
+     * @param ids 需要删除的医生处理sop任务主键
+     * @return 结果
+     */
+    @Override
+    public int deleteFsSopDoctorTaskByIds(Long[] ids)
+    {
+        return baseMapper.deleteFsSopDoctorTaskByIds(ids);
+    }
+
+    /**
+     * 删除医生处理sop任务信息
+     * 
+     * @param id 医生处理sop任务主键
+     * @return 结果
+     */
+    @Override
+    public int deleteFsSopDoctorTaskById(Long id)
+    {
+        return baseMapper.deleteFsSopDoctorTaskById(id);
+    }
+}

+ 57 - 0
fs-service/src/main/java/com/fs/his/vo/SopDoctorTaskVo.java

@@ -0,0 +1,57 @@
+package com.fs.his.vo;
+
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fs.common.annotation.Excel;
+import lombok.Data;
+
+import java.util.Date;
+
+@Data
+public class SopDoctorTaskVo {
+    /** 任务主键*/
+    private Long id;
+
+    /** 医生id */
+    private Long doctorId;
+
+    @Excel(name = "销售姓名")
+    private String companyUserName;
+
+    /** 销售Id */
+    private Long companyUserId;
+
+    /** 套餐包Id */
+    private Long packageId;
+
+    /** 订单号 */
+    private String orderCode;
+
+    /** 用户id */
+    private Long userId;
+
+    @Excel(name = "客户姓名")
+    private String name;
+
+
+    private String avatar;
+
+    @Excel(name = "客户电话")
+    private String phone;
+
+    /** 0:待处理,1:已处理 */
+    private Long status;
+
+    @Excel(name = "备注信息")
+    private String remark;
+
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @TableField(fill = FieldFill.INSERT)
+    private Date createTime;
+
+    /** 更新时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @TableField(fill = FieldFill.INSERT_UPDATE)
+    private Date updateTime;
+}

+ 1 - 1
fs-service/src/main/java/com/fs/qw/dto/SopCompanyUserTaskDto.java

@@ -11,7 +11,7 @@ public class SopCompanyUserTaskDto extends BaseEntity {
     /** 主键*/
     private Long id;
 
-    /** 医生id */
+    /** 医生姓名 */
     private String doctorName;
 
 

+ 157 - 0
fs-service/src/main/resources/mapper/his/FsSopDoctorTaskMapper.xml

@@ -0,0 +1,157 @@
+<?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.FsSopDoctorTaskMapper">
+    
+    <resultMap type="FsSopDoctorTask" id="FsSopDoctorTaskResult">
+        <result property="id"    column="id"    />
+        <result property="companyUserId"    column="company_user_id"    />
+        <result property="userId"    column="user_id"    />
+        <result property="status"    column="status"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="remark"    column="remark"    />
+        <result property="packageId"    column="package_id"    />
+        <result property="orderCode"    column="order_code"    />
+        <result property="standbyId"    column="standby_id"    />
+    </resultMap>
+
+    <resultMap type="com.fs.his.vo.SopDoctorTaskVo" id="SopDoctorTaskVoResult">
+        <!-- 主键可 -->
+        <result property="id"    column="id"    />
+        <!-- fs_sop_doctor_task 表字段 -->
+        <result property="packageId"    column="package_id"    />
+        <result property="orderCode"    column="order_code"    />
+        <result property="companyUserId"    column="company_user_id"    />
+        <result property="doctorId"     column="doctor_id" />
+        <result property="userId"       column="user_id" />
+        <result property="status"       column="status" />
+        <result property="remark"       column="remark" />
+        <result property="createTime"   column="create_time" />
+        <result property="updateTime"   column="update_time" />
+
+        <!-- 关联表字段 -->
+        <result property="name"     column="name" />          <!-- qwec.name -->
+        <result property="companyUserName"   column="company_user_name" />   <!-- cp.nick_name -->
+        <result property="avatar" column="avatar" />
+        <result property="phone"  column="phone" />
+    </resultMap>
+
+    <sql id="selectFsSopDoctorTaskVo">
+        select id, company_user_id, user_id, status, create_time, update_time, remark, package_id, order_code, standby_id from fs_sop_doctor_task
+    </sql>
+
+    <select id="selectFsSopDoctorTaskVoList" parameterType="com.fs.his.vo.SopDoctorTaskVo" resultMap="SopDoctorTaskVoResult">
+        SELECT
+        sdt.id,
+        sdt.user_id,
+        qwec.name,
+        qwec.avatar,
+        fu.phone,
+        cp.nick_name as company_user_name,
+        cp.user_id as company_user_id,
+        sdt.status,
+        sdt.create_time,
+        sdt.update_time,
+        sdt.remark
+        FROM
+        fs_sop_doctor_task sdt
+        LEFT JOIN company_user cp ON sdt.company_user_id = cp.user_id
+        LEFT JOIN qw_external_contact qwec ON sdt.user_id = qwec.id
+        LEFT JOIN fs_user fu ON qwec.fs_user_id = fu.user_id
+        <where>
+            <if test="id != null "> and sct.id = #{id}</if>
+            <if test="doctorId != null "> and sdt.doctor_id = #{doctorId}</if>
+            <if test="userId != null "> and sdt.user_id = #{userId}</if>
+            <if test="packageId != null "> and sdt.package_id = #{packageId}</if>
+            <if test="orderCode != null "> and sdt.order_code = #{orderCode}</if>
+            <if test="companyUserId != null "> and sct.company_user_id = #{companyUserId}</if>
+            <if test="status != null "> and sdt.status = #{status}</if>
+            <if test="qwUserId != null "> and qwec.qw_user_id = #{qwUserId}</if>
+            <if test="name != null "> and qwec.name like concat('%', #{name}, '%')</if>
+            <if test="companyUserName != null "> and cp.nick_name like concat('%', #{companyUserName}, '%')</if>
+            <if test="beginTime != null and beginTime != ''">
+                and sdt.create_time &gt;= str_to_date(#{beginTime}, '%Y-%m-%d %H:%i:%s')
+            </if>
+            <if test="endTime != null and endTime != ''">
+                and sdt.create_time &lt;= str_to_date(#{endTime}, '%Y-%m-%d %H:%i:%s')
+            </if>
+        </where>
+        ORDER BY sdt.id DESC
+    </select>
+    
+    <select id="selectFsSopDoctorTaskById" parameterType="Long" resultMap="SopDoctorTaskVoResult">
+        SELECT
+            sdt.id,
+            sdt.user_id,
+            qwec.name,
+            qwec.avatar,
+            fu.phone,
+            cp.nick_name as company_user_name,
+            cp.user_id as company_user_id,
+            sdt.status,
+            sdt.create_time,
+            sdt.update_time,
+            sdt.remark
+        FROM
+            fs_sop_doctor_task sdt
+                LEFT JOIN company_user cp ON sdt.company_user_id = cp.user_id
+                LEFT JOIN qw_external_contact qwec ON sdt.user_id = qwec.id
+                LEFT JOIN fs_user fu ON qwec.fs_user_id = fu.user_id
+        where sdt.id = #{id}
+    </select>
+        
+    <insert id="insertFsSopDoctorTask" parameterType="FsSopDoctorTask" useGeneratedKeys="true" keyProperty="id">
+        insert into fs_sop_doctor_task
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="companyUserId != null">company_user_id,</if>
+            <if test="userId != null">user_id,</if>
+            <if test="status != null">status,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="remark != null">remark,</if>
+            <if test="packageId != null">package_id,</if>
+            <if test="orderCode != null">order_code,</if>
+            <if test="standbyId != null">standby_id,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="companyUserId != null">#{companyUserId},</if>
+            <if test="userId != null">#{userId},</if>
+            <if test="status != null">#{status},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="remark != null">#{remark},</if>
+            <if test="packageId != null">#{packageId},</if>
+            <if test="orderCode != null">#{orderCode},</if>
+            <if test="standbyId != null">#{standbyId},</if>
+         </trim>
+    </insert>
+
+    <update id="updateFsSopDoctorTask" parameterType="FsSopDoctorTask">
+        update fs_sop_doctor_task
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="companyUserId != null">company_user_id = #{companyUserId},</if>
+            <if test="userId != null">user_id = #{userId},</if>
+            <if test="status != null">status = #{status},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="remark != null">remark = #{remark},</if>
+            <if test="packageId != null">package_id = #{packageId},</if>
+            <if test="orderCode != null">order_code = #{orderCode},</if>
+            <if test="standbyId != null">standby_id = #{standbyId},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteFsSopDoctorTaskById" parameterType="Long">
+        delete from fs_sop_doctor_task where id = #{id}
+    </delete>
+
+    <delete id="deleteFsSopDoctorTaskByIds" parameterType="String">
+        delete from fs_sop_doctor_task where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>