Browse Source

优化

master
dimengzhe 1 year ago
parent
commit
f3971523e5
  1. 28
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesvehicle/BusSalesVehicleMapper.xml

28
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesvehicle/BusSalesVehicleMapper.xml

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

Loading…
Cancel
Save