| | |
| | | <if test="dto.name!=null and dto.name!=''"> |
| | | and i.`equipment_name` like concat('%',#{dto.name},'%') |
| | | </if> |
| | | <if test="dto.name!=null and dto.name!=''"> |
| | | and i.measurement_unit like concat('%',#{dto.unit},'%') |
| | | <if test="dto.unit!=null and dto.unit!=''"> |
| | | and m.measurement_unit like concat('%',#{dto.unit},'%') |
| | | </if> |
| | | </select> |
| | | |
| | |
| | | from metering_plan |
| | | where 1=1 |
| | | <if test="dto.plannedOrderNumber!=null and dto.plannedOrderNumber!=''"> |
| | | and planned_order_number=#{plannedOrderNumber} |
| | | and planned_order_number like concat('%',#{dto.plannedOrderNumber},'%') |
| | | </if> |
| | | LIMIT #{limitPage.start},#{limitPage.end}) p |
| | | LEFT JOIN metrical_information i ON p.id = i.plan |
| | |
| | | <select id="getTotal" resultType="java.util.Map"> |
| | | select count(id) num from metering_plan where 1=1 |
| | | <if test="dto.plannedOrderNumber!=null and dto.plannedOrderNumber!=''"> |
| | | and planned_order_number=#{plannedOrderNumber} |
| | | and planned_order_number like concat('%',#{dto.plannedOrderNumber},'%') |
| | | </if> |
| | | </select> |
| | | <select id="getPlanMeasureInstrument" |
| | |
| | | im.imName imName, |
| | | im.create_time imCreateTime, |
| | | im.measurement_unit imUnit, |
| | | im.`code` imCode |
| | | im.`code` imCode, |
| | | im.id imId, |
| | | im.uncertainty uncertainty , |
| | | im.performance_index performanceIndex , |
| | | im.remarks remarks |
| | | FROM metering_plan m |
| | | LEFT JOIN `user` u ON m.create_Person = u.id |
| | | LEFT JOIN ( |
| | | SELECT i.equipment_code, |
| | | i.equipment_name, |
| | | i.measuring_range, |
| | | im.id, |
| | | i.term_validity, |
| | | im.uncertainty, |
| | | im.performance_index, |
| | | im.remarks, |
| | | im.result, |
| | | im.end_date, |
| | | (SELECT NAME FROM USER WHERE id = im.user_id) imName, |
| | |
| | | (SELECT NAME FROM USER WHERE id = im.user_id) imName, |
| | | im.create_time imCreateTime, |
| | | im.measurement_unit imUnit, |
| | | im.`code` imCode |
| | | im.`code` imCode, |
| | | im.id imId, |
| | | im.uncertainty uncertainty , |
| | | im.performance_index performanceIndex , |
| | | im.remarks remarks |
| | | FROM metrical_information im, |
| | | metering_plan m, |
| | | instrument i |
| | |
| | | <result property="measuringRange" column="measuringRange"/> |
| | | <result property="equipmentName" column="equipmentName"/> |
| | | <result property="equipmentCode" column="equipmentCode"/> |
| | | <result property="imId" column="imId"/> |
| | | <result property="performanceIndex" column="performanceIndex"/> |
| | | <result property="uncertainty" column="uncertainty"/> |
| | | <result property="remarks" column="remarks"/> |
| | | </resultMap> |
| | | |
| | | <resultMap id="measureInsAndPlanMap" type="meteringPlanAndInfoAndIns"> |
| | |
| | | <result property="measuringRange" column="measuringRange"/> |
| | | <result property="equipmentName" column="equipmentName"/> |
| | | <result property="equipmentCode" column="equipmentCode"/> |
| | | <result property="imId" column="imId"/> |
| | | <result property="performanceIndex" column="performanceIndex"/> |
| | | <result property="uncertainty" column="uncertainty"/> |
| | | <result property="remarks" column="remarks"/> |
| | | </collection> |
| | | </resultMap> |
| | | |