@@ -20,8 +20,12 @@ public interface BusDeviceRepository extends BaseMapper<BusDevice> {
...
@@ -20,8 +20,12 @@ public interface BusDeviceRepository extends BaseMapper<BusDevice> {
* 分页查询 busDevice
* 分页查询 busDevice
*
*
*/
*/
@Select("<script>select a.*,b.FAC_NM,DATE_FORMAT(a.install_date,'%Y-%m-%d %H:%i:%s') INSTALL_DAY from bus_device a left join bus_factory b on a.fac_id = b.fac_id where 1=1 and a.pro_id = #{proId} "+
@Select("<script>select a.*,b.FAC_NM,DATE_FORMAT(a.install_date,'%Y-%m-%d %H:%i:%s') INSTALL_DAY,c.DEV_TP_NM from bus_device a left join bus_factory b on a.fac_id = b.fac_id"+
"<if test='devTpId != null'> and a.dev_tp_id = #{devTpId}</if>"
" left join bus_device_tp c on a.dev_tp_id = c.dev_tp_id "+
" where 1=1"+
"<if test='proId != null'> and a.pro_id = #{proId}</if>"+
"<if test='devTpId != null'> and a.dev_tp_id = #{devTpId}</if>"+
"<if test='devNum != null'> and a.dev_num = #{devNum}</if>"