java110
2020-10-24 82eb6782bd9264798bea70220d4199d559759dcb
java110-db/src/main/resources/mapper/common/MachineServiceDaoImplMapper.xml
@@ -147,18 +147,12 @@
        t.state,c.location_type locationTypeCd, c.location_name locationTypeName, t.location_obj_id locationObjId,
        t.location_type_cd,t.location_obj_id,
        td1.name stateName,t.create_time createTime,t.direction,td3.name directionName
        from machine t,t_dict td,t_dict td1,t_dict td3, community_location c
        from machine t
        left join t_dict td on t.machine_type_cd=td.status_cd and td.table_name='machine' and td.table_columns='machine_type_cd'
        left join t_dict td1 on t.state = td1.status_cd and td1.table_name='machine' and td1.table_columns='state'
        left join t_dict td3 on t.direction = td3.status_cd and td3.table_name='machine' and td3.table_columns='direction'
        left join community_location c on t.location_type_cd = c.location_id and t.status_cd = '0'
        where 1 =1
        and t.machine_type_cd=td.status_cd
        and td.table_name='machine'
        and td.table_columns='machine_type_cd'
        and t.state = td1.status_cd
        and td1.table_name='machine'
        and td1.table_columns='state'
        and t.direction = td3.status_cd
        and td3.table_name='machine'
        and td3.table_columns='direction'
        and t.location_type_cd = c.location_id
        <if test="machineMac !=null and machineMac != ''">
            and t.machine_mac= #{machineMac}
        </if>
@@ -273,17 +267,12 @@
    <!-- 查询设备数量 add by wuxw 2018-07-03 -->
    <select id="queryMachinesCount" parameterType="Map" resultType="Map">
        select count(1) count
        from machine t,t_dict td,t_dict td1,t_dict td3
        from machine t
        left join t_dict td on t.machine_type_cd=td.status_cd and td.table_name='machine' and td.table_columns='machine_type_cd'
        left join t_dict td1 on t.state = td1.status_cd and td1.table_name='machine' and td1.table_columns='state'
        left join t_dict td3 on t.direction = td3.status_cd and td3.table_name='machine' and td3.table_columns='direction'
        left join community_location c on t.location_type_cd = c.location_id and t.status_cd = '0'
        where 1 =1
        and t.machine_type_cd=td.status_cd
        and td.table_name='machine'
        and td.table_columns='machine_type_cd'
        and t.state = td1.status_cd
        and td1.table_name='machine'
        and td1.table_columns='state'
        and t.direction = td3.status_cd
        and td3.table_name='machine'
        and td3.table_columns='direction'
        <if test="machineMac !=null and machineMac != ''">
            and t.machine_mac= #{machineMac}
        </if>