<?xml version="1.0" encoding="UTF-8"?><!DOCTYPEmapperPUBLIC"-//mybatis.org//DTD Mapper 3.0//EN""http://mybatis.org/dtd/mybatis-3-mapper.dtd"><mappernamespace="com.jingsheng.mes.dal.mapper.mysql.LcjBoardEfficiencyMapper"><resultMapid="BaseResultMap"type="com.jingsheng.mes.dal.entity.mysql.LcjBoardEfficiency"><idcolumn="id"jdbcType="BIGINT"property="id"/><resultcolumn="scheduling_time"jdbcType="VARCHAR"property="schedulingTime"/><resultcolumn="efficiency_value"jdbcType="DECIMAL"property="efficiencyValue"/><resultcolumn="efficiency_target_value"jdbcType="INTEGER"property="efficiencyTargetValue"/><resultcolumn="create_time"jdbcType="TIMESTAMP"property="createTime"/><resultcolumn="update_time"jdbcType="TIMESTAMP"property="updateTime"/><resultcolumn="equipment_operation_time"jdbcType="INTEGER"property="equipmentOperationTime"/><resultcolumn="equipment_startup_time"jdbcType="INTEGER"property="equipmentStartupTime"/><resultcolumn="is_del"jdbcType="INTEGER"property="isDel"/></resultMap><selectid="selectGroupById"resultMap="BaseResultMap">
SELECT
efficiency.id, efficiency.scheduling_time, efficiency.efficiency_value, efficiency.efficiency_target_value, efficiency.create_time, efficiency.update_time
FROM
lcj_board_efficiency efficiency
LEFT JOIN js_scheduling_detail detail ON efficiency.scheduling_time = DATE_FORMAT(detail.scheduling_time, '%Y-%m-%d' )
WHERE
detail.scheduling_id = 1
<iftest="req.startTime != null and req.startTime != '' and req.endTime != null and req.endTime != ''">
and DATE_FORMAT(detail.scheduling_time, '%Y-%m-%d' ) BETWEEN #{req.startTime} AND #{req.endTime}
</if>
and efficiency.is_del = 0
ORDER BY DATE_FORMAT(detail.scheduling_time, '%Y-%m-%d' ) desc
</select></mapper>