Kaynağa Gözat

新增SOP用户表,作业票用户表初始化

车车 11 ay önce
ebeveyn
işleme
51dfa1ebe8

+ 55 - 0
ktg-iscs/src/main/java/com/ktg/iscs/domain/IsJobTicketLock.java

@@ -0,0 +1,55 @@
+package com.ktg.iscs.domain;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModelProperty;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.ktg.common.annotation.Excel;
+import com.ktg.common.core.domain.model.BaseBean;
+
+/**
+ * 作业票关联锁对象 is_job_ticket_lock
+ *
+ * @author cgj
+ * @date 2024-11-18
+ */
+@EqualsAndHashCode(callSuper = true)
+@Data
+public class IsJobTicketLock extends BaseBean
+{
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty(value = "记录ID")
+    @TableId(type = IdType.AUTO)
+    private Long recordId;
+
+    @ApiModelProperty(value = "作业票ID")
+    @Excel(name = "作业票ID")
+    private Long ticketId;
+
+    @ApiModelProperty(value = "锁具ID")
+    @Excel(name = "锁具ID")
+    private Long lockId;
+
+    @ApiModelProperty(value = "取出硬件ID")
+    @Excel(name = "取出硬件ID")
+    private Long fromHardwareId;
+
+    @ApiModelProperty(value = "归还硬件ID")
+    @Excel(name = "归还硬件ID")
+    private Long toHardwareId;
+
+    @ApiModelProperty(value = "隔离点ID")
+    @Excel(name = "隔离点ID")
+    private Long isolationPointId;
+
+    @ApiModelProperty(value = "锁具状态(0-待取出 1-未上锁 2-已上锁 3-已解锁 4-已归还)")
+    @Excel(name = "锁具状态(0-待取出 1-未上锁 2-已上锁 3-已解锁 4-已归还)")
+    private String lockStatus;
+
+    @ApiModelProperty(value = "删除标志(0代表存在 2代表删除)")
+    private String delFlag;
+
+
+}

+ 51 - 0
ktg-iscs/src/main/java/com/ktg/iscs/domain/IsSopUser.java

@@ -0,0 +1,51 @@
+package com.ktg.iscs.domain;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModelProperty;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.ktg.common.annotation.Excel;
+import com.ktg.common.core.domain.model.BaseBean;
+
+/**
+ * SOP用户对象 is_sop_user
+ *
+ * @author cgj
+ * @date 2024-11-18
+ */
+@EqualsAndHashCode(callSuper = true)
+@Data
+public class IsSopUser extends BaseBean
+{
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty(value = "记录ID")
+    @TableId(type = IdType.AUTO)
+    private Long recordId;
+
+    @ApiModelProperty(value = "sopID")
+    @Excel(name = "sopID")
+    private Long sopId;
+
+    @ApiModelProperty(value = "用户ID")
+    @Excel(name = "用户ID")
+    private Long userId;
+
+    @ApiModelProperty(value = "用户名称")
+    @Excel(name = "用户名称")
+    private String userName;
+
+    @ApiModelProperty(value = "用户类型(0内部 1外部)")
+    @Excel(name = "用户类型(0内部 1外部)")
+    private String userType;
+
+    @ApiModelProperty(value = "作业票角色(sys_role表中role_key)")
+    @Excel(name = "作业票角色(sys_role表中role_key)")
+    private String userRole;
+
+    @ApiModelProperty(value = "删除标志(0代表存在 2代表删除)")
+    private String delFlag;
+
+
+}

+ 64 - 0
ktg-iscs/src/main/java/com/ktg/iscs/mapper/IsJobTicketLockMapper.java

@@ -0,0 +1,64 @@
+package com.ktg.iscs.mapper;
+
+import java.util.List;
+import org.apache.ibatis.annotations.Mapper;
+import com.ktg.common.mapper.BaseMapperX;
+import com.ktg.iscs.domain.IsJobTicketLock;
+
+/**
+ * 作业票关联锁Mapper接口
+ *
+ * @author cgj
+ * @date 2024-11-18
+ */
+@Mapper
+public interface IsJobTicketLockMapper extends BaseMapperX<IsJobTicketLock>
+{
+    /**
+     * 查询作业票关联锁
+     *
+     * @param recordId 作业票关联锁主键
+     * @return 作业票关联锁
+     */
+    IsJobTicketLock selectIsJobTicketLockByRecordId(Long recordId);
+
+    /**
+     * 查询作业票关联锁列表
+     *
+     * @param isJobTicketLock 作业票关联锁
+     * @return 作业票关联锁集合
+     */
+    List<IsJobTicketLock> selectIsJobTicketLockList(IsJobTicketLock isJobTicketLock);
+
+    /**
+     * 新增作业票关联锁
+     *
+     * @param isJobTicketLock 作业票关联锁
+     * @return 结果
+     */
+    int insertIsJobTicketLock(IsJobTicketLock isJobTicketLock);
+
+    /**
+     * 修改作业票关联锁
+     *
+     * @param isJobTicketLock 作业票关联锁
+     * @return 结果
+     */
+    int updateIsJobTicketLock(IsJobTicketLock isJobTicketLock);
+
+    /**
+     * 删除作业票关联锁
+     *
+     * @param recordId 作业票关联锁主键
+     * @return 结果
+     */
+    int deleteIsJobTicketLockByRecordId(Long recordId);
+
+    /**
+     * 批量删除作业票关联锁
+     *
+     * @param recordIds 需要删除的数据主键集合
+     * @return 结果
+     */
+    int deleteIsJobTicketLockByRecordIds(Long[] recordIds);
+}

+ 64 - 0
ktg-iscs/src/main/java/com/ktg/iscs/mapper/IsSopUserMapper.java

@@ -0,0 +1,64 @@
+package com.ktg.iscs.mapper;
+
+import java.util.List;
+import org.apache.ibatis.annotations.Mapper;
+import com.ktg.common.mapper.BaseMapperX;
+import com.ktg.iscs.domain.IsSopUser;
+
+/**
+ * SOP用户Mapper接口
+ *
+ * @author cgj
+ * @date 2024-11-18
+ */
+@Mapper
+public interface IsSopUserMapper extends BaseMapperX<IsSopUser>
+{
+    /**
+     * 查询SOP用户
+     *
+     * @param recordId SOP用户主键
+     * @return SOP用户
+     */
+    IsSopUser selectIsSopUserByRecordId(Long recordId);
+
+    /**
+     * 查询SOP用户列表
+     *
+     * @param isSopUser SOP用户
+     * @return SOP用户集合
+     */
+    List<IsSopUser> selectIsSopUserList(IsSopUser isSopUser);
+
+    /**
+     * 新增SOP用户
+     *
+     * @param isSopUser SOP用户
+     * @return 结果
+     */
+    int insertIsSopUser(IsSopUser isSopUser);
+
+    /**
+     * 修改SOP用户
+     *
+     * @param isSopUser SOP用户
+     * @return 结果
+     */
+    int updateIsSopUser(IsSopUser isSopUser);
+
+    /**
+     * 删除SOP用户
+     *
+     * @param recordId SOP用户主键
+     * @return 结果
+     */
+    int deleteIsSopUserByRecordId(Long recordId);
+
+    /**
+     * 批量删除SOP用户
+     *
+     * @param recordIds 需要删除的数据主键集合
+     * @return 结果
+     */
+    int deleteIsSopUserByRecordIds(Long[] recordIds);
+}

+ 62 - 0
ktg-iscs/src/main/java/com/ktg/iscs/service/IIsJobTicketLockService.java

@@ -0,0 +1,62 @@
+package com.ktg.iscs.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import java.util.List;
+import com.ktg.iscs.domain.IsJobTicketLock;
+
+/**
+ * 作业票关联锁Service接口
+ *
+ * @author cgj
+ * @date 2024-11-18
+ */
+public interface IIsJobTicketLockService extends IService<IsJobTicketLock>
+{
+    /**
+     * 查询作业票关联锁
+     *
+     * @param recordId 作业票关联锁主键
+     * @return 作业票关联锁
+     */
+    IsJobTicketLock selectIsJobTicketLockByRecordId(Long recordId);
+
+    /**
+     * 查询作业票关联锁列表
+     *
+     * @param isJobTicketLock 作业票关联锁
+     * @return 作业票关联锁集合
+     */
+    List<IsJobTicketLock> selectIsJobTicketLockList(IsJobTicketLock isJobTicketLock);
+
+    /**
+     * 新增作业票关联锁
+     *
+     * @param isJobTicketLock 作业票关联锁
+     * @return 结果
+     */
+    int insertIsJobTicketLock(IsJobTicketLock isJobTicketLock);
+
+    /**
+     * 修改作业票关联锁
+     *
+     * @param isJobTicketLock 作业票关联锁
+     * @return 结果
+     */
+    int updateIsJobTicketLock(IsJobTicketLock isJobTicketLock);
+
+    /**
+     * 批量删除作业票关联锁
+     *
+     * @param recordIds 需要删除的作业票关联锁主键集合
+     * @return 结果
+     */
+    int deleteIsJobTicketLockByRecordIds(String recordIds);
+
+    /**
+     * 删除作业票关联锁信息
+     *
+     * @param recordId 作业票关联锁主键
+     * @return 结果
+     */
+    int deleteIsJobTicketLockByRecordId(Long recordId);
+}

+ 62 - 0
ktg-iscs/src/main/java/com/ktg/iscs/service/IIsSopUserService.java

@@ -0,0 +1,62 @@
+package com.ktg.iscs.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import java.util.List;
+import com.ktg.iscs.domain.IsSopUser;
+
+/**
+ * SOP用户Service接口
+ *
+ * @author cgj
+ * @date 2024-11-18
+ */
+public interface IIsSopUserService extends IService<IsSopUser>
+{
+    /**
+     * 查询SOP用户
+     *
+     * @param recordId SOP用户主键
+     * @return SOP用户
+     */
+    IsSopUser selectIsSopUserByRecordId(Long recordId);
+
+    /**
+     * 查询SOP用户列表
+     *
+     * @param isSopUser SOP用户
+     * @return SOP用户集合
+     */
+    List<IsSopUser> selectIsSopUserList(IsSopUser isSopUser);
+
+    /**
+     * 新增SOP用户
+     *
+     * @param isSopUser SOP用户
+     * @return 结果
+     */
+    int insertIsSopUser(IsSopUser isSopUser);
+
+    /**
+     * 修改SOP用户
+     *
+     * @param isSopUser SOP用户
+     * @return 结果
+     */
+    int updateIsSopUser(IsSopUser isSopUser);
+
+    /**
+     * 批量删除SOP用户
+     *
+     * @param recordIds 需要删除的SOP用户主键集合
+     * @return 结果
+     */
+    int deleteIsSopUserByRecordIds(String recordIds);
+
+    /**
+     * 删除SOP用户信息
+     *
+     * @param recordId SOP用户主键
+     * @return 结果
+     */
+    int deleteIsSopUserByRecordId(Long recordId);
+}

+ 101 - 0
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsJobTicketLockServiceImpl.java

@@ -0,0 +1,101 @@
+package com.ktg.iscs.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import java.util.List;
+import cn.hutool.core.lang.Assert;
+import com.ktg.common.core.text.Convert;
+import com.ktg.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ktg.iscs.mapper.IsJobTicketLockMapper;
+import com.ktg.iscs.domain.IsJobTicketLock;
+import com.ktg.iscs.service.IIsJobTicketLockService;
+
+/**
+ * 作业票关联锁Service业务层处理
+ *
+ * @author cgj
+ * @date 2024-11-18
+ */
+@Service
+public class IsJobTicketLockServiceImpl extends ServiceImpl<IsJobTicketLockMapper, IsJobTicketLock> implements IIsJobTicketLockService
+{
+    @Autowired
+    private IsJobTicketLockMapper isJobTicketLockMapper;
+
+    /**
+     * 查询作业票关联锁
+     *
+     * @param recordId 作业票关联锁主键
+     * @return 作业票关联锁
+     */
+    @Override
+    public IsJobTicketLock selectIsJobTicketLockByRecordId(Long recordId)
+    {
+        return isJobTicketLockMapper.selectIsJobTicketLockByRecordId(recordId);
+    }
+
+    /**
+     * 查询作业票关联锁列表
+     *
+     * @param isJobTicketLock 作业票关联锁
+     * @return 作业票关联锁
+     */
+    @Override
+    public List<IsJobTicketLock> selectIsJobTicketLockList(IsJobTicketLock isJobTicketLock)
+    {
+        return isJobTicketLockMapper.selectIsJobTicketLockList(isJobTicketLock);
+    }
+
+    /**
+     * 新增作业票关联锁
+     *
+     * @param isJobTicketLock 作业票关联锁
+     * @return 结果
+     */
+    @Override
+    public int insertIsJobTicketLock(IsJobTicketLock isJobTicketLock)
+    {
+        isJobTicketLock.setCreateTime(DateUtils.getNowDate());
+        return isJobTicketLockMapper.insertIsJobTicketLock(isJobTicketLock);
+    }
+
+    /**
+     * 修改作业票关联锁
+     *
+     * @param isJobTicketLock 作业票关联锁
+     * @return 结果
+     */
+    @Override
+    public int updateIsJobTicketLock(IsJobTicketLock isJobTicketLock)
+    {
+        isJobTicketLock.setUpdateTime(DateUtils.getNowDate());
+        return isJobTicketLockMapper.updateIsJobTicketLock(isJobTicketLock);
+    }
+
+    /**
+     * 批量删除作业票关联锁
+     *
+     * @param recordIds 需要删除的作业票关联锁主键
+     * @return 结果
+     */
+    @Override
+    public int deleteIsJobTicketLockByRecordIds(String recordIds)
+    {
+        Assert.notBlank(recordIds, "请选择需要删除的数据!");
+        Long[] longIds = Convert.toLongArray(recordIds);
+        return isJobTicketLockMapper.deleteIsJobTicketLockByRecordIds(longIds);
+    }
+
+    /**
+     * 删除作业票关联锁信息
+     *
+     * @param recordId 作业票关联锁主键
+     * @return 结果
+     */
+    @Override
+    public int deleteIsJobTicketLockByRecordId(Long recordId)
+    {
+        return isJobTicketLockMapper.deleteIsJobTicketLockByRecordId(recordId);
+    }
+}

+ 101 - 0
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsSopUserServiceImpl.java

@@ -0,0 +1,101 @@
+package com.ktg.iscs.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import java.util.List;
+import cn.hutool.core.lang.Assert;
+import com.ktg.common.core.text.Convert;
+import com.ktg.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ktg.iscs.mapper.IsSopUserMapper;
+import com.ktg.iscs.domain.IsSopUser;
+import com.ktg.iscs.service.IIsSopUserService;
+
+/**
+ * SOP用户Service业务层处理
+ *
+ * @author cgj
+ * @date 2024-11-18
+ */
+@Service
+public class IsSopUserServiceImpl extends ServiceImpl<IsSopUserMapper, IsSopUser> implements IIsSopUserService
+{
+    @Autowired
+    private IsSopUserMapper isSopUserMapper;
+
+    /**
+     * 查询SOP用户
+     *
+     * @param recordId SOP用户主键
+     * @return SOP用户
+     */
+    @Override
+    public IsSopUser selectIsSopUserByRecordId(Long recordId)
+    {
+        return isSopUserMapper.selectIsSopUserByRecordId(recordId);
+    }
+
+    /**
+     * 查询SOP用户列表
+     *
+     * @param isSopUser SOP用户
+     * @return SOP用户
+     */
+    @Override
+    public List<IsSopUser> selectIsSopUserList(IsSopUser isSopUser)
+    {
+        return isSopUserMapper.selectIsSopUserList(isSopUser);
+    }
+
+    /**
+     * 新增SOP用户
+     *
+     * @param isSopUser SOP用户
+     * @return 结果
+     */
+    @Override
+    public int insertIsSopUser(IsSopUser isSopUser)
+    {
+        isSopUser.setCreateTime(DateUtils.getNowDate());
+        return isSopUserMapper.insertIsSopUser(isSopUser);
+    }
+
+    /**
+     * 修改SOP用户
+     *
+     * @param isSopUser SOP用户
+     * @return 结果
+     */
+    @Override
+    public int updateIsSopUser(IsSopUser isSopUser)
+    {
+        isSopUser.setUpdateTime(DateUtils.getNowDate());
+        return isSopUserMapper.updateIsSopUser(isSopUser);
+    }
+
+    /**
+     * 批量删除SOP用户
+     *
+     * @param recordIds 需要删除的SOP用户主键
+     * @return 结果
+     */
+    @Override
+    public int deleteIsSopUserByRecordIds(String recordIds)
+    {
+        Assert.notBlank(recordIds, "请选择需要删除的数据!");
+        Long[] longIds = Convert.toLongArray(recordIds);
+        return isSopUserMapper.deleteIsSopUserByRecordIds(longIds);
+    }
+
+    /**
+     * 删除SOP用户信息
+     *
+     * @param recordId SOP用户主键
+     * @return 结果
+     */
+    @Override
+    public int deleteIsSopUserByRecordId(Long recordId)
+    {
+        return isSopUserMapper.deleteIsSopUserByRecordId(recordId);
+    }
+}

+ 105 - 0
ktg-iscs/src/main/resources/mapper/IsJobTicketLockMapper.xml

@@ -0,0 +1,105 @@
+<?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.ktg.iscs.mapper.IsJobTicketLockMapper">
+    
+    <resultMap type="IsJobTicketLock" id="IsJobTicketLockResult">
+        <result property="recordId"    column="record_id"    />
+        <result property="ticketId"    column="ticket_id"    />
+        <result property="lockId"    column="lock_id"    />
+        <result property="fromHardwareId"    column="from_hardware_id"    />
+        <result property="toHardwareId"    column="to_hardware_id"    />
+        <result property="isolationPointId"    column="isolation_point_id"    />
+        <result property="lockStatus"    column="lock_status"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="remark"    column="remark"    />
+    </resultMap>
+
+    <sql id="selectIsJobTicketLockVo">
+        select record_id, ticket_id, lock_id, from_hardware_id, to_hardware_id, isolation_point_id, lock_status, del_flag, create_by, create_time, update_time, update_by, remark from is_job_ticket_lock
+    </sql>
+
+    <select id="selectIsJobTicketLockList" parameterType="IsJobTicketLock" resultMap="IsJobTicketLockResult">
+        <include refid="selectIsJobTicketLockVo"/>
+        <where>  
+            <if test="ticketId != null "> and ticket_id = #{ticketId}</if>
+            <if test="lockId != null "> and lock_id = #{lockId}</if>
+            <if test="fromHardwareId != null "> and from_hardware_id = #{fromHardwareId}</if>
+            <if test="toHardwareId != null "> and to_hardware_id = #{toHardwareId}</if>
+            <if test="isolationPointId != null "> and isolation_point_id = #{isolationPointId}</if>
+            <if test="lockStatus != null  and lockStatus != ''"> and lock_status = #{lockStatus}</if>
+        </where>
+    </select>
+    
+    <select id="selectIsJobTicketLockByRecordId" parameterType="Long" resultMap="IsJobTicketLockResult">
+        <include refid="selectIsJobTicketLockVo"/>
+        where record_id = #{recordId}
+    </select>
+        
+    <insert id="insertIsJobTicketLock" parameterType="IsJobTicketLock" useGeneratedKeys="true" keyProperty="recordId">
+        insert into is_job_ticket_lock
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="ticketId != null">ticket_id,</if>
+            <if test="lockId != null">lock_id,</if>
+            <if test="fromHardwareId != null">from_hardware_id,</if>
+            <if test="toHardwareId != null">to_hardware_id,</if>
+            <if test="isolationPointId != null">isolation_point_id,</if>
+            <if test="lockStatus != null">lock_status,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="remark != null">remark,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="ticketId != null">#{ticketId},</if>
+            <if test="lockId != null">#{lockId},</if>
+            <if test="fromHardwareId != null">#{fromHardwareId},</if>
+            <if test="toHardwareId != null">#{toHardwareId},</if>
+            <if test="isolationPointId != null">#{isolationPointId},</if>
+            <if test="lockStatus != null">#{lockStatus},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="remark != null">#{remark},</if>
+         </trim>
+    </insert>
+
+    <update id="updateIsJobTicketLock" parameterType="IsJobTicketLock">
+        update is_job_ticket_lock
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="ticketId != null">ticket_id = #{ticketId},</if>
+            <if test="lockId != null">lock_id = #{lockId},</if>
+            <if test="fromHardwareId != null">from_hardware_id = #{fromHardwareId},</if>
+            <if test="toHardwareId != null">to_hardware_id = #{toHardwareId},</if>
+            <if test="isolationPointId != null">isolation_point_id = #{isolationPointId},</if>
+            <if test="lockStatus != null">lock_status = #{lockStatus},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="remark != null">remark = #{remark},</if>
+        </trim>
+        where record_id = #{recordId}
+    </update>
+
+    <delete id="deleteIsJobTicketLockByRecordId" parameterType="Long">
+        delete from is_job_ticket_lock where record_id = #{recordId}
+    </delete>
+
+    <delete id="deleteIsJobTicketLockByRecordIds" parameterType="String">
+        delete from is_job_ticket_lock where record_id in 
+        <foreach item="recordId" collection="array" open="(" separator="," close=")">
+            #{recordId}
+        </foreach>
+    </delete>
+</mapper>

+ 100 - 0
ktg-iscs/src/main/resources/mapper/IsSopUserMapper.xml

@@ -0,0 +1,100 @@
+<?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.ktg.iscs.mapper.IsSopUserMapper">
+    
+    <resultMap type="IsSopUser" id="IsSopUserResult">
+        <result property="recordId"    column="record_id"    />
+        <result property="sopId"    column="sop_id"    />
+        <result property="userId"    column="user_id"    />
+        <result property="userName"    column="user_name"    />
+        <result property="userType"    column="user_type"    />
+        <result property="userRole"    column="user_role"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="remark"    column="remark"    />
+    </resultMap>
+
+    <sql id="selectIsSopUserVo">
+        select record_id, sop_id, user_id, user_name, user_type, user_role, del_flag, create_by, create_time, update_time, update_by, remark from is_sop_user
+    </sql>
+
+    <select id="selectIsSopUserList" parameterType="IsSopUser" resultMap="IsSopUserResult">
+        <include refid="selectIsSopUserVo"/>
+        <where>  
+            <if test="sopId != null "> and sop_id = #{sopId}</if>
+            <if test="userId != null "> and user_id = #{userId}</if>
+            <if test="userName != null  and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
+            <if test="userType != null  and userType != ''"> and user_type = #{userType}</if>
+            <if test="userRole != null  and userRole != ''"> and user_role = #{userRole}</if>
+        </where>
+    </select>
+    
+    <select id="selectIsSopUserByRecordId" parameterType="Long" resultMap="IsSopUserResult">
+        <include refid="selectIsSopUserVo"/>
+        where record_id = #{recordId}
+    </select>
+        
+    <insert id="insertIsSopUser" parameterType="IsSopUser" useGeneratedKeys="true" keyProperty="recordId">
+        insert into is_sop_user
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="sopId != null">sop_id,</if>
+            <if test="userId != null">user_id,</if>
+            <if test="userName != null">user_name,</if>
+            <if test="userType != null">user_type,</if>
+            <if test="userRole != null">user_role,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="remark != null">remark,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="sopId != null">#{sopId},</if>
+            <if test="userId != null">#{userId},</if>
+            <if test="userName != null">#{userName},</if>
+            <if test="userType != null">#{userType},</if>
+            <if test="userRole != null">#{userRole},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="remark != null">#{remark},</if>
+         </trim>
+    </insert>
+
+    <update id="updateIsSopUser" parameterType="IsSopUser">
+        update is_sop_user
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="sopId != null">sop_id = #{sopId},</if>
+            <if test="userId != null">user_id = #{userId},</if>
+            <if test="userName != null">user_name = #{userName},</if>
+            <if test="userType != null">user_type = #{userType},</if>
+            <if test="userRole != null">user_role = #{userRole},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="remark != null">remark = #{remark},</if>
+        </trim>
+        where record_id = #{recordId}
+    </update>
+
+    <delete id="deleteIsSopUserByRecordId" parameterType="Long">
+        delete from is_sop_user where record_id = #{recordId}
+    </delete>
+
+    <delete id="deleteIsSopUserByRecordIds" parameterType="String">
+        delete from is_sop_user where record_id in 
+        <foreach item="recordId" collection="array" open="(" separator="," close=")">
+            #{recordId}
+        </foreach>
+    </delete>
+</mapper>