2024-11-22 17:41:27 +08:00
|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
|
|
<!DOCTYPE mapper
|
|
|
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
|
<mapper namespace="com.bonus.material.book.mapper.BookCarMapper">
|
|
|
|
|
|
|
|
|
|
<insert id="addBookCarDetail">
|
2024-11-23 17:15:01 +08:00
|
|
|
insert into book_car_detail(ma_id, order_status, order_company, creater, create_time)
|
|
|
|
|
values(#{maId}, 0, #{orderCompany}, #{creater}, now())
|
2024-11-22 17:41:27 +08:00
|
|
|
</insert>
|
2024-11-23 17:15:01 +08:00
|
|
|
|
|
|
|
|
<select id="getBookCarDetails" resultType="com.bonus.material.device.domain.vo.DevInfoVo">
|
2024-11-22 17:41:27 +08:00
|
|
|
SELECT
|
2024-11-23 17:15:01 +08:00
|
|
|
d.ma_id as maId,
|
|
|
|
|
d.code as code,
|
|
|
|
|
d.device_name as deviceName,
|
|
|
|
|
d.device_weight as deviceWeight,
|
|
|
|
|
d.type_id as typeId,
|
|
|
|
|
d.ma_status as maStatus,
|
|
|
|
|
d.brand as brand,
|
|
|
|
|
d.model_name as modelName,
|
|
|
|
|
mt.type_name as typeName,
|
|
|
|
|
d.production_date as productionDate,
|
|
|
|
|
d.working_hours as workingHours,
|
|
|
|
|
d.serial_number as serialNumber,
|
|
|
|
|
d.day_lease_price as dayLeasePrice,
|
|
|
|
|
d.person as person,
|
|
|
|
|
d.person_phone as personPhone,
|
|
|
|
|
c.company_name as companyName,
|
|
|
|
|
c.company_id as companyId,
|
|
|
|
|
c.operate_address as operateAddress,
|
|
|
|
|
d.create_time as createTime
|
|
|
|
|
FROM ma_dev_info d
|
|
|
|
|
LEFT JOIN bm_company_info c ON d.own_co = c.company_id
|
|
|
|
|
LEFT JOIN book_car_detail bcd ON d.ma_id = bcd.ma_id
|
|
|
|
|
LEFT JOIN ma_type mt ON d.type_id = mt.type_id and mt.del_flag = '0'
|
|
|
|
|
where d.is_active = '1' and bcd.order_status = '0'
|
2024-11-22 17:41:27 +08:00
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
</mapper>
|