lige
2023-12-15 a28c894d35b5ca697bfe455c2d584c7f28ec3722
ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/TbTransitionMapper.java
@@ -79,6 +79,9 @@
    public boolean deletedTbTransitionListByCusIdAndPac(String cusId);
    //根据身份证号和套餐id查询和项目id
//    @Select("SELECT * FROM tb_transition WHERE cus_id=#{cusId} AND ISNULL(pac_id)  AND pro_id =#{proId}")
//    public List<TbTransition> getTbTransitionListByCusIdAndPacIdAndProId(@Param("cusId") String cusId,@Param("proId") String proId);
    @Select("SELECT * FROM tb_transition WHERE cus_id=#{cusId}  AND pro_id =#{proId}")
    public List<TbTransition> getTbTransitionListByCusIdAndPacIdAndProId(@Param("cusId") String cusId,@Param("proId") String proId);
@@ -179,7 +182,7 @@
            "\ttj_grouping_pro a\n" +
            "\tLEFT JOIN tj_project b ON a.pro_id = b.pro_id \n" +
            "\tLEFT JOIN tj_project c ON c.pro_parent_id=b.pro_id\n" +
            "WHERE 1=1 AND a.grouping_id =#{groupingId} ")
            "WHERE 1=1 AND a.grouping_id =#{groupingId} and c.deleted=0 ")
    boolean saveTemoTransitionByGroupingId(@Param("cusId")String cusId,@Param("groupingId")String groupingId);
@@ -191,4 +194,11 @@
            "LEFT JOIN tj_package_project b\n" +
            "\tON aa.pac_id=b.pac_id WHERE b.pro_id=#{proId} ")
    BigDecimal getTbTransitionPriceAndOrdPrice(@Param("cusId")String cusId,@Param("proId")Long proId);
    @Select("SELECT SUM(c.pro_price) FROM tj_project c WHERE c.pro_id IN " +
            "(SELECT b.pro_id FROM tb_transition b WHERE" +
            " b.cus_id=(SELECT a.cus_idcard FROM tj_customer a " +
            "WHERE a.cus_id=#{cusId}) AND b.parent_pro_id=#{proId})  ")
    BigDecimal getTbTransitionDxPriceAndOrdPrice(@Param("cusId")String cusId,@Param("proId")Long proId);
}