|
@@ -72,74 +72,4 @@
|
|
</if>
|
|
</if>
|
|
</where>
|
|
</where>
|
|
</select>
|
|
</select>
|
|
- <select id="list" resultType="com.qmth.sop.business.bean.result.TBDeviceDeliveryResult">
|
|
|
|
- SELECT
|
|
|
|
- tbdd.id,
|
|
|
|
- tbs.name AS serviceName,
|
|
|
|
- tbdd.crm_no AS crmNo,
|
|
|
|
- tbdd.usage_type AS usageType,
|
|
|
|
- tbdd.delivery_type AS deliveryType,
|
|
|
|
- ss.name AS supplierName,
|
|
|
|
- sd.device_code AS deviceNo,
|
|
|
|
- sd.serial_no AS serialNo,
|
|
|
|
- sd.brand,
|
|
|
|
- sd.model,
|
|
|
|
- tbdd.mailing_address AS mailingAddress,
|
|
|
|
- tbdd.consignee,
|
|
|
|
- tbdd.consignee_phone AS consigneePhone,
|
|
|
|
- tbdd.express_no AS expressNo,
|
|
|
|
- tbdd.express_photo_path AS expressPhotoPath,
|
|
|
|
- tbdd.status,
|
|
|
|
- tbdd.deliver_time AS deliverTime,
|
|
|
|
- su.real_name AS deliverUserName,
|
|
|
|
- tbdd.receive_time AS receiveTime
|
|
|
|
- FROM
|
|
|
|
- t_b_device_delivery tbdd
|
|
|
|
- LEFT JOIN
|
|
|
|
- t_b_crm tbc ON tbc.crm_no = tbdd.crm_no
|
|
|
|
- LEFT JOIN
|
|
|
|
- t_b_service tbs ON tbc.service_id = tbs.id
|
|
|
|
- LEFT JOIN
|
|
|
|
- sys_supplier ss ON ss.id = tbdd.supplier_id
|
|
|
|
- LEFT JOIN
|
|
|
|
- sys_device sd ON sd.serial_no = tbdd.serial_no
|
|
|
|
- LEFT JOIN
|
|
|
|
- sys_user su ON su.id = tbdd.deliver_user_id
|
|
|
|
- <where>
|
|
|
|
- AND tbdd.enable = 1
|
|
|
|
- <if test="serviceId != null and serviceId != ''">
|
|
|
|
- AND tbdd.service_id = #{serviceId}
|
|
|
|
- </if>
|
|
|
|
- <if test="usageType != null and usageType != ''">
|
|
|
|
- AND tbdd.usage_type = #{usageType}
|
|
|
|
- </if>
|
|
|
|
- <if test="crmNo != null and crmNo != ''">
|
|
|
|
- AND tbdd.crm_no = #{crmNo}
|
|
|
|
- </if>
|
|
|
|
- <if test="status != null and status != ''">
|
|
|
|
- AND tbdd.status = #{status}
|
|
|
|
- </if>
|
|
|
|
- <if test="deliverUserId != null">
|
|
|
|
- AND tbdd.deliver_user_id = #{deliverUserId}
|
|
|
|
- </if>
|
|
|
|
- <if test="deliverStartTime != null">
|
|
|
|
- AND tbdd.deliver_time <![CDATA[ >= ]]> #{deliverStartTime}
|
|
|
|
- </if>
|
|
|
|
- <if test="deliverEndTime != null">
|
|
|
|
- AND tbdd.deliver_time <![CDATA[ <= ]]> #{deliverEndTime}
|
|
|
|
- </if>
|
|
|
|
- <if test="serialNo != null and serialNo != ''">
|
|
|
|
- AND tbdd.serial_no = #{serialNo}
|
|
|
|
- </if>
|
|
|
|
- <if test="supplierId != null">
|
|
|
|
- AND tbdd.supplier_id = #{supplierId}
|
|
|
|
- </if>
|
|
|
|
- <if test="receiveStartTime != null and receiveStartTime != ''">
|
|
|
|
- AND tbdd.receive_time <![CDATA[ >= ]]> #{receiveStartTime}
|
|
|
|
- </if>
|
|
|
|
- <if test="receiveEndTime != null and receiveEndTime != ''">
|
|
|
|
- AND tbdd.receive_time <![CDATA[ <= ]]> #{receiveEndTime}
|
|
|
|
- </if>
|
|
|
|
- </where>
|
|
|
|
- </select>
|
|
|
|
</mapper>
|
|
</mapper>
|