租金从ma_type中获取
This commit is contained in:
parent
edf110d40a
commit
fde308872d
|
|
@ -30,7 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
d.production_date as productionDate,
|
d.production_date as productionDate,
|
||||||
d.working_hours as workingHours,
|
d.working_hours as workingHours,
|
||||||
d.serial_number as serialNumber,
|
d.serial_number as serialNumber,
|
||||||
d.day_lease_price as dayLeasePrice,
|
mt.lease_price as dayLeasePrice,
|
||||||
d.person as person,
|
d.person as person,
|
||||||
d.person_phone as personPhone,
|
d.person_phone as personPhone,
|
||||||
c.company_name as companyName,
|
c.company_name as companyName,
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="productionDate" column="production_date" />
|
<result property="productionDate" column="production_date" />
|
||||||
<result property="workingHours" column="working_hours" />
|
<result property="workingHours" column="working_hours" />
|
||||||
<result property="serialNumber" column="serial_number" />
|
<result property="serialNumber" column="serial_number" />
|
||||||
<result property="monthLeasePrice" column="month_lease_price" />
|
|
||||||
<result property="dayLeasePrice" column="day_lease_price" />
|
<result property="dayLeasePrice" column="day_lease_price" />
|
||||||
<result property="picUrl" column="pic_url" />
|
<result property="picUrl" column="pic_url" />
|
||||||
<result property="jsMonthPrice" column="js_month_price" />
|
<result property="jsMonthPrice" column="js_month_price" />
|
||||||
|
|
@ -45,7 +44,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
|
||||||
<sql id="selectDevInfoVo">
|
<sql id="selectDevInfoVo">
|
||||||
select ma_id, device_name, device_weight, device_count, code, type_id, ma_status, lease_scope, location, province_id, city_id, area_id, brand, model_name, production_date, working_hours, serial_number,
|
select ma_id, device_name, device_weight, device_count, code, type_id, ma_status, lease_scope, location, province_id, city_id, area_id, brand, model_name, production_date, working_hours, serial_number,
|
||||||
month_lease_price, day_lease_price, pic_url, js_month_price, js_day_price, description, gps_code, own_co, create_time,
|
pic_url, js_month_price, js_day_price, description, gps_code, own_co, create_time,
|
||||||
creator, update_time, person, person_phone, update_by, specification, deposit, is_operator, is_active, update_time, update_by
|
creator, update_time, person, person_phone, update_by, specification, deposit, is_operator, is_active, update_time, update_by
|
||||||
from ma_dev_info
|
from ma_dev_info
|
||||||
</sql>
|
</sql>
|
||||||
|
|
@ -66,8 +65,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
d.production_date as productionDate,
|
d.production_date as productionDate,
|
||||||
d.working_hours as workingHours,
|
d.working_hours as workingHours,
|
||||||
d.serial_number as serialNumber,
|
d.serial_number as serialNumber,
|
||||||
d.month_lease_price as monthLeasePrice,
|
mt4.lease_price as dayLeasePrice,
|
||||||
d.day_lease_price as dayLeasePrice,
|
|
||||||
d.person as person,
|
d.person as person,
|
||||||
d.person_phone as personPhone,
|
d.person_phone as personPhone,
|
||||||
d.create_time as createTime,
|
d.create_time as createTime,
|
||||||
|
|
@ -129,7 +127,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</if>
|
</if>
|
||||||
<if test="serialNumber != null and serialNumber != ''"> and d.serial_number = #{serialNumber}</if>
|
<if test="serialNumber != null and serialNumber != ''"> and d.serial_number = #{serialNumber}</if>
|
||||||
<if test="dayLeasePriceMin != null and dayLeasePriceMax != null">
|
<if test="dayLeasePriceMin != null and dayLeasePriceMax != null">
|
||||||
and d.day_lease_price >= #{dayLeasePriceMin} and d.day_lease_price <= #{dayLeasePriceMax}
|
and mt4.lease_price >= #{dayLeasePriceMin} and mt4.lease_price <= #{dayLeasePriceMax}
|
||||||
</if>
|
</if>
|
||||||
<if test="description != null and description != ''"> and d.description = #{description}</if>
|
<if test="description != null and description != ''"> and d.description = #{description}</if>
|
||||||
<if test="gpsCode != null and gpsCode != ''"> and d.gps_code = #{gpsCode}</if>
|
<if test="gpsCode != null and gpsCode != ''"> and d.gps_code = #{gpsCode}</if>
|
||||||
|
|
@ -153,10 +151,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
order by
|
order by
|
||||||
d.is_active
|
d.is_active
|
||||||
<if test="dayLeasePriceOrderBy != null and dayLeasePriceOrderBy == 'ASC'">
|
<if test="dayLeasePriceOrderBy != null and dayLeasePriceOrderBy == 'ASC'">
|
||||||
,d.day_lease_price
|
,mt4.lease_price
|
||||||
</if>
|
</if>
|
||||||
<if test="dayLeasePriceOrderBy != null and dayLeasePriceOrderBy == 'DESC'">
|
<if test="dayLeasePriceOrderBy != null and dayLeasePriceOrderBy == 'DESC'">
|
||||||
,d.day_lease_price DESC
|
,mt4.lease_price DESC
|
||||||
</if>
|
</if>
|
||||||
<if test="updateTimeOrderBy != null and updateTimeOrderBy == 'ASC'">
|
<if test="updateTimeOrderBy != null and updateTimeOrderBy == 'ASC'">
|
||||||
,d.create_time
|
,d.create_time
|
||||||
|
|
@ -181,8 +179,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
d.production_date as productionDate,
|
d.production_date as productionDate,
|
||||||
d.working_hours as workingHours,
|
d.working_hours as workingHours,
|
||||||
d.serial_number as serialNumber,
|
d.serial_number as serialNumber,
|
||||||
d.month_lease_price as monthLeasePrice,
|
mt4.lease_price as dayLeasePrice,
|
||||||
d.day_lease_price as dayLeasePrice,
|
|
||||||
d.person as person,
|
d.person as person,
|
||||||
d.person_phone as personPhone,
|
d.person_phone as personPhone,
|
||||||
c.company_name as companyName,
|
c.company_name as companyName,
|
||||||
|
|
@ -228,8 +225,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
d.production_date as productionDate,
|
d.production_date as productionDate,
|
||||||
d.working_hours as workingHours,
|
d.working_hours as workingHours,
|
||||||
d.serial_number as serialNumber,
|
d.serial_number as serialNumber,
|
||||||
d.month_lease_price as monthLeasePrice,
|
mt4.lease_price as dayLeasePrice,
|
||||||
d.day_lease_price as dayLeasePrice,
|
|
||||||
d.person as person,
|
d.person as person,
|
||||||
d.person_phone as personPhone,
|
d.person_phone as personPhone,
|
||||||
c.company_id as companyId,
|
c.company_id as companyId,
|
||||||
|
|
@ -282,8 +278,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="productionDate != null and productionDate != ''">production_date,</if>
|
<if test="productionDate != null and productionDate != ''">production_date,</if>
|
||||||
<if test="workingHours != null and workingHours != ''">working_hours,</if>
|
<if test="workingHours != null and workingHours != ''">working_hours,</if>
|
||||||
<if test="serialNumber != null and serialNumber != ''">serial_number,</if>
|
<if test="serialNumber != null and serialNumber != ''">serial_number,</if>
|
||||||
<if test="monthLeasePrice != null and monthLeasePrice != ''">month_lease_price,</if>
|
|
||||||
<if test="dayLeasePrice != null and dayLeasePrice != ''">day_lease_price,</if>
|
|
||||||
<if test="picUrl != null and picUrl != ''">pic_url,</if>
|
<if test="picUrl != null and picUrl != ''">pic_url,</if>
|
||||||
<if test="jsMonthPrice != null and jsMonthPrice != ''">js_month_price,</if>
|
<if test="jsMonthPrice != null and jsMonthPrice != ''">js_month_price,</if>
|
||||||
<if test="jsDayPrice != null and jsDayPrice != ''">js_day_price,</if>
|
<if test="jsDayPrice != null and jsDayPrice != ''">js_day_price,</if>
|
||||||
|
|
@ -320,8 +314,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="productionDate != null and productionDate != ''">#{productionDate},</if>
|
<if test="productionDate != null and productionDate != ''">#{productionDate},</if>
|
||||||
<if test="workingHours != null and workingHours != ''">#{workingHours},</if>
|
<if test="workingHours != null and workingHours != ''">#{workingHours},</if>
|
||||||
<if test="serialNumber != null and serialNumber != ''">#{serialNumber},</if>
|
<if test="serialNumber != null and serialNumber != ''">#{serialNumber},</if>
|
||||||
<if test="monthLeasePrice != null and monthLeasePrice != ''">#{monthLeasePrice},</if>
|
|
||||||
<if test="dayLeasePrice != null and dayLeasePrice != ''">#{dayLeasePrice},</if>
|
|
||||||
<if test="picUrl != null and picUrl != ''">#{picUrl},</if>
|
<if test="picUrl != null and picUrl != ''">#{picUrl},</if>
|
||||||
<if test="jsMonthPrice != null and jsMonthPrice != ''">#{jsMonthPrice},</if>
|
<if test="jsMonthPrice != null and jsMonthPrice != ''">#{jsMonthPrice},</if>
|
||||||
<if test="jsDayPrice != null and jsDayPrice != ''">#{jsDayPrice},</if>
|
<if test="jsDayPrice != null and jsDayPrice != ''">#{jsDayPrice},</if>
|
||||||
|
|
@ -376,8 +368,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="productionDate != null">production_date = #{productionDate},</if>
|
<if test="productionDate != null">production_date = #{productionDate},</if>
|
||||||
<if test="workingHours != null">working_hours = #{workingHours},</if>
|
<if test="workingHours != null">working_hours = #{workingHours},</if>
|
||||||
<if test="serialNumber != null">serial_number = #{serialNumber},</if>
|
<if test="serialNumber != null">serial_number = #{serialNumber},</if>
|
||||||
<if test="monthLeasePrice != null">month_lease_price = #{monthLeasePrice},</if>
|
|
||||||
<if test="dayLeasePrice != null">day_lease_price = #{dayLeasePrice},</if>
|
|
||||||
<if test="picUrl != null">pic_url = #{picUrl},</if>
|
<if test="picUrl != null">pic_url = #{picUrl},</if>
|
||||||
<if test="jsMonthPrice != null">js_month_price = #{jsMonthPrice},</if>
|
<if test="jsMonthPrice != null">js_month_price = #{jsMonthPrice},</if>
|
||||||
<if test="jsDayPrice != null">js_day_price = #{jsDayPrice},</if>
|
<if test="jsDayPrice != null">js_day_price = #{jsDayPrice},</if>
|
||||||
|
|
@ -577,8 +567,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="productionDate != null and productionDate != ''">production_date,</if>
|
<if test="productionDate != null and productionDate != ''">production_date,</if>
|
||||||
<if test="workingHours != null and workingHours != ''">working_hours,</if>
|
<if test="workingHours != null and workingHours != ''">working_hours,</if>
|
||||||
<if test="serialNumber != null and serialNumber != ''">serial_number,</if>
|
<if test="serialNumber != null and serialNumber != ''">serial_number,</if>
|
||||||
<if test="monthLeasePrice != null and monthLeasePrice != ''">month_lease_price,</if>
|
|
||||||
<if test="dayLeasePrice != null and dayLeasePrice != ''">day_lease_price,</if>
|
|
||||||
<if test="picUrl != null and picUrl != ''">pic_url,</if>
|
<if test="picUrl != null and picUrl != ''">pic_url,</if>
|
||||||
<if test="jsMonthPrice != null and jsMonthPrice != ''">js_month_price,</if>
|
<if test="jsMonthPrice != null and jsMonthPrice != ''">js_month_price,</if>
|
||||||
<if test="jsDayPrice != null and jsDayPrice != ''">js_day_price,</if>
|
<if test="jsDayPrice != null and jsDayPrice != ''">js_day_price,</if>
|
||||||
|
|
@ -614,8 +602,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="productionDate != null and productionDate != ''">#{productionDate},</if>
|
<if test="productionDate != null and productionDate != ''">#{productionDate},</if>
|
||||||
<if test="workingHours != null and workingHours != ''">#{workingHours},</if>
|
<if test="workingHours != null and workingHours != ''">#{workingHours},</if>
|
||||||
<if test="serialNumber != null and serialNumber != ''">#{serialNumber},</if>
|
<if test="serialNumber != null and serialNumber != ''">#{serialNumber},</if>
|
||||||
<if test="monthLeasePrice != null and monthLeasePrice != ''">#{monthLeasePrice},</if>
|
|
||||||
<if test="dayLeasePrice != null and dayLeasePrice != ''">#{dayLeasePrice},</if>
|
|
||||||
<if test="picUrl != null and picUrl != ''">#{picUrl},</if>
|
<if test="picUrl != null and picUrl != ''">#{picUrl},</if>
|
||||||
<if test="jsMonthPrice != null and jsMonthPrice != ''">#{jsMonthPrice},</if>
|
<if test="jsMonthPrice != null and jsMonthPrice != ''">#{jsMonthPrice},</if>
|
||||||
<if test="jsDayPrice != null and jsDayPrice != ''">#{jsDayPrice},</if>
|
<if test="jsDayPrice != null and jsDayPrice != ''">#{jsDayPrice},</if>
|
||||||
|
|
|
||||||
|
|
@ -33,8 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
d.production_date as productionDate,
|
d.production_date as productionDate,
|
||||||
d.working_hours as workingHours,
|
d.working_hours as workingHours,
|
||||||
d.serial_number as serialNumber,
|
d.serial_number as serialNumber,
|
||||||
d.month_lease_price as monthLeasePrice,
|
mt.lease_price as dayLeasePrice,
|
||||||
d.day_lease_price as dayLeasePrice,
|
|
||||||
d.person as person,
|
d.person as person,
|
||||||
d.person_phone as personPhone,
|
d.person_phone as personPhone,
|
||||||
c.company_name as companyName,
|
c.company_name as companyName,
|
||||||
|
|
@ -45,6 +44,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
ma_hot_search h
|
ma_hot_search h
|
||||||
LEFT JOIN ma_dev_info d on d.ma_id = h.ma_id
|
LEFT JOIN ma_dev_info d on d.ma_id = h.ma_id
|
||||||
LEFT JOIN bm_company_info c ON d.own_co = c.company_id
|
LEFT JOIN bm_company_info c ON d.own_co = c.company_id
|
||||||
|
LEFT JOIN ma_type mt on mt.type_id = d.type_id
|
||||||
where
|
where
|
||||||
d.is_active='1'
|
d.is_active='1'
|
||||||
and d.ma_status = '2'
|
and d.ma_status = '2'
|
||||||
|
|
|
||||||
|
|
@ -125,7 +125,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
AND dept.companyName like concat('%',#{companyName},'%')
|
AND dept.companyName like concat('%',#{companyName},'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="lowerBound != null and lowerBound != '' and upperBound != null and upperBound != ''">
|
<if test="lowerBound != null and lowerBound != '' and upperBound != null and upperBound != ''">
|
||||||
AND mdi.day_lease_price BETWEEN #{lowerBound} AND #{upperBound}
|
AND mt.lease_price BETWEEN #{lowerBound} AND #{upperBound}
|
||||||
</if>
|
</if>
|
||||||
GROUP BY
|
GROUP BY
|
||||||
c.company_id,
|
c.company_id,
|
||||||
|
|
@ -138,7 +138,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<select id="selectOrderDetailsById" resultType="com.bonus.material.order.domain.OrderDetailDto">
|
<select id="selectOrderDetailsById" resultType="com.bonus.material.order.domain.OrderDetailDto">
|
||||||
SELECT
|
SELECT
|
||||||
mdi.device_name,
|
mdi.device_name,
|
||||||
mdi.day_lease_price,
|
mt.lease_price as dayLeasePrice,
|
||||||
hh.order_status,
|
hh.order_status,
|
||||||
hh.days,
|
hh.days,
|
||||||
bfi.url,
|
bfi.url,
|
||||||
|
|
@ -158,6 +158,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
LEFT JOIN ma_order_info moi ON hh.order_id = moi.order_id
|
LEFT JOIN ma_order_info moi ON hh.order_id = moi.order_id
|
||||||
LEFT JOIN ma_dev_info mdi ON hh.ma_id = mdi.ma_id
|
LEFT JOIN ma_dev_info mdi ON hh.ma_id = mdi.ma_id
|
||||||
LEFT JOIN bm_file_info bfi ON hh.ma_id = bfi.model_id
|
LEFT JOIN bm_file_info bfi ON hh.ma_id = bfi.model_id
|
||||||
|
left join ma_type mt ON mdi.type_id = mt.type_id
|
||||||
AND bfi.file_type = 0
|
AND bfi.file_type = 0
|
||||||
WHERE
|
WHERE
|
||||||
hh.id = #{id} limit 1
|
hh.id = #{id} limit 1
|
||||||
|
|
@ -206,7 +207,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<select id="selectOrderDetailsByOderId" resultType="com.bonus.material.order.domain.OrderDetailDto">
|
<select id="selectOrderDetailsByOderId" resultType="com.bonus.material.order.domain.OrderDetailDto">
|
||||||
SELECT
|
SELECT
|
||||||
mdi.device_name,
|
mdi.device_name,
|
||||||
mdi.day_lease_price,
|
mt.lease_price as dayLeasePrice,
|
||||||
hh.order_status,
|
hh.order_status,
|
||||||
hh.days,
|
hh.days,
|
||||||
bfi.url,
|
bfi.url,
|
||||||
|
|
@ -226,6 +227,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
LEFT JOIN ma_order_info moi ON hh.order_id = moi.order_id
|
LEFT JOIN ma_order_info moi ON hh.order_id = moi.order_id
|
||||||
LEFT JOIN ma_dev_info mdi ON hh.ma_id = mdi.ma_id
|
LEFT JOIN ma_dev_info mdi ON hh.ma_id = mdi.ma_id
|
||||||
LEFT JOIN bm_file_info bfi ON hh.ma_id = bfi.model_id
|
LEFT JOIN bm_file_info bfi ON hh.ma_id = bfi.model_id
|
||||||
|
LEFT JOIN ma_type mt ON mdi.type_id = mt.type_id
|
||||||
AND bfi.file_type = 0
|
AND bfi.file_type = 0
|
||||||
WHERE
|
WHERE
|
||||||
moi.order_id = #{orderId}
|
moi.order_id = #{orderId}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue