zhuo
2025-03-26 d9a3f29203bf2cefeedb23766b79906d2b37abdc
performance-server/src/main/resources/mapper/AuxiliaryOutputWorkingHoursMapper.xml
@@ -45,7 +45,8 @@
        aowh.sample,
        aowh.price,
        aowh.man_hour_group,
        ip.cable_tag
        ip.cable_tag,
        aowh.create_time
        FROM auxiliary_output_working_hours aowh
        left join ins_product ip on ip.id = aowh.ins_product_id
        left join user on user.id=aowh.`check`
@@ -60,6 +61,7 @@
        <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''">
            ${ew.customSqlSegment}
        </if>
        order by create_time desc
    </sql>
    <select id="selectAuxiliaryOutputWorkingHours" resultType="com.ruoyi.performance.dto.AuxiliaryOutputWorkingHoursDto">
        <include refid="selectAuxiliaryOutputWorking"/>
@@ -142,16 +144,16 @@
               u.name           userName,
               aowh.`check`           userId,
               #{dto.month} month
        from (SELECT *
              FROM auxiliary_output_working_hours
              GROUP BY CASE
                           WHEN man_hour_group IS NOT NULL AND man_hour_group != '' THEN man_hour_group
                           ELSE id
                  END
                     , CASE
                           WHEN man_hour_group IS NOT NULL AND man_hour_group != '' THEN order_id
                           ELSE id
                  END) aowh
        from (SELECT ao.*, ip.cable_tag
        FROM auxiliary_output_working_hours ao
        left join ins_product ip on ip.id = ao.ins_product_id
        GROUP BY CASE
        WHEN ao.man_hour_group IS NOT NULL AND ao.man_hour_group != '' THEN ao.man_hour_group
        ELSE ao.id END,
        CASE WHEN ao.man_hour_group IS NOT NULL AND ao.man_hour_group != '' THEN ao.sample_id ELSE ao.id END,
        CASE WHEN ao.man_hour_group IS NOT NULL AND ao.man_hour_group != '' THEN ip.radius ELSE ao.id END,
        CASE WHEN ao.man_hour_group IS NOT NULL AND ao.man_hour_group != '' THEN ip.cable_tag ELSE ao.id END,
        CASE WHEN ao.man_hour_group IS NOT NULL AND ao.man_hour_group != '' THEN ao.order_id ELSE ao.id END) aowh
                 left join user u on u.id = aowh.`check`
        where aowh.date_time between #{dto.beginDate} and #{dto.endDate}
        <if test="userIds !=null and userIds.size() > 0">
@@ -169,7 +171,7 @@
               #{dto.month} month
        from auxiliary_working_hours_day awhd
                 left join user u on u.id = awhd.name_user
        where awhd.date_time between #{dto.beginDate} and #{dto.endDate}
        where awhd.date_time between #{dto.assistBeginDate} and #{dto.assistEndDate}
        and awhd.state = '已批准'
        <if test="userIds !=null and userIds.size() > 0">
            and awhd.name_user in