| | |
| | | |
| | | <!--根据条件查询线路列表--> |
| | | <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 |
| | |
| | | <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> |
| | |
| | | </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查询线路已分配公司--> |