zss
2025-05-26 51ec98113c6d49d0f7eec4e3c030e55e337e97db
performance-server/src/main/resources/mapper/AuxiliaryOutputWorkingHoursMapper.xml
@@ -18,16 +18,18 @@
        <result column="week" property="week"/>
        <result column="week_day" property="weekDay"/>
        <result column="check" property="check"/>
        <result column="name" property="name"/>
        <result column="create_time" property="createTime"/>
        <result column="update_time" property="updateTime"/>
        <result column="create_user" property="createUser"/>
        <result column="update_user" property="updateUser"/>
    </resultMap>
    <select id="selectAuxiliaryOutputWorkingHours" resultType="com.yuanchu.mom.dto.AuxiliaryOutputWorkingHoursDto">
    <select id="selectAuxiliaryOutputWorkingHours" resultMap="BaseResultMap">
        select *
        from (
        select aowh.id,
        inspection_item,
        num,
        inspection_item_subclass,
        overtime_order_no,
        overtime_work_time,
@@ -39,7 +41,8 @@
        date_time,
        week,
        week_day,
        name
        name,
        sample
        FROM auxiliary_output_working_hours aowh
        left join user on user.id=aowh.`check`
        WHERE 1=1
@@ -54,7 +57,7 @@
            ${ew.customSqlSegment}
        </if>
    </select>
    <select id="selectDataByUser" resultType="com.yuanchu.mom.dto.AuxiliaryOutputWorkingHoursDto">
    <select id="selectDataByUser" resultMap="BaseResultMap">
        select aowh.*,name
        FROM auxiliary_output_working_hours aowh
        left join user on user.id=aowh.`check`
@@ -73,14 +76,10 @@
        from(
        select user.name,
        date_time as month,
        order_no,
        sample,
        man_hour_group,
        output_work_time as manHours
        -- FORMAT(SUM(output_work_time), 4) as manHours
        case when #{type}='加班工时' then  case when overtime_work_time is null then 0 else overtime_work_time end
        else case when work_time is null then 0 else work_time end  end as manHours
        from auxiliary_output_working_hours aowh
        left join user on user.id=aowh.`check`
        left join department_lims dl on depart_lims_id=dl.id
        where date_time LIKE CONCAT('%', #{month}, '%')
        <if test="ids !=null and ids != ''">
            and `check` in
@@ -88,12 +87,7 @@
                #{val}
            </foreach>
        </if>
        group by user.name,date_time,order_no,
        sample,
        man_hour_group
        order by user.name,date_time,order_no,
        sample,
        man_hour_group
        order by user.name,date_time
        )A
        group by A.name,
        A.month