lyh
10 天以前 37ad4f4417c940b2b376cbcdcc22a097f2cd12a9
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamThirdMaintenanceOrderMapper.xml
@@ -3,10 +3,36 @@
<mapper namespace="org.jeecg.modules.eam.mapper.EamThirdMaintenanceOrderMapper">
    <select id="queryPageList" resultType="org.jeecg.modules.eam.entity.EamThirdMaintenanceOrder">
        select wmo.*, e.equipment_code, e.equipment_name
        select wmo.*, e.equipment_code, e.equipment_name, e.equipment_model
        from eam_third_maintenance_order wmo
        inner join eam_equipment e
        on wmo.equipment_id = e.id
        ${ew.customSqlSegment}
    </select>
    <select id="findThirdMaintenanceBaseInfo" resultType="org.jeecg.modules.eam.request.EamThirdMaintenanceBaseResponse">
        SELECT
            t1.hf_code_a,
            t1.hf_code_b,
            t2.equipment_code,
            t2.equipment_name,
            t2.equipment_model,
            t3.factory_name,
            CONVERT ( VARCHAR ( 4 ), YEAR ( TRY_CONVERT ( DATE, t1.maintenance_date ) ) ) + '年' + CONVERT ( VARCHAR ( 2 ), MONTH ( TRY_CONVERT ( DATE, t1.maintenance_date ) ) ) + '月' + CONVERT ( VARCHAR ( 2 ), DAY ( TRY_CONVERT ( DATE, t1.maintenance_date ) ) ) + '日'  AS maintenance_date,
            t1.fully_functional,
            t1.running_normally,
            t1.problem_description,
            t1.operator_signature,
            t1.assistant_operator,
            t1.repairman_signature,
            t1.assistant_repairman,
            t1.repair_manager_signature,
            t1.inspector_signature,
            t2.equipment_category
        FROM
            eam_third_maintenance_order t1
                LEFT JOIN eam_equipment t2 ON t1.equipment_id = t2.id
                LEFT JOIN eam_base_factory t3 ON t3.org_code = SUBSTRING ( t2.factory_org_code , 1, 6 )
        WHERE t1.id = #{id}
    </select>
</mapper>