|
|
@ -697,7 +697,7 @@ |
|
|
|
<select id="getAppModelConfig" |
|
|
|
resultType="com.yxt.anrui.base.api.basevehicle.AppCurrentCarDetailConfigVo"> |
|
|
|
SELECT convert(bvc.guidedPrice / 10000, decimal (10, 2)) AS price, |
|
|
|
bvc.guidedPrice as prices, |
|
|
|
bvc.guidedPrice as prices, |
|
|
|
bvc.priceValidity AS `date`, |
|
|
|
bvm.vehicleAlias AS model, |
|
|
|
bvm.brandName AS brand, |
|
|
@ -921,7 +921,7 @@ |
|
|
|
as isFictitious |
|
|
|
from base_vehicle bv |
|
|
|
<where> |
|
|
|
${ew.sqlSegment} and bv.lockedState = '01' AND ( |
|
|
|
${ew.sqlSegment} and bv.lockedState = '01' AND ( |
|
|
|
bv.vehicleStateValue = '库存' |
|
|
|
or bv.vehicleStateValue = '在途' |
|
|
|
or bv.vehicleStateValue = '调入' |
|
|
@ -932,7 +932,6 @@ |
|
|
|
</where> |
|
|
|
</if> |
|
|
|
order by isFictitious desc |
|
|
|
|
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="fetchVehicle" resultType="com.yxt.anrui.base.api.basevehicle.BaseVehicleVo"> |
|
|
@ -952,7 +951,7 @@ |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="selectVehicleCount" resultType="java.lang.Integer"> |
|
|
|
select sum(sum1) from( select count(*) as sum1 |
|
|
|
select sum(sum1) from( select count(*) as sum1 |
|
|
|
from base_vehicle bv |
|
|
|
<where> |
|
|
|
${ew.sqlSegment} and bv.lockedState = '03' AND ( |
|
|
@ -975,7 +974,8 @@ |
|
|
|
#{item} |
|
|
|
</foreach> |
|
|
|
</where> |
|
|
|
</if>) as total |
|
|
|
</if> |
|
|
|
) as total |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="selectByModelSidAndConfigSid" |
|
|
@ -983,12 +983,15 @@ |
|
|
|
SELECT bvm.vehicleAlias AS modelName, |
|
|
|
convert(bc.guidedPrice / 10000, decimal (10, 2)) AS price, |
|
|
|
bmc.configName AS commonlyConfig, |
|
|
|
(SELECT GROUP_CONCAT(bvl.labelName) FROM base_vehmodel_label bvl |
|
|
|
LEFT JOIN base_vehmodelconfig_label bvcl |
|
|
|
ON bvcl.labelSid = bvl.sid |
|
|
|
LEFT JOIN base_vehmodel_config bvc |
|
|
|
ON bvc.`sid` = bvcl.`vehmodelConfigSid` |
|
|
|
WHERE bvc.modelSid = bvm.sid AND bvc.`configurationItemsSid` = bmc.sid AND bvc.`useOrgSid` = #{useOrg}) AS labelName |
|
|
|
(SELECT GROUP_CONCAT(bvl.labelName) |
|
|
|
FROM base_vehmodel_label bvl |
|
|
|
LEFT JOIN base_vehmodelconfig_label bvcl |
|
|
|
ON bvcl.labelSid = bvl.sid |
|
|
|
LEFT JOIN base_vehmodel_config bvc |
|
|
|
ON bvc.`sid` = bvcl.`vehmodelConfigSid` |
|
|
|
WHERE bvc.modelSid = bvm.sid |
|
|
|
AND bvc.`configurationItemsSid` = bmc.sid |
|
|
|
AND bvc.`useOrgSid` = #{useOrg}) AS labelName |
|
|
|
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` |
|
|
@ -1044,11 +1047,11 @@ |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="selectAppListOne" resultType="com.yxt.anrui.base.api.basevehicle.app.AppBaseVehicleOrderVo"> |
|
|
|
select bv.vinNo vin, |
|
|
|
select bv.vinNo vin, |
|
|
|
bv.locationName address, |
|
|
|
bv.sid carSid, |
|
|
|
bv.sid carSid, |
|
|
|
if(bv.lockedState = '01', 1, 0) |
|
|
|
as isFictitious |
|
|
|
as isFictitious |
|
|
|
from base_vehicle bv |
|
|
|
where bv.modelSid = #{modelSid} |
|
|
|
and bv.modelConfigSid = #{configSid} |
|
|
@ -1061,7 +1064,7 @@ |
|
|
|
) |
|
|
|
<if test="list != null and list.size() != 0"> |
|
|
|
and bv.sid in |
|
|
|
<foreach collection="list" item="item" index="index" open="(" separator="," close=")"> |
|
|
|
<foreach collection="list" item="item" index="index" open="(" separator="," close=")"> |
|
|
|
#{item} |
|
|
|
</foreach> |
|
|
|
</if> |
|
|
@ -1512,10 +1515,10 @@ |
|
|
|
SELECT bv.sid, |
|
|
|
bv.vinNo AS vin, |
|
|
|
bv.vehicleStateValue AS `state`, |
|
|
|
bmc.carColor AS color, |
|
|
|
bmc.carColor AS color, |
|
|
|
bv.locationName AS address, |
|
|
|
bd.salesPolicy AS label, |
|
|
|
bdv.guidedQKPrice AS promotionPrice |
|
|
|
bd.salesPolicy AS label, |
|
|
|
bdv.guidedQKPrice AS promotionPrice |
|
|
|
FROM base_vehicle bv |
|
|
|
LEFT JOIN base_model_config bmc ON bmc.sid = bv.modelConfigSid |
|
|
|
LEFT JOIN base_discountpackage_veh bdv |
|
|
@ -1529,12 +1532,15 @@ |
|
|
|
select bvm.vehicleAlias AS modelName, |
|
|
|
convert(bvc.guidedPrice / 10000, decimal (10, 2)) AS price, |
|
|
|
bmc.configName AS commonlyConfig, |
|
|
|
(SELECT GROUP_CONCAT(bvl.labelName) FROM base_vehmodel_label bvl |
|
|
|
LEFT JOIN base_vehmodelconfig_label bvcl |
|
|
|
ON bvcl.labelSid = bvl.sid |
|
|
|
LEFT JOIN base_vehmodel_config bvc |
|
|
|
ON bvc.`sid` = bvcl.`vehmodelConfigSid` |
|
|
|
WHERE bvc.modelSid = bvm.sid AND bvc.`configurationItemsSid` = bmc.sid AND bvc.`useOrgSid` = #{useOrg}) AS labelName |
|
|
|
(SELECT GROUP_CONCAT(bvl.labelName) |
|
|
|
FROM base_vehmodel_label bvl |
|
|
|
LEFT JOIN base_vehmodelconfig_label bvcl |
|
|
|
ON bvcl.labelSid = bvl.sid |
|
|
|
LEFT JOIN base_vehmodel_config bvc |
|
|
|
ON bvc.`sid` = bvcl.`vehmodelConfigSid` |
|
|
|
WHERE bvc.modelSid = bvm.sid |
|
|
|
AND bvc.`configurationItemsSid` = bmc.sid |
|
|
|
AND bvc.`useOrgSid` = #{useOrg}) AS labelName |
|
|
|
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` |
|
|
@ -1542,4 +1548,11 @@ |
|
|
|
AND bvc.configurationItemsSid = #{configSid} |
|
|
|
AND bvc.useOrgSid = #{useOrg} |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="selectByfMaterialID" resultType="java.lang.String"> |
|
|
|
SELECT orderingNo |
|
|
|
FROM base_vehicle |
|
|
|
WHERE vinNo like concat('%', #{fMaterialID}, '%')) |
|
|
|
LIMIT 1 |
|
|
|
</select> |
|
|
|
</mapper> |