From 1630243ed75a92c60d0638e7d14477e4aadcf2b7 Mon Sep 17 00:00:00 2001 From: zjh <1084500556@qq.com> Date: 星期五, 18 四月 2025 17:41:44 +0800 Subject: [PATCH] zjh20250418 --- ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/TjSamplingMapper.java | 26 ++++++++++++++++++++++++++ 1 files changed, 26 insertions(+), 0 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 40e3b74..245a1bd 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 @@ -143,6 +143,10 @@ int deleteByTjNumAndCusIdAndJxbz(@Param("tjNum") String tjNum,@Param("userId") Long userId,@Param("ids")List<String> ids); + @Delete("DELETE FROM tj_sampling WHERE tj_num = #{tjNum} AND cus_id = #{userId} and jxbz = #{jxbz} ") + int deleteByTjNumAndCusIdAndJxbzo(@Param("tjNum") String tjNum,@Param("userId") Long userId,@Param("jxbz")String jxbz); + + @Select({"<script>","SELECT\n" + " IFNULL(GROUP_CONCAT( aa.pro_name SEPARATOR ' ; ' ),NULL)\n" + "FROM\n" + @@ -174,4 +178,26 @@ "\t\ta.id = #{id} \n" + "\t) aa WHERE aa.jyfldm NOT IN ( SELECT c.flbm FROM lis_jyflhb c )") int isMergeItem(@Param("id") String id); + + + @Update("UPDATE tj_sampling a SET\n" + + "a.update_time=SYSDATE(),\n" + + "a.update_by= #{userName},\n" + + "a.update_id= #{userId},\n" + + "a.create_id = #{userId}\n"+ + "WHERE a.tj_num=#{tjNum}") + boolean updateUserIdByTjNum(@Param("tjNum")String tjNum,@Param("userName")String userName,@Param("userId") String userId); + + @Update("UPDATE tj_sampling a SET\n" + + "a.update_time=SYSDATE(),\n" + + "a.update_by= #{userName},\n" + + "a.update_id= #{userId},\n" + + "a.create_id = #{userId}\n"+ + "WHERE a.tj_num=#{tjNum} AND a.jxbz = #{jxbz}") + boolean updateUserIdByTjNumAndJxbz(@Param("tjNum")String tjNum,@Param("userName")String userName,@Param("userId") String userId,@Param("jxbz") String jxbz); + + + + @Select("SELECT COUNT(*) FROM tj_sampling a WHERE a.deleted=0 AND a.tj_num=#{tjh} AND LOCATE(#{proId},a.pro_id)") + int isExistProId(@Param("tjh") String tjh,@Param("proId") String proId); } -- Gitblit v1.8.0