huminmin
2026-05-15 c7e3f7809362a858d68d79df1370b37508a4d54a
src/main/resources/mapper/production/ProductionProductMainMapper.xml
@@ -81,6 +81,14 @@
            <if test="c.productMainId != null">
                and ppm.id = #{c.productMainId}
            </if>
            <!-- 班组长可以看到所有关联订单的数据,成员只能看到自己的报工 -->
            <if test="currentUserId != null">
                and (
                    po.team_leader_user_id = #{currentUserId}
                    or pot.team_user_id = #{currentUserId}
                    or ppm.user_id = #{currentUserId}
                )
            </if>
        </where>
        order by ppm.create_time desc
    </select>