<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.fjhx.mes.mapper.production.ProductionSchedulingMapper">

    <select id="listSumQuantity" resultType="com.fjhx.mes.entity.production.vo.ProductionSchedulingVo">
        SELECT ps.scheduling_date,
               DATE_FORMAT(ps.scheduling_date, '%Y-%m-%d') AS schedulingDateStr,
               sum(ps.quantity)                            AS quantity,
               ps.processes_id,
               pp.`name`                                   AS processesName,
               pp.capacity
        FROM production_scheduling ps
                 JOIN production_processes pp ON ps.processes_id = pp.id
            ${ew.customSqlSegment}
    </select>

</mapper>
