| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="org.jeecg.modules.mdc.mapper.MdcEquipmentDaySummaryMapper"> |
| | | |
| | | <select id="statisticsQty" resultType="org.jeecg.modules.mdc.entity.MdcEquipmentDaySummary"> |
| | | SELECT SUM(t1.plan_qty) AS planQty, |
| | | SUM(t1.qualified_qty) AS qualifiedQty |
| | | FROM mdc_equipment_day_summary t1 |
| | | INNER JOIN mdc_equipment t2 |
| | | ON t1.equipment_code = t2.equipment_id |
| | | INNER JOIN mdc_production_equipment t3 |
| | | ON t2.id = t3.equipment_id |
| | | INNER JOIN mdc_production t4 |
| | | ON t3.production_id = t4.id |
| | | WHERE t4.parent_id = #{productionId} |
| | | AND TO_CHAR(t1.create_time, 'YYYY-MM') = TO_CHAR(SYSDATE, 'YYYY-MM'); |
| | | </select> |
| | | </mapper> |