java110
2020-12-25 0abeea2e7d2f2faec76e667b0b73ddecea85f561
java110-db/src/main/resources/mapper/common/MachineRecordServiceDaoImplMapper.xml
@@ -269,4 +269,28 @@
    </select>
    <select id="getAssetsMachineRecords" parameterType="Map" resultType="Map">
        select DATE_FORMAT(t.create_time,'%m-%d') createTime, count(1) count
        from machine_record t
        where t.status_cd = '0'
        and t.community_id = #{communityId}
        group by DATE_FORMAT(t.create_time,'%Y-%m-%d')
        order by t.create_time desc
        limit 0,7
    </select>
    <!-- 保存设备上报信息 add by wuxw 2018-07-03 -->
    <insert id="saveMachineRecords" parameterType="Map">
        insert into machine_record(
        file_time,machine_code,open_type_cd,id_card,machine_record_id,machine_id,`name`,tel,community_id,b_id,file_id,record_type_cd
        ) values
        <foreach collection="machineRecords" item="item" separator=",">
            (
            #{item.fileTime},#{item.machineCode},#{item.openTypeCd},#{item.idCard},#{item.machineRecordId},#{item.machineId},#{item.name},#{item.tel},#{item.communityId},'-1',#{item.fileId}
            ,#{item.recordTypeCd}
            )
        </foreach>
    </insert>
</mapper>