shiyunteng
2025-04-08 608f0d2c05d86510d546a362e44c10feb601b3f1
platformx-device-biz/src/main/resources/mapper/DeviceRepairMapper.xml
@@ -6,7 +6,7 @@
  <resultMap id="deviceRepairMap" type="com.by4cloud.platformx.device.entity.DeviceScrap">
        <id property="id" column="id"/>
        <result property="compId" column="comp_id"/>
        <result property="deviceCoder" column="device_coder"/>
        <result property="deviceCode" column="device_code"/>
        <result property="deviceId" column="device_id"/>
        <result property="inventoryId" column="inventory_id"/>
        <result property="repairEndDate" column="repair_end_date"/>
@@ -19,4 +19,27 @@
        <result property="updateTime" column="update_time"/>
        <result property="delFlag" column="del_flag"/>
  </resultMap>
    <select id="pageNew" resultType="com.by4cloud.platformx.device.entity.vo.DeviceRepairPageVo">
      select
         dr.id,
         d.name deviceName,
         d.`number` deviceCode,
         dr.serial_no,
         dr.repair_start_date,
         dr.repair_end_date,
         dr.status
      from
         device_repair dr
      join device d on
         dr.device_id  = d.id
      where
         dr.del_flag='0'
      <if test="queryDTO.deviceName != null and queryDTO.deviceName !=''">
         and d.name like CONCAT('%', #{queryDTO.deviceName}, '%')
      </if>
      <if test="queryDTO.serialNo != null and queryDTO.serialNo !=''">
         and dr.serial_no like CONCAT('%', #{queryDTO.serialNo}, '%')
      </if>
      order by dr.create_time desc
   </select>
</mapper>