select relation_device_detail_id,relation_device_id,device_name,device_model,iot_no,remarks, (CASE device_type WHEN '1' THEN '压力表' WHEN '2' THEN '流量计' end) as device_type
select relation_device_detail_id,detection_medium,relation_device_id,device_name,device_model,iot_no,remarks, (CASE device_type WHEN '1' THEN '压力表' WHEN '2' THEN '流量计' WHEN '3' THEN '探测器' end) as device_type
from t_relation_device_detail_info where is_del='0' and relation_device_id is null
<iftest="deviceName != null and deviceName != ''"> and device_name like concat('%', #{deviceName}, '%')</if>
<iftest="deviceModel != null and deviceModel != ''"> and device_model like concat('%', #{deviceModel}, '%')</if>
...
...
@@ -184,7 +185,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select relation_device_detail_id,relation_device_id,device_name,device_model,iot_no,remarks, (CASE device_type WHEN '1' THEN '压力表' WHEN '2' THEN '流量计' end) as device_type
select relation_device_detail_id,detection_medium,relation_device_id,device_name,device_model,iot_no,remarks, (CASE device_type WHEN '1' THEN '压力表' WHEN '2' THEN '流量计' WHEN '3' THEN '探测器' end) as device_type
from t_relation_device_detail_info where relation_device_id=#{id} and relation_device_type=#{relationDeviceType}
<iftest="deviceName != null and deviceName != ''"> and device_name like concat('%', #{deviceName}, '%')</if>
<iftest="deviceNum != null and deviceNum != ''"> and device_num like concat('%', #{deviceNum}, '%')</if>
<iftest="standardConditionAccumulation != null "> and standard_condition_accumulation = #{standardConditionAccumulation}</if>
<iftest="workingConditionAccumulation != null "> and working_condition_accumulation = #{workingConditionAccumulation}</if>
<iftest="backingStandardConditionAccumulation != null "> and backing_standard_condition_accumulation = #{backingStandardConditionAccumulation}</if>
<iftest="residualQuantity != null "> and residual_quantity = #{residualQuantity}</if>
<iftest="standardConditionFlow != null "> and standard_condition_flow = #{standardConditionFlow}</if>
<iftest="workingConditionFlow != null "> and working_condition_flow = #{workingConditionFlow}</if>
<iftest="temperature != null "> and temperature = #{temperature}</if>
<iftest="pressure != null "> and pressure = #{pressure}</if>
<iftest="reportTime != null "> and report_time = #{reportTime}</if>
<iftest="communicationStatus != null and communicationStatus != ''"> and communication_status = #{communicationStatus}</if>
<iftest="deviceStatus != null and deviceStatus != ''"> and device_status = #{deviceStatus}</if>
<iftest="beyondEnterpriseId != null "> and beyond_enterprise_id = #{beyondEnterpriseId}</if>
<iftest="beyondEnterpriseName != null and beyondEnterpriseName != ''"> and beyond_enterprise_name like concat('%', #{beyondEnterpriseName}, '%')</if>
<iftest="isDel != null and isDel != ''"> and is_del = #{isDel}</if>
<iftest="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
<iftest="deviceName != null and deviceName != ''"> and report.device_name like concat('%', #{deviceName}, '%')</if>
<iftest="deviceNum != null and deviceNum != ''"> and report.device_num like concat('%', #{deviceNum}, '%')</if>
<iftest="standardConditionAccumulation != null "> and report.standard_condition_accumulation = #{standardConditionAccumulation}</if>
<iftest="workingConditionAccumulation != null "> and report.working_condition_accumulation = #{workingConditionAccumulation}</if>
<iftest="backingStandardConditionAccumulation != null "> and report.backing_standard_condition_accumulation = #{backingStandardConditionAccumulation}</if>
<iftest="residualQuantity != null "> and report.residual_quantity = #{residualQuantity}</if>
<iftest="standardConditionFlow != null "> and report.standard_condition_flow = #{standardConditionFlow}</if>
<iftest="workingConditionFlow != null "> and report.working_condition_flow = #{workingConditionFlow}</if>
<iftest="temperature != null "> and report.temperature = #{temperature}</if>
<iftest="pressure != null "> and report.pressure = #{pressure}</if>
<iftest="reportTime != null "> and report.report_time = #{reportTime}</if>
<iftest="communicationStatus != null and communicationStatus != ''"> and report.communication_status = #{communicationStatus}</if>
<iftest="deviceStatus != null and deviceStatus != ''"> and report.device_status = #{deviceStatus}</if>
<iftest="beyondEnterpriseId != null "> and report.beyond_enterprise_id = #{beyondEnterpriseId}</if>
<iftest="beyondEnterpriseName != null and beyondEnterpriseName != ''"> and report.beyond_enterprise_name like concat('%', #{beyondEnterpriseName}, '%')</if>
<iftest="isDel != null and isDel != ''"> and report.is_del = #{isDel}</if>
<iftest="remarks != null and remarks != ''"> and report.remarks = #{remarks}</if>
<iftest="deviceType != null and deviceType != ''">AND detail.device_type = #{deviceType}</if>