From 050c9712591dcd97ba1d508e3f7bc2cda9196f60 Mon Sep 17 00:00:00 2001 From: zhaowenxuan <chacca165@163.com> Date: 星期五, 18 十月 2024 14:22:41 +0800 Subject: [PATCH] 2024-10-18 --- ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/TjSamplingMapper.java | 65 +++++++++++++++++++++++++++++++- 1 files changed, 62 insertions(+), 3 deletions(-) diff --git a/ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/TjSamplingMapper.java b/ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/TjSamplingMapper.java index a048067..8ee3f34 100644 --- a/ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/TjSamplingMapper.java +++ b/ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/TjSamplingMapper.java @@ -6,9 +6,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.ltkj.hosp.domain.TjSampling; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; -import org.apache.ibatis.annotations.Select; +import org.apache.ibatis.annotations.*; /** * 浣撴閲囨牱绠$悊Mapper鎺ュ彛 @@ -82,4 +80,65 @@ "</foreach>", "GROUP BY a.specimen_type_code) aa" + "</script>"}) int panduanshifoukeyihebing(@Param("ids") List<String> ids); + + + +// @Update({"<script>","UPDATE tj_sampling a SET a.parent_id=#{parentId} WHERE a.id " + +// "IN ","<foreach collection='ids' item='id' open='(' separator=',' close=')'>", +// "#{id}", +// "</foreach>", +// "</script>"}) + boolean updateHeBingXm(@Param("ids") List<String> ids,@Param("parentId")String parentId); + + + @Select({"<script>","SELECT COUNT(*) FROM tj_sampling a " + + "WHERE a.deleted=0 AND a.is_merge=1 AND a.id IN ","<foreach collection='ids' item='id' open='(' separator=',' close=')'>", + "#{id}", + "</foreach>", + "</script>"}) + int pdsfczhbxm(@Param("ids") List<String> ids); + + @Select({"<script>","SELECT * FROM tj_sampling a " + + "WHERE a.deleted=0 AND a.is_merge=1 AND a.id IN ","<foreach collection='ids' item='id' open='(' separator=',' close=')'>", + "#{id}", + "</foreach>", + "</script>"}) + TjSampling getTjSamplingByHb(@Param("ids") List<String> ids); + + + @Select({"<script>","SELECT * FROM tj_sampling a " + + "WHERE a.deleted=0 AND !ISNULL(a.parent_id) AND a.is_merge=0 AND a.id IN ","<foreach collection='ids' item='id' open='(' separator=',' close=')'>", + "#{id}", + "</foreach>", + "</script>"}) + List<TjSampling> getTjSamplingListByHb(@Param("ids") List<String> ids); + + + @Delete({"<script>","DELETE FROM tj_sampling WHERE id " + + "IN ","<foreach collection='ids' item='id' open='(' separator=',' close=')'>", + "#{id}", + "</foreach>", + "</script>"}) + boolean deletedTjSamplingListByHb(@Param("ids") List<String> ids); + + +// @Update({"<script>","UPDATE tj_sampling a SET a.parent_id=null WHERE a.id " + +// "IN ","<foreach collection='ids' item='id' open='(' separator=',' close=')'>", +// "#{id}", +// "</foreach>", +// "</script>"}) + boolean updateHeBingXms(@Param("ids") List<String> ids); + + @Delete("DELETE FROM tj_sampling WHERE tj_num = #{tjNum} AND cus_id = #{userId}") + int deleteByTjNumAndCusId(@Param("tjNum") String tjNum,@Param("userId") Long userId); + + @Delete({ + "<script>", + "DELETE FROM tj_sampling WHERE tj_num = #{tjNum} AND cus_id = #{userId} and jxbz in ", + "<foreach collection='ids' item='id' open='(' separator=',' close=')'>", + "#{id}", + "</foreach>", + "</script>" + }) + int deleteByTjNumAndCusIdAndJxbz(@Param("tjNum") String tjNum,@Param("userId") Long userId,@Param("ids")List<String> ids); } -- Gitblit v1.8.0