zjh
2024-02-28 22c17adc3ec2a25e6656cd69961f49a888d433b3
ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/TjFlowingWaterMapper.java
@@ -1,11 +1,13 @@
package com.ltkj.hosp.mapper;
import java.util.Date;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ltkj.hosp.domain.TjFlowingWater;
import com.ltkj.hosp.domain.TjOrderDetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
/**
@@ -72,4 +74,23 @@
    @Select("\tSELECT a.discount/10 FROM tj_flowing_water a WHERE 1=1 AND a.deleted =0 AND  a.order_id=#{orderId} AND a.discount !='/'")
    String getDiscount(String orderId);
//    @Select("\tSELECT GROUP_CONCAT(b.pro_name ) proname FROM tj_order_detail a \n" +
//            "    LEFT JOIN tj_project b ON a.pro_id=b.pro_id \n" +
//            "\t WHERE a.order_id=#{orderId}")
//    String getproNameByOrderId(String orderId);
    @Select("SELECT GROUP_CONCAT(a.pro_name ) proname FROM tj_charging_standard a WHERE a.tj_num=#{orderId}")
    String getproNameByOrderId(String orderId);
    @Select("\n" +
            "SELECT a.tj_serial_number FROM tj_flowing_water a " +
            "WHERE a.deleted=0 " +
            "AND a.toll_collector_id=#{userId}" +
            "AND ISNULL(a.is_checkout)" +
            "AND a.pay_stasus !=0 " +
            "AND a.update_time BETWEEN #{beginTime} AND #{endTime}")
    List<Long> getFlowingWaterIdList(@Param("userId") String userId,@Param("beginTime") Date beginTime,@Param("endTime") Date endTime);
}