| | |
| | | t1.plan_end_time as planEndTime, |
| | | t1.actual_start_time as actualStartTime, |
| | | t1.actual_end_time as actualEndTime, |
| | | t1.maintenance_user_id as maintenanceUserId, |
| | | t1.maintenance_date as maintenanceDate, |
| | | t9.item_text as assignModeName, |
| | | t1.create_by as createBy, |
| | | t1.create_time as createTime, |
| | |
| | | WHERE t1.del_flag = 0 and t2.del_flag = 0 and t3.del_flag = 0 and t4.del_flag = 0 and t4.maintenance_type =#{params.maintenanceType} |
| | | <if test="params.num != null and params.num != ''"> |
| | | and t1.num like concat('%',#{params.num},'%') |
| | | </if> |
| | | <if test="params.equipmentNum != null and params.equipmentNum != ''"> |
| | | and t3.num like concat('%',#{params.equipmentNum},'%') |
| | | </if> |
| | | <if test="params.useDepartId != null and params.useDepartId != ''"> |
| | | and t3.use_id = #{params.useDepartId} |
| | | </if> |
| | | <if test="params.status != null and params.status != ''"> |
| | | and t1.status = #{params.status} |
| | | </if> |
| | | <if test="params.confirmStatus != null and params.confirmStatus != ''"> |
| | | and t1.confirm_status = #{params.confirmStatus} |
| | | </if> |
| | | <if test="params.teamId != null and params.teamId != ''"> |
| | | and t3.team_id = #{params.teamId} |
| | | </if> |
| | | <if test="params.finishStartTime != null"> |
| | | and t1.actual_end_time >= #{params.finishStartTime} |
| | | </if> |
| | | <if test="params.finishEndTime != null"> |
| | | and t1.actual_end_time <= #{params.finishEndTime} |
| | | </if> |
| | | ORDER BY t1.create_time desc |
| | | </select> |
| | |
| | | t1.plan_end_time as planEndTime, |
| | | t1.actual_start_time as actualStartTime, |
| | | t1.actual_end_time as actualEndTime, |
| | | t1.maintenance_user_id as maintenanceUserId, |
| | | t9.item_text as assignModeName, |
| | | t1.create_by as createBy, |
| | | t1.create_time as createTime, |
| | |
| | | <if test="params.num != null and params.num != ''"> |
| | | and t1.num like concat('%',#{params.num},'%') |
| | | </if> |
| | | <if test="params.equipmentNum != null and params.equipmentNum != ''"> |
| | | and t3.num like concat('%',#{params.equipmentNum},'%') |
| | | </if> |
| | | <if test="params.useDepartId != null and params.useDepartId != ''"> |
| | | and t3.use_id = #{params.useDepartId} |
| | | </if> |
| | | <if test="params.status != null and params.status != ''"> |
| | | and t1.status = #{params.status} |
| | | </if> |
| | | <if test="params.teamId != null and params.teamId != ''"> |
| | | and t3.team_id = #{params.teamId} |
| | | </if> |
| | | <if test="params.finishStartTime != null"> |
| | | and t1.actual_end_time >= #{params.finishStartTime} |
| | | </if> |
| | | <if test="params.finishEndTime != null"> |
| | | and t1.actual_end_time <= #{params.finishEndTime} |
| | | </if> |
| | | ORDER BY t1.create_time desc |
| | | </select> |
| | | |
| | |
| | | and tt.daily_maintenance_order_id = #{dailyMaintenanceOrderId} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="getRepairUser" parameterType="Map" resultType="map"> |
| | | SELECT |
| | | tt.id, |
| | | t1.id AS maintenanceStandardDetailId, |
| | | t2.id AS maintenanceStandardId, |
| | | t1.location, |
| | | t1.photo, |
| | | t1.maintenance_project_id AS maintenanceProjectId, |
| | | case t1.maintenance_role when 'operator' then '操作人员保养内容' else '维修人员保养内容' end as maintenanceRole, |
| | | t3.num AS maintenanceProjectNum, |
| | | t3.name as maintenanceProjectName, |
| | | t3.standard, |
| | | t4.item_text AS maintenanceMethod, |
| | | t3.maintenance_tool AS maintenanceTool, |
| | | t3.working_hour_quota AS workingHourQuota, |
| | | tt.maintenance_order_detail_uda1 as maintenanceOrderDetailUda1, |
| | | tt.maintenance_order_detail_uda2 as maintenanceOrderDetailUda2 |
| | | FROM |
| | | mom_eam_daily_maintenance_order_detail tt |
| | | LEFT JOIN mom_eam_maintenance_standard_detail t1 ON tt.maintenance_standard_detail_id = t1.id |
| | | LEFT JOIN mom_eam_maintenance_standard t2 ON tt.maintenance_standard_id = t2.id |
| | | LEFT JOIN mom_eam_maintenance_project t3 ON tt.maintenance_project_id = t3.id |
| | | LEFT JOIN ( SELECT * FROM v_sys_dict WHERE dict_code = 'maintenance_project_method' ) t4 ON t4.item_value = t3.maintenance_method |
| | | WHERE t1.del_flag = '0' AND t2.del_flag = '0' AND t3.del_flag = '0' AND t2.type = 'daily' and t1.maintenance_role = 'maintenance' |
| | | <if test="dailyMaintenanceOrderId != null and dailyMaintenanceOrderId != ''"> |
| | | and tt.daily_maintenance_order_id = #{dailyMaintenanceOrderId} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="getOperationUser" parameterType="Map" resultType="map"> |
| | | SELECT |
| | | tt.id, |
| | | t1.id AS maintenanceStandardDetailId, |
| | | t2.id AS maintenanceStandardId, |
| | | t1.location, |
| | | t1.photo, |
| | | t1.maintenance_project_id AS maintenanceProjectId, |
| | | case t1.maintenance_role when 'operator' then '操作人员保养内容' else '维修人员保养内容' end as maintenanceRole, |
| | | t3.num AS maintenanceProjectNum, |
| | | t3.name as maintenanceProjectName, |
| | | t3.standard, |
| | | t4.item_text AS maintenanceMethod, |
| | | t3.maintenance_tool AS maintenanceTool, |
| | | t3.working_hour_quota AS workingHourQuota, |
| | | tt.maintenance_order_detail_uda1 as maintenanceOrderDetailUda1, |
| | | tt.maintenance_order_detail_uda2 as maintenanceOrderDetailUda2 |
| | | FROM |
| | | mom_eam_daily_maintenance_order_detail tt |
| | | LEFT JOIN mom_eam_maintenance_standard_detail t1 ON tt.maintenance_standard_detail_id = t1.id |
| | | LEFT JOIN mom_eam_maintenance_standard t2 ON tt.maintenance_standard_id = t2.id |
| | | LEFT JOIN mom_eam_maintenance_project t3 ON tt.maintenance_project_id = t3.id |
| | | LEFT JOIN ( SELECT * FROM v_sys_dict WHERE dict_code = 'maintenance_project_method' ) t4 ON t4.item_value = t3.maintenance_method |
| | | WHERE t1.del_flag = '0' AND t2.del_flag = '0' AND t3.del_flag = '0' AND t2.type = 'daily' and t1.maintenance_role = 'operator' |
| | | <if test="dailyMaintenanceOrderId != null and dailyMaintenanceOrderId != ''"> |
| | | and tt.daily_maintenance_order_id = #{dailyMaintenanceOrderId} |
| | | </if> |
| | | </select> |
| | | </mapper> |