Commit 020e2116 authored by 秦嘉's avatar 秦嘉

核酸模块代码优化

parent 89edc54f
......@@ -2,18 +2,19 @@ package com.ruoyi.system.mapper;
import java.util.List;
import com.ruoyi.system.domain.Hscj;
import org.apache.ibatis.annotations.Param;
/**
* 核酸采集Mapper接口
*
*
* @author ruoyi
* @date 2022-11-28
*/
public interface HscjMapper
public interface HscjMapper
{
/**
* 查询核酸采集
*
*
* @param id 核酸采集主键
* @return 核酸采集
*/
......@@ -21,7 +22,7 @@ public interface HscjMapper
/**
* 查询核酸采集列表
*
*
* @param hscj 核酸采集
* @return 核酸采集集合
*/
......@@ -29,7 +30,7 @@ public interface HscjMapper
/**
* 新增核酸采集
*
*
* @param hscj 核酸采集
* @return 结果
*/
......@@ -37,7 +38,7 @@ public interface HscjMapper
/**
* 修改核酸采集
*
*
* @param hscj 核酸采集
* @return 结果
*/
......@@ -45,7 +46,7 @@ public interface HscjMapper
/**
* 删除核酸采集
*
*
* @param id 核酸采集主键
* @return 结果
*/
......@@ -53,11 +54,17 @@ public interface HscjMapper
/**
* 批量删除核酸采集
*
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteHscjByIds(Long[] ids);
List<Hscj> checkCard(Hscj hscj);
List<Hscj> checkCardBatch(List<Hscj> hscjList);
void insertBatch(List<Hscj> insertList);
void updateBatch(List<Hscj> updateList);
}
......@@ -121,6 +121,16 @@
and date_format(cj_time,'%y%m%d') = date_format(#{cjTime},'%y%m%d')
<if test="id != null">and id != #{id}</if>
</select>
<select id="checkCardBatch" resultType="com.ruoyi.system.domain.Hscj">
SELECT id, card_no
FROM hscj
WHERE del_flag ='0'
AND card_no IN
<foreach collection="hscjList" item="item" index="index" open="(" separator="," close=")">
#{item.cardNo}
</foreach>
</select>
<insert id="insertHscj" parameterType="Hscj" useGeneratedKeys="true" keyProperty="id">
insert into hscj
......@@ -193,6 +203,7 @@
<if test="remark != null">#{remark},</if>
</trim>
</insert>
<insert id="insertBatch"></insert>
<update id="updateHscj" parameterType="Hscj">
update hscj
......@@ -231,6 +242,7 @@
</trim>
where id = #{id}
</update>
<update id="updateBatch"></update>
<delete id="deleteHscjById" parameterType="Long">
delete
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment