Lius
3 天以前 2196ba833d88c32dd0e26b526928d313cfea0d80
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<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, 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>