zjh
2025-04-18 1630243ed75a92c60d0638e7d14477e4aadcf2b7
ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/TjOrderDetailMapper.java
@@ -143,12 +143,12 @@
            "  create_id,\n" +
            "  pro_type) \n" +
            "  \n" +
            "  SELECT #{orderId},a.pro_id,IFNULL(trim(b.pro_default),null),'0',SYSDATE(),#{userName},b.is_sampling,#{userId},IFNULL(a.pac_id,0)" +
            "  SELECT #{orderId},a.pro_id,IFNULL(trim(b.pro_default),null),IF(b.need_report<>'Y',1,0),SYSDATE(),#{userName},b.is_sampling,#{userId},IFNULL(a.pac_id,0)" +
            " FROM tb_transition a LEFT JOIN tj_project b ON a.pro_id=b.pro_id  WHERE a.cus_id=#{cusId} AND a.card_id=#{cardId} \n" +
            "\t\t\n" +
            "\tUNION\n" +
            "  \n" +
            "\tSELECT #{orderId},a.parent_pro_id,IFNULL(trim(b.pro_default),null),'0',SYSDATE(),#{userName},b.is_sampling,#{userId},IFNULL(a.pac_id,0) " +
            "\tSELECT #{orderId},a.parent_pro_id,IFNULL(trim(b.pro_default),null),IF(b.need_report<>'Y',1,0),SYSDATE(),#{userName},b.is_sampling,#{userId},IFNULL(a.pac_id,0) " +
            "FROM tb_transition a LEFT JOIN tj_project b ON a.parent_pro_id=b.pro_id  WHERE a.cus_id=#{cusId} AND a.card_id=#{cardId} GROUP BY a.parent_pro_id")
     boolean saveTjOrderDetailsByCusId(@Param("cusId")String cusId,@Param("orderId")String orderId,@Param("userName")String userName,@Param("userId") String userId,@Param("cardId") String cardId);
@@ -289,4 +289,10 @@
            "a.update_time=SYSDATE()\n" +
            "WHERE a.order_id=#{orderId} and isnull(a.jxbz)")
    void updateTjOrderDetailsFlowingWaterIdByJxbzisnull(@Param("orderId") String orderId,@Param("ls")String ls);
    @Update("UPDATE tj_order_detail a SET\n" +
            "a.deleted=1 \n" +
            "WHERE a.order_detail_id=#{id}")
    void updateTjOrderDetailDel(@Param("id") String id);
}