|
|
@ -2,18 +2,18 @@ |
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
|
|
<mapper namespace="com.yxt.anrui.buscenter.biz.bussalesvehicle.BusSalesVehicleMapper"> |
|
|
|
<select id="selectPageVo" resultType="com.yxt.anrui.buscenter.api.bussalesvehicle.BusSalesVehicleVo"> |
|
|
|
select bv.useOrgName, |
|
|
|
bvoa.orgName deptName, |
|
|
|
bvoa.staffName, |
|
|
|
bvoa.customerName, |
|
|
|
bvoa.contractNo, |
|
|
|
bv.modelName, |
|
|
|
bv.vinNo, |
|
|
|
bvoa.saleTypeValue saleType, |
|
|
|
DATE_FORMAT(bvoa.saleDate, '%Y-%m-%d') as saleDate, |
|
|
|
if(length(bh.closingDate) > 0, '已交付', '未交付') |
|
|
|
as handoverState, |
|
|
|
DATE_FORMAT(bh.closingDate, '%Y-%m-%d') as handoverDate |
|
|
|
select distinct bv.vinNo, |
|
|
|
bv.useOrgName, |
|
|
|
bvoa.orgName deptName, |
|
|
|
bvoa.staffName, |
|
|
|
bvoa.customerName, |
|
|
|
bvoa.contractNo, |
|
|
|
bv.modelName, |
|
|
|
bvoa.saleTypeValue saleType, |
|
|
|
DATE_FORMAT(bvoa.saleDate, '%Y-%m-%d') as saleDate, |
|
|
|
if(length(bh.closingDate) > 0, '已交付', '未交付') |
|
|
|
as handoverState, |
|
|
|
DATE_FORMAT(bh.closingDate, '%Y-%m-%d') as handoverDate |
|
|
|
from anrui_base.base_vehicle_out bvo |
|
|
|
left join anrui_base.base_vehicle_out_apply bvoa on bvoa.sid = bvo.mainSid |
|
|
|
left join anrui_base.base_vehicle bv on bvo.vinSid = bv.sid |
|
|
@ -81,11 +81,11 @@ |
|
|
|
<if test="state != null and state != ''"> |
|
|
|
<if test='state == "1"'> |
|
|
|
and length(bh.closingDate) |
|
|
|
>0 |
|
|
|
>0 |
|
|
|
</if> |
|
|
|
<if test='state == "0"'> |
|
|
|
and (bh.closingDate is null |
|
|
|
or length(bh.closingDate) =0) |
|
|
|
or length(bh.closingDate) =0) |
|
|
|
</if> |
|
|
|
</if> |
|
|
|
</where> |
|
|
|