java110
2021-09-04 576c52d8d8e6fb1e738380cc5fc101a6a2b0b3a8
java110-db/src/main/resources/mapper/common/MachineAttrServiceDaoImplMapper.xml
old mode 100644 new mode 100755
@@ -14,6 +14,15 @@
    </insert>
    <insert id="saveMachineAttrs" parameterType="Map">
        insert into machine_attrs(
        machine_id,attr_id,spec_cd,community_id,b_id,value
        ) values (
        #{machineId},#{attrId},#{specCd},#{communityId},'-1',#{value}
        )
    </insert>
    <!-- 查询设备属性信息(Business) add by wuxw 2018-07-03 -->
    <select id="getBusinessMachineAttrInfo" parameterType="Map" resultType="Map">
        select t.machine_id,t.machine_id machineId,t.attr_id,t.attr_id attrId,t.operate,t.spec_cd,t.spec_cd
@@ -77,11 +86,22 @@
    <!-- 查询设备属性信息 add by wuxw 2018-07-03 -->
    <select id="getMachineAttrInfo" parameterType="Map" resultType="Map">
        select t.machine_id,t.machine_id machineId,t.attr_id,t.attr_id attrId,t.spec_cd,t.spec_cd
        specCd,t.status_cd,t.status_cd statusCd,t.community_id,t.community_id communityId,t.b_id,t.b_id bId,t.value
        specCd,t.status_cd,t.status_cd statusCd,t.community_id,t.community_id communityId,t.b_id,t.b_id bId,t.value,
        s.spec_name specName,
        v.value_name valueName,
        s.list_show listShow
        from machine_attrs t
        left join attr_spec s on t.spec_cd = s.spec_cd and s.status_cd = '0' and s.table_name = 'machine_attr'
        left join attr_value v on t.`value` = v.`value` and t.spec_cd = v.spec_cd and v.status_cd = '0'
        where 1 =1
        <if test="machineId !=null and machineId != ''">
            and t.machine_id= #{machineId}
        </if>
        <if test="machineIds !=null ">
            and t.machine_id in
            <foreach collection="machineIds" item="item" index="index" open="(" close=")" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="attrId !=null and attrId != ''">
            and t.attr_id= #{attrId}
@@ -144,6 +164,12 @@
        <if test="machineId !=null and machineId != ''">
            and t.machine_id= #{machineId}
        </if>
        <if test="machineIds !=null ">
            and t.machine_id in
            <foreach collection="machineIds" item="item" index="index" open="(" close=")" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="attrId !=null and attrId != ''">
            and t.attr_id= #{attrId}
        </if>