qushaowei
2023-10-29 2c250bb7d2c0efd16e5f124648bc77f5fd93040a
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/DailyMaintenanceOrderMapper.xml
@@ -10,6 +10,7 @@
            t1.photo,
            t1.maintenance_project_id as maintenanceProjectId,
            t3.num as maintenanceProjectNum,
            t3.name as maintenanceProjectName,
            t3.standard,
            t4.item_text as maintenanceMethod,
            t3.maintenance_tool as maintenanceTool
@@ -45,12 +46,21 @@
            t1.status,
            t5.item_text as statusName,
            t1.num,
            t1.num as technologyStatusVerificationBill,
            t4.id as maintenanceCycleId,
            t4.maintenance_type as maintenanceType,
            t10.item_text as maintenanceTypeName,
            t4.cycle as maintenanceCycle,
            concat(t4.code, '/', t4.name) as maintenanceCycleName,
            t3.id as equipmentId,
            t3.num as equipmentNum,
            t3.name as equipmentName,
            t3.model as equipmentModel,
            t3.specification,
            t3.technology_status as technologyStatus,
            t3.precision_parameters as precisionParameters,
            t11.id as equipmentCategoryId,
            t11.name as equipmentCategoryName,
            t2.id as maintenanceStandardId,
            t2.num as maintenanceStandardNum,
            t2.assign_mode assignMode,
@@ -69,18 +79,28 @@
            t9.item_text as assignModeName,
            t1.create_by as createBy,
            t1.create_time as createTime,
            t1.remark
            t1.remark,
            t1.description,
            t1.precision_inspection_status as precisionInspectionStatus,
            t1.stove_exempt_status as stoveExemptStatus,
            t1.inspect_user as inspectUser,
            t1.inspect_date as inspectDate,
            t12.item_text as checkStatusName,
            t1.not_pass_reason as notPassReason
        FROM
            mom_eam_daily_maintenance_order t1
        LEFT JOIN mom_eam_maintenance_standard t2 ON t1.maintenance_standard_id = t2.id
        left join mom_eam_equipment t3 on t1.equipment_id = t3.id
        left join mom_eam_equipment_category t11 on t3.equipment_category_id = t11.id
        left join mom_eam_maintenance_cycle t4 on t1.maintenance_cycle_id = t4.id
        LEFT JOIN ( SELECT * FROM v_sys_dict WHERE dict_code = 'daily_maintenance_order_status' ) t5 on t5.item_value = t1.status
        left join sys_depart t6 on t3.use_id = t6.id
        left join mom_base_team t7 on t7.id = t3.team_id
        left join sys_user t8 on t1.maintenance_user_id = t8.id
        left join ( SELECT * FROM v_sys_dict WHERE dict_code = 'assign_mode' ) t9 on t9.item_value = t2.assign_mode
        WHERE t1.del_flag = 0 and t2.del_flag = 0 and t3.del_flag = 0 and t4.del_flag = 0
        left join (SELECT * FROM v_sys_dict WHERE dict_code = 'maintenance_type') t10 on t10.item_value = t4.maintenance_type
        left join (SELECT * FROM v_sys_dict WHERE dict_code = 'check_status') t12 on t12.item_value = t1.check_status
        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>
@@ -95,11 +115,15 @@
            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
            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