| | |
| | | ) |
| | | </select> |
| | | |
| | | <select id="selectMonthSalaryCalcItems" resultType="java.util.Map"> |
| | | select |
| | | poro.type as operationType, |
| | | ifnull(pa.finished_num, 0) as finishedNum, |
| | | ifnull(ppm.work_hour, 0) as workHour, |
| | | ifnull(ppm.repair_work_hour, 0) as repairWorkHour, |
| | | ifnull(too.standard_quantity, 0) as standardQuantity, |
| | | ifnull(too.conversion_factor, 1) as conversionFactor |
| | | from production_account pa |
| | | left join production_product_main ppm on ppm.id = pa.production_product_main_id |
| | | left join production_operation_task pot on ppm.production_operation_task_id = pot.id |
| | | left join production_order_routing_operation poro on pot.production_order_routing_operation_id = poro.id |
| | | left join technology_operation too on poro.technology_operation_id = too.id |
| | | where pa.scheduling_user_id = #{userId} |
| | | and date_format(pa.scheduling_date, '%Y-%m') = #{date} |
| | | and ( |
| | | pa.production_product_main_id is null |
| | | or ( |
| | | ppm.audit_status = 1 |
| | | and ppm.report_type in (0, 1) |
| | | ) |
| | | ) |
| | | </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, |