lxp
2025-03-15 52d79c7e5a1fb4316f34886ec336f69f56d5edb2
performance-server/src/main/resources/mapper/AuxiliaryWorkingHoursDayMapper.xml
@@ -25,16 +25,15 @@
        <result column="update_user" property="updateUser"/>
        <result column="state" property="state"/>
    </resultMap>
    <sql id="selectAuxiliaryWorkingHours">
    <select id="selectAuxiliaryWorkingHoursDay" resultType="com.ruoyi.performance.dto.AuxiliaryWorkingHoursDayDto">
        select A.*
        from (
        select awhd.*,name
        FROM auxiliary_working_hours_day awhd
        left join user on name_user=user.id
        left join user on awhd.name_user=user.id
        WHERE 1=1
        <if test="ids !=null and ids.size() > 0">
            and name_user in
            and awhd.name_user in
            <foreach collection="ids" index="index" open="(" separator="," close=")" item="val">
                #{val}
            </foreach>
@@ -43,10 +42,6 @@
        <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''">
            ${ew.customSqlSegment}
        </if>
    </sql>
    <select id="selectAuxiliaryWorkingHoursDay" resultType="com.ruoyi.performance.dto.AuxiliaryWorkingHoursDayDto">
        <include refid="selectAuxiliaryWorkingHours"/>
    </select>
    <select id="selectDataByUser" resultType="com.ruoyi.performance.dto.AuxiliaryWorkingHoursDayDto">
        select awhd.*,name
@@ -63,7 +58,7 @@
    <select id="selectListByIds" resultType="com.ruoyi.performance.pojo.AuxiliaryWorkingHoursDay">
        select * from auxiliary_working_hours_day
        where state='已审核'
        <if test="ids !=null and ids != ''">
        <if test="ids !=null and ids.size()>0">
            and name_user in
            <foreach collection="ids" index="index" open="(" separator="," close=")" item="val">
                #{val}
@@ -76,8 +71,11 @@
        FORMAT(SUM(manHour), 4)as manHours
        from(
        select user.name,
        case when reviewer_nonproductive_time is null then nonproductive_time
        else reviewer_nonproductive_time end as manHour,
        case
        when reviewer_nonproductive_time is not null then reviewer_nonproductive_time
        when reviewer_nonproductive_time is null and nonproductive_time is not null then nonproductive_time
        else 0
        end as manHour,
        date_time as month
        from auxiliary_working_hours_day awhd
        left join user on user.id=awhd.name_user
@@ -109,8 +107,5 @@
        <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''">
            ${ew.customSqlSegment}
        </if>
    </select>
    <select id="selectAuxiliaryWorkingHoursDayList" resultType="com.ruoyi.performance.dto.AuxiliaryWorkingHoursDayDto">
        <include refid="selectAuxiliaryWorkingHours"/>
    </select>
</mapper>