Site-mapper1.xml 2.05 KB
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">

<mapper namespace="com.example.demo.mapper.db1.SiteMapper1">



    <select id="getScheduling" resultType="com.example.demo.model.Scheduling" parameterType="String">
        SELECT CONCAT(gs_name, fgs_name) gs_name,
               xl_name,
               xl_bm,
               j_gh,
               j_name,
               s_gh,
               s_name,
               schedule_date_str,
               xl_dir,
               bc_type,
               cl_zbh,
               lp_name,
               qdz_name,
               qdz_code,
               fcsj_actual,
               zdz_name,
               zdz_code,
               zdsj_actual,
               real_exec_date,
               gs_bm,
               cars.equipment_code,
               cars.car_plate,
               line.shanghai_linecode
        FROM bsth_c_s_sp_info_real
                 LEFT JOIN bsth_c_cars cars ON cars.inside_code = cl_zbh
                 LEFT JOIN bsth_c_line line ON xl_bm = line.line_code
        WHERE  (bc_type ='normal' or bc_type ='venting') and `status`=2 and line.shanghai_linecode is not null and line.shanghai_linecode !='' and schedule_date_str = '${date}'
        order by equipment_code,fcsj_actual
    </select>


    <select id="getStationRoute" resultType="com.example.demo.model.StationRoute">
        SELECT 	l.shanghai_linecode,r.station_route_code,r.directions,r.line_code,r.station_name,r.station_code
        from bsth_c_line l LEFT JOIN bsth_c_stationroute r on l.line_code=r.line_code
        WHERE l.destroy=0 and r.destroy=0 and l.shanghai_linecode is not null and l.shanghai_linecode !='' ORDER BY line_code,directions,station_route_code
    </select>


    <select id="getMaxTime" resultType="String" parameterType="String">
        SELECT max(CONCAT(real_exec_date,' ', zdsj_actual)) time FROM `bsth_c_s_sp_info_real`
        where (bc_type ='normal' or bc_type ='venting') and schedule_date_str='${date}'
    </select>


</mapper>