| | |
| | | <?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="com.ruoyi.requier.mapper.IncidentReportMapper"> |
| | | <mapper namespace="com.ruoyi.require.mapper.IncidentReportMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.requier.pojo.IncidentReport"> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.require.pojo.IncidentReport"> |
| | | <id column="id" property="id" /> |
| | | <result column="process_number" property="processNumber" /> |
| | | <result column="device_id" property="deviceId" /> |
| | |
| | | <result column="acceptance_audit_audit_opinion" property="acceptanceAuditAuditOpinion" /> |
| | | </resultMap> |
| | | |
| | | <resultMap id="IncidentReportAddDtoMap" type="com.ruoyi.requier.dto.IncidentReportAddDto" extends="BaseResultMap"> |
| | | <resultMap id="IncidentReportAddDtoMap" type="com.ruoyi.require.dto.IncidentReportAddDto" extends="BaseResultMap"> |
| | | <result column="device_name" property="deviceName" /> |
| | | <result column="management_number" property="managementNumber" /> |
| | | <result column="manufacturer" property="manufacturer" /> |
| | | <result column="specification_model" property="specificationModel" /> |
| | | <collection property="sparePartsConfirmationList" ofType="com.ruoyi.requier.pojo.IncidentSpareParts"> |
| | | <collection property="sparePartsConfirmationList" ofType="com.ruoyi.require.pojo.IncidentSpareParts"> |
| | | <id column="spare_parts_id" property="sparePartsId" /> |
| | | <result column="name" property="name" /> |
| | | <result column="number" property="number" /> |
| | | <result column="note" property="note" /> |
| | | <result column="incident_id" property="incidentId" /> |
| | | </collection> |
| | | <collection property="fileClassConfirmationList" ofType="com.ruoyi.requier.pojo.IncidentFile"> |
| | | <collection property="fileClassConfirmationList" ofType="com.ruoyi.require.pojo.IncidentFile"> |
| | | <id column="file_id" property="fileId" /> |
| | | <result column="expected_copies" property="expectedCopies" /> |
| | | <result column="actual_copies" property="actualCopies" /> |
| | | <result column="incident_id" property="incidentId" /> |
| | | </collection> |
| | | <collection property="installationAcceptanceRecordList" ofType="com.ruoyi.requier.pojo.IncidentInstall"> |
| | | <collection property="installationAcceptanceRecordList" ofType="com.ruoyi.require.pojo.IncidentInstall"> |
| | | <id column="install_id" property="installId" /> |
| | | <result column="installation_project" property="installationProject" /> |
| | | <result column="installation_situation" property="installationSituation" /> |
| | | <result column="installation_completed" property="installationCompleted" /> |
| | | <result column="incident_id" property="incidentId" /> |
| | | </collection> |
| | | <collection property="acceptanceCheckRecordList" ofType="com.ruoyi.requier.pojo.IncidentAcceptanceCheck"> |
| | | <collection property="acceptanceCheckRecordList" ofType="com.ruoyi.require.pojo.IncidentAcceptanceCheck"> |
| | | <id column="acceptance_check_id" property="acceptanceCheckId" /> |
| | | <result column="instrument_module" property="instrumentModule" /> |
| | | <result column="verification_parameter" property="verificationParameter" /> |
| | |
| | | </collection> |
| | | </resultMap> |
| | | |
| | | <select id="getByDeviceId" resultType="com.ruoyi.requier.dto.IncidentReportAddDto"> |
| | | <select id="getByDeviceId" resultType="com.ruoyi.require.dto.IncidentReportAddDto"> |
| | | select dir.*, d.device_name, d.management_number, u.name submitUser |
| | | from device_incident_report dir |
| | | left join device d on d.id = dir.device_id |
| | |
| | | where dir.id = #{id} |
| | | </select> |
| | | |
| | | <select id="incidentReportExport" resultType="com.ruoyi.requier.excel.IncidentReportExport"> |
| | | <select id="incidentReportExport" resultType="com.ruoyi.require.excel.IncidentReportExport"> |
| | | select dir.*, d.device_name, d.management_number, d.manufacturer, d.specification_model |
| | | from device_incident_report dir |
| | | left join device d on d.id = dir.device_id |