|
|
@ -441,6 +441,7 @@ |
|
|
|
WHERE bv.modelSid = #{modelSid} |
|
|
|
AND bv.modelConfigSid = #{configSid} |
|
|
|
AND bv.lockedState = #{state} |
|
|
|
and bv.useOrg = #{orgSid} |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="selExistingCarPageList" |
|
|
@ -661,21 +662,21 @@ |
|
|
|
<!--根据车架号查询现车详情--> |
|
|
|
<select id="getPurchaseDetails" resultType="com.yxt.anrui.base.api.basevehicle.AppPurchaseDetailsVo"> |
|
|
|
select bv.sid, |
|
|
|
bv.vinNo, |
|
|
|
bv.vehicleStateValue, |
|
|
|
bv.location, |
|
|
|
bv.priceDate, |
|
|
|
bv.guidedPrice |
|
|
|
bv.vinNo, |
|
|
|
bv.vehicleStateValue, |
|
|
|
bv.location, |
|
|
|
bv.priceDate, |
|
|
|
bv.guidedPrice |
|
|
|
from base_vehicle bv |
|
|
|
where bv.vinNo = #{vinNo} |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="selectVo" resultType="com.yxt.anrui.base.api.basevehicle.PcBaseVehicleOrderVo"> |
|
|
|
select bv.vinNo linkNo, |
|
|
|
bv.location linkText, |
|
|
|
bv.sid linkSid, |
|
|
|
if(bv.lockedState = 1, 1, 0) |
|
|
|
as isFictitious |
|
|
|
select bv.vinNo linkNo, |
|
|
|
bv.location linkText, |
|
|
|
bv.sid linkSid, |
|
|
|
if(bv.lockedState = 1, 1, 0) |
|
|
|
as isFictitious |
|
|
|
from base_vehicle bv |
|
|
|
<where> |
|
|
|
${ew.sqlSegment} |
|
|
@ -689,70 +690,70 @@ |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="getModelNowCarList" resultType="com.yxt.anrui.base.api.basevehicle.AppBaseVinNowCarVo"> |
|
|
|
SELECT vinNo AS vin, |
|
|
|
vehicleStateValue AS `state`, |
|
|
|
carColor AS color, |
|
|
|
locationName AS address |
|
|
|
SELECT vinNo AS vin, |
|
|
|
vehicleStateValue AS `state`, |
|
|
|
carColor AS color, |
|
|
|
locationName AS address |
|
|
|
FROM base_vehicle bv |
|
|
|
LEFT JOIN base_model_config bmc ON bmc.sid = bv.modelConfigSid |
|
|
|
${ew.customSqlSegment} |
|
|
|
LEFT JOIN base_model_config bmc ON bmc.sid = bv.modelConfigSid |
|
|
|
${ew.customSqlSegment} |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="selectVehicleCount" resultType="java.lang.Integer"> |
|
|
|
select count(*) |
|
|
|
from base_vehicle bv |
|
|
|
${ew.customSqlSegment} |
|
|
|
${ew.customSqlSegment} |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="selectByModelSidAndConfigSid" |
|
|
|
resultType="com.yxt.anrui.base.api.basevehicle.AppBaseConfigNowCarVo"> |
|
|
|
SELECT bvm.vehicleAlias AS modelName, |
|
|
|
bc.guidedPrice AS price, |
|
|
|
bmc.configName AS commonlyConfig |
|
|
|
bc.guidedPrice AS price, |
|
|
|
bmc.configName AS commonlyConfig |
|
|
|
FROM base_vehmodel_config bc |
|
|
|
LEFT JOIN base_vehicle_model bvm ON bc.`modelSid` = bvm.`sid` |
|
|
|
LEFT JOIN base_model_config bmc ON bc.configurationItemsSid = bmc.`sid` |
|
|
|
LEFT JOIN base_vehicle_model bvm ON bc.`modelSid` = bvm.`sid` |
|
|
|
LEFT JOIN base_model_config bmc ON bc.configurationItemsSid = bmc.`sid` |
|
|
|
where bc.modelSid = #{modelSid} |
|
|
|
AND bc.configurationItemsSid = #{configSid} |
|
|
|
AND bc.useOrgSid = #{useOrg} |
|
|
|
AND bc.configurationItemsSid = #{configSid} |
|
|
|
AND bc.useOrgSid = #{useOrg} |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="getModelSidAndConfigSid" |
|
|
|
resultType="com.yxt.anrui.base.api.basevehicle.AppBaseConfigOrderCarVo"> |
|
|
|
select bvm.vehicleAlias AS modelName, |
|
|
|
bvc.guidedPrice AS price, |
|
|
|
bmc.configName AS commonlyConfig |
|
|
|
bvc.guidedPrice AS price, |
|
|
|
bmc.configName AS commonlyConfig |
|
|
|
from base_vehmodel_config bvc |
|
|
|
LEFT JOIN base_vehicle_model bvm ON bvc.`modelSid` = bvm.`sid` |
|
|
|
LEFT JOIN base_model_config bmc ON bvc.configurationItemsSid = bmc.`sid` |
|
|
|
LEFT JOIN base_vehicle_model bvm ON bvc.`modelSid` = bvm.`sid` |
|
|
|
LEFT JOIN base_model_config bmc ON bvc.configurationItemsSid = bmc.`sid` |
|
|
|
where bvc.modelSid = #{modelSid} |
|
|
|
AND bvc.configurationItemsSid = #{configSid} |
|
|
|
AND bvc.useOrgSid = #{useOrg} |
|
|
|
AND bvc.configurationItemsSid = #{configSid} |
|
|
|
AND bvc.useOrgSid = #{useOrg} |
|
|
|
</select> |
|
|
|
<select id="getModelOrderCarList" resultType="com.yxt.anrui.base.api.basevehicle.AppBaseNowProduceCarVo"> |
|
|
|
SELECT bvo.orderNo AS orderId, |
|
|
|
bvo.orderStatus AS state, |
|
|
|
bvo.orderDate AS `date`, |
|
|
|
bvo.expectLaunchDate AS forecastDate, |
|
|
|
bvo.launchDate AS `upDate`, |
|
|
|
bvo.offlineDate AS downDate, |
|
|
|
bvad.quantity as `number` |
|
|
|
SELECT bvo.orderNo AS orderId, |
|
|
|
bvo.orderStatus AS state, |
|
|
|
bvo.orderDate AS `date`, |
|
|
|
bvo.expectLaunchDate AS forecastDate, |
|
|
|
bvo.launchDate AS `upDate`, |
|
|
|
bvo.offlineDate AS downDate, |
|
|
|
bvad.quantity as `number` |
|
|
|
FROM bus_vehicle_order bvo |
|
|
|
left join bus_vehicle_apply_detail bvad on bvo.purchaseApplyMediumModelSid = bvad.sid |
|
|
|
left join bus_vehicle_apply_detail bvad on bvo.purchaseApplyMediumModelSid = bvad.sid |
|
|
|
<where> |
|
|
|
${ew.sqlSegment} |
|
|
|
</where> |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="selectAppList" resultType="com.yxt.anrui.base.api.basevehicle.app.AppBaseVehicleOrderVo"> |
|
|
|
select bv.vinNo vin, |
|
|
|
bv.locationName address, |
|
|
|
bv.sid carSid, |
|
|
|
if(bv.lockedState = 1, 1, 0) |
|
|
|
as isFictitious |
|
|
|
select bv.vinNo vin, |
|
|
|
bv.locationName address, |
|
|
|
bv.sid carSid, |
|
|
|
if(bv.lockedState = 1, 1, 0) |
|
|
|
as isFictitious |
|
|
|
from base_vehicle bv |
|
|
|
where bv.modelSid = #{modelSid} |
|
|
|
and bv.modelConfigSid = #{configSid} |
|
|
|
and bv.modelConfigSid = #{configSid} |
|
|
|
order by isFictitious desc |
|
|
|
</select> |
|
|
|
|
|
|
@ -760,7 +761,8 @@ |
|
|
|
select filePath |
|
|
|
from base_vehicle_appendix |
|
|
|
where linkSid = #{vehicleSid} |
|
|
|
and attachType = '0001' limit 1 |
|
|
|
and attachType = '0001' |
|
|
|
limit 1 |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="getVinByWarehouseSid" resultType="com.yxt.anrui.base.api.basevehicle.AppScmWarehouseVinVo"> |
|
|
|