qushaowei
2024-07-25 654dc30c50b1c176966ad8e6e7d791b92531de83
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/MaintenanceStandardMapper.xml
@@ -29,7 +29,7 @@
        left join sys_depart t4 on t2.use_id = t4.id
        left join mom_base_team t5 on t2.team_id = t5.id
        left join (select * from v_sys_dict where dict_code = 'assign_mode') t6 on t1.assign_mode = t6.item_value
        where t1.del_flag = 0 and t1.type = #{params.type}
        where t1.del_flag = 0 and t1.type = #{params.type} and t2.technology_status in ('qualified','limitedUse')
        <if test="params.useId != null and params.useId != ''">
            and t2.use_id = #{params.useId}
        </if>
@@ -44,6 +44,9 @@
        </if>
        <if test="params.equipmentNum != null and params.equipmentNum != ''">
            and t2.num like concat('%',#{params.equipmentNum},'%')
        </if>
        <if test="params.maintenanceType != null and params.maintenanceType != ''">
            and t1.maintenance_type = #{params.maintenanceType}
        </if>
        ORDER BY t1.create_time desc
    </select>
@@ -75,7 +78,7 @@
        left join sys_depart t4 on t2.use_id = t4.id
        left join mom_base_team t5 on t2.team_id = t5.id
        left join (select * from v_sys_dict where dict_code = 'assign_mode') t6 on t1.assign_mode = t6.item_value
        where t1.del_flag = 0 and t1.type = #{params.type} and t2.equipment_importance_id in ('A','B','C')
        where t1.del_flag = 0 and t1.type = #{params.type} and t2.equipment_importance_id in ('A','B','C') and t2.technology_status in ('qualified','limitedUse')
        <if test="params.useId != null and params.useId != ''">
            and t2.use_id = #{params.useId}
        </if>
@@ -90,6 +93,9 @@
        </if>
        <if test="params.equipmentNum != null and params.equipmentNum != ''">
            and t2.num like concat('%',#{params.equipmentNum},'%')
        </if>
        <if test="params.maintenanceType != null and params.maintenanceType != ''">
            and t1.maintenance_type = #{params.maintenanceType}
        </if>
        ORDER BY t1.create_time desc
    </select>
@@ -122,12 +128,16 @@
            t1.lose_efficacy_time as loseEfficacyTime,
            t1.approval_status as approvalStatus,
            t8.item_text as approvalStatusName,
            t1.maintenance_type as maintenanceType,
            t9.item_text as maintenanceTypeName,
            t1.audit_feedback as auditFeedback,
            t1.approval_feedback as approvalFeedback,
            t1.write_person as writePerson,
            t1.audit_person as auditPerson,
            t1.approval_person as approvalPerson,
            t1.lose_efficacy_person as loseEfficacyPerson
            t1.lose_efficacy_person as loseEfficacyPerson,
            t1.maintenance_standard_uda1 as maintenanceStandardUda1,
            t1.maintenance_standard_uda2 as maintenanceStandardUda2
        FROM
            mom_eam_maintenance_standard t1
        LEFT JOIN mom_eam_equipment t2 ON t1.equipment_id = t2.id
@@ -137,6 +147,7 @@
        left join (select * from v_sys_dict where dict_code = 'assign_mode') t6 on t1.assign_mode = t6.item_value
        left join sys_depart t7 on t2.use_id = t7.id
        left join (select * from v_sys_dict where dict_code = 'approval_status') t8 on t1.approval_status = t8.item_value
        left join (select * from v_sys_dict where dict_code = 'maintenance_type') t9 on t1.maintenance_type = t9.item_value
        where t1.del_flag = 0 and t1.type = #{params.type}
        <if test="params.num != null and params.num != ''">
            and t1.num like concat('%',#{params.num},'%')
@@ -150,6 +161,15 @@
        <if test="params.equipmentNum != null and params.equipmentNum != ''">
            and t2.num like concat('%',#{params.equipmentNum},'%')
        </if>
        <if test="params.maintenanceType != null and params.maintenanceType != ''">
            and t1.maintenance_type = #{params.maintenanceType}
        </if>
        <if test="params.workCenterIds != null">
            and t2.work_center_id in
            <foreach collection="params.workCenterIds" open="(" separator="," close=")" item="workCenterId">
                #{workCenterId}
            </foreach>
        </if>
        ORDER BY t1.create_time desc
    </select>
</mapper>