guoyujie
2025-09-18 4dcb5e299757924aef0edc4d608d2305dbedc780
north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml
@@ -448,17 +448,17 @@
                   a.completed_quantity,
                (a.completed_quantity+ a.breakage_quantity),
                   (f.completed_quantity
                       -ifnull(g.completed_quantity,0))
                       -ifnull(g.completed_quantity,0) + a.breakage_quantity)
                    )  as minQuantity -- 修改最小数
            </if>
            <if test="nextProcess == null or nextProcess == ''">  -- 最后一道工序
#               c.received_quantity, -- 已入库数量
#               c.inventory_quantity, --   库存数量
               c.received_quantity, -- 已入库数量
               c.inventory_quantity, --   库存数量
              if(ifnull(inventory_quantity,0)
                 -ifnull(c.received_quantity,0)
                 &gt;= a.completed_quantity,0,
                (a.completed_quantity-(ifnull(c.inventory_quantity,0)
                    -ifnull(c.received_quantity,0)))
                 &gt;= a.completed_quantity,a.completed_quantity,
                (ifnull(c.inventory_quantity,0)
                -ifnull(c.received_quantity,0))
                )
                as minQuantity -- 修改最小数
            </if>
@@ -1114,4 +1114,14 @@
        GROUP BY rw.reporting_work_id
        ORDER BY rw.reporting_work_id desc
    </select>
    <select id="mesSelectWorkBasicDeviceMp">
        SELECT bdp.id,bdp.basic_type,bdp.basic_name, bd.basic_name as basic_category FROM  sd.basic_data as bd left join  `basic_data_produce` as bdp
        on bd.id=bdp.basic_category
        where bd.basic_category="process" and bdp.basic_type="device" and bd.basic_name = #{process}
    </select>
    <select id="mesSelectWorkBasicTeamsMp">
        select id,login_name,user_name,address from erp_user_info.`user`
    </select>
</mapper>