| | |
| | | <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 >= #{startDate} |
| | | and scheduling_date <= #{endDate} |
| | | group by date_format(scheduling_date, '%m-%d') |
| | | order by date_format(scheduling_date, '%m-%d') |
| | | </select> |
| | | |
| | | </mapper> |