chenhj
2026-04-22 2ab6b6860e4f7bee67a0f66831b9b1fb0f420710
src/main/resources/mapper/production/ProductionAccountMapper.xml
@@ -21,4 +21,24 @@
        <result column="dept_id" property="deptId" />
    </resultMap>
    <select id="selectUserAccount" resultType="com.ruoyi.production.bean.dto.UserAccountDto">
        select ifnull(sum(finished_num), 0) as accountBalance,
               ifnull(sum(work_hours), 0) as account
        from production_account
        where scheduling_user_id = #{userId}
          and date_format(scheduling_date, '%Y-%m') = #{date}
    </select>
    <select id="selectDailyWagesStats" resultType="java.util.Map">
        select date_format(scheduling_date, '%m-%d') as dateStr,
               cast(ifnull(sum(finished_num), 0) as decimal(18,2)) as numberOfCompleted,
               cast(ifnull(sum(work_hours), 0) as decimal(18,2)) as amount,
               cast(0 as decimal(18,2)) as passRate
        from production_account
        where scheduling_date &gt;= #{startDate}
          and scheduling_date &lt;= #{endDate}
        group by date_format(scheduling_date, '%m-%d')
        order by date_format(scheduling_date, '%m-%d')
    </select>
</mapper>