longz
2026-06-04 da780b14b8db78043d2c0f27d3bfd73111e6d550
ManagementYKDTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TLineMapper.xml
@@ -20,11 +20,7 @@
    <!--根据条件查询线路列表-->
    <select id="getLineList" resultType="map" parameterType="com.baomidou.mybatisplus.plugins.Page">
        SELECT * FROM (SELECT model.modelStr,IFNULL(ls.num,0) as shiftNum,su.`name` as insertUser,IFNULL(lc.num,0) as companyNum,ll.* FROM t_line as ll
        LEFT JOIN (
        SELECT GROUP_CONCAT(sc.`name` SEPARATOR '、') as modelStr,lp.lineId FROM t_line_price as lp
        LEFT JOIN t_server_carmodel as sc on sc.id = lp.serverCarModelId
        where sc.type = 2 and lp.state != 3 GROUP BY lp.lineId) as model on model.lineId = ll.id
        SELECT * FROM (SELECT IFNULL(ls.num,0) as shiftNum,su.`name` as insertUser,IFNULL(lc.num,0) as companyNum,ll.* FROM t_line as ll
        LEFT JOIN (SELECT COUNT(id) as num,lineId FROM t_line_shift where state != 3 GROUP BY lineId) as ls on ls.lineId = ll.id
        LEFT JOIN sys_user as su on su.id = ll.insertUserId
        LEFT JOIN (SELECT COUNT(id) as num,lineId FROM t_line_company GROUP BY lineId) as lc on lc.lineId = ll.id
@@ -40,9 +36,6 @@
            <if test="insertUser != null and insertUser != ''">
                and o.insertUser LIKE CONCAT('%',#{insertUser},'%')
            </if>
            <if test="modelStr != null and modelStr != ''">
                and o.modelStr LIKE CONCAT('%',#{modelStr},'%')
            </if>
            <if test="state != null and state != ''">
                and o.state = #{state}
            </if>
@@ -51,13 +44,6 @@
            </if>
        </where>
        order by o.id desc
    </select>
    <!--根据线路ID查询线路价格-->
    <select id="getLinePriceList" resultType="java.util.Map">
        SELECT sc.`name`,lp.* FROM t_line_price as lp
        LEFT JOIN t_server_carmodel as sc on sc.id = lp.serverCarModelId
        where lp.lineId = #{lineId} and lp.state != 3
    </select>
    <!--根据线路ID查询线路已分配公司-->