guoyujie
2025-11-20 8e9eecf5b3a1490124d1519941eff932fd726216
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<?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.example.northglasserpclient.mapper.sd.OrderProcessDetailMapper">
    <select id="getProductionQuantity" resultType="integer">
       select sum(reporting_work_num)
       from
           (select max(reporting_work_num) as reporting_work_num
        from sd.order_process_detail
        where order_id = #{orderId}
        and substr(process_id,1,11) = #{productionId}
        group by order_number, process_id
        ) as a
 
    </select>
 
</mapper>