|
|
@ -127,21 +127,21 @@ |
|
|
|
bvcf.certificateStateValue, |
|
|
|
bvcf.carModel, |
|
|
|
bvm.modelName AS modelNameQuan, |
|
|
|
bvm.`brandName` AS vehModelBrandName, |
|
|
|
bvm.brandName AS vehModelBrandName, |
|
|
|
bvc.guidedPrice, |
|
|
|
bv.manDate |
|
|
|
FROM |
|
|
|
base_vehicle bv |
|
|
|
LEFT JOIN base_vehicle_model bvm |
|
|
|
ON bv.`modelSid` = bvm.`sid` |
|
|
|
ON bv.modelSid = bvm.sid |
|
|
|
LEFT JOIN base_model_config bmc |
|
|
|
ON bv.`modelConfigSid` = bmc.`sid` |
|
|
|
ON bv.modelConfigSid = bmc.sid |
|
|
|
LEFT JOIN base_vehicle_certificate bvcf |
|
|
|
ON bv.`sid` = bvcf.`vehicleSid` |
|
|
|
ON bv.sid = bvcf.vehicleSid |
|
|
|
LEFT JOIN base_vehmodel_config bvc |
|
|
|
ON bvc.modelSid = bv.modelSid |
|
|
|
AND bvc.useOrgSid = bv.useOrgSid |
|
|
|
AND bvc.configurationItemsSid=bv.`modelConfigSid` |
|
|
|
AND bvc.configurationItemsSid=bv.modelConfigSid |
|
|
|
<where> |
|
|
|
${ew.sqlSegment} |
|
|
|
</where> |
|
|
@ -487,28 +487,28 @@ |
|
|
|
<!--配置Sid--> |
|
|
|
bv.modelConfigSid AS configSid |
|
|
|
FROM base_vehicle bv |
|
|
|
LEFT JOIN base_vehicle_model bvm ON bv.`modelSid` = bvm.`sid` |
|
|
|
LEFT JOIN base_model_config bmc ON bv.modelConfigSid = bmc.`sid` |
|
|
|
LEFT JOIN base_vehicle_model bvm ON bv.modelSid = bvm.sid |
|
|
|
LEFT JOIN base_model_config bmc ON bv.modelConfigSid = bmc.sid |
|
|
|
${ew.customSqlSegment} |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="selectExiCarConfig" resultType="com.yxt.anrui.base.api.basevehicle.ExiCarConfigDetailVo"> |
|
|
|
SELECT bvm.`brandName`, |
|
|
|
bvm.`vehicleTypeValue`, |
|
|
|
bvm.`productLineValue`, |
|
|
|
bvm.`driveFormValue`, |
|
|
|
bvm.`powerValue`, |
|
|
|
bvm.`vehicleVersionValue`, |
|
|
|
bvm.`fuelTypeValue`, |
|
|
|
SELECT bvm.brandName, |
|
|
|
bvm.vehicleTypeValue, |
|
|
|
bvm.productLineValue, |
|
|
|
bvm.driveFormValue, |
|
|
|
bvm.powerValue, |
|
|
|
bvm.vehicleVersionValue, |
|
|
|
bvm.fuelTypeValue, |
|
|
|
bvm.tranCaseTypeValue, |
|
|
|
bvm.`gearboxTypeValue`, |
|
|
|
bvm.`marketSegmentsValue`, |
|
|
|
bvm.`engineTypeValue`, |
|
|
|
bvm.`announcementModel`, |
|
|
|
bvm.`specifications`, |
|
|
|
bvm.gearboxTypeValue, |
|
|
|
bvm.marketSegmentsValue, |
|
|
|
bvm.engineTypeValue, |
|
|
|
bvm.announcementModel, |
|
|
|
bvm.specifications, |
|
|
|
bmc.packingCase, |
|
|
|
bvm.`department`, |
|
|
|
bvm.`insideCode`, |
|
|
|
bvm.department, |
|
|
|
bvm.insideCode, |
|
|
|
bmc.carColor, |
|
|
|
bmc.specification, |
|
|
|
bmc.baffleModel, |
|
|
@ -548,34 +548,34 @@ |
|
|
|
bvm.carBrand as brandSid, |
|
|
|
bvm.vehicleTypeCode, |
|
|
|
bmc.configCode, |
|
|
|
concat_ws('、', bvm.`vehicleVersionValue`, bvm.`fuelTypeValue`, bvm.`gearboxTypeValue`, |
|
|
|
bvm.`marketSegmentsValue`, bvm.`engineTypeValue`, bvm.`specifications`, |
|
|
|
bvm.`department`) as vehModelInfor |
|
|
|
concat_ws('、', bvm.vehicleVersionValue, bvm.fuelTypeValue, bvm.gearboxTypeValue, |
|
|
|
bvm.marketSegmentsValue, bvm.engineTypeValue, bvm.specifications, |
|
|
|
bvm.department) as vehModelInfor |
|
|
|
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} LIMIT 1 |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="selectExiCarConfigByVehModelConfigSid" |
|
|
|
resultType="com.yxt.anrui.base.api.basevehicle.ExiCarConfigDetailVo"> |
|
|
|
SELECT bvm.`brandName`, |
|
|
|
bvm.`vehicleTypeValue`, |
|
|
|
bvm.`productLineValue`, |
|
|
|
bvm.`driveFormValue`, |
|
|
|
bvm.`powerValue`, |
|
|
|
bvm.`vehicleVersionValue`, |
|
|
|
bvm.`fuelTypeValue`, |
|
|
|
SELECT bvm.brandName, |
|
|
|
bvm.vehicleTypeValue, |
|
|
|
bvm.productLineValue, |
|
|
|
bvm.driveFormValue, |
|
|
|
bvm.powerValue, |
|
|
|
bvm.vehicleVersionValue, |
|
|
|
bvm.fuelTypeValue, |
|
|
|
bvm.tranCaseTypeValue, |
|
|
|
bvm.`gearboxTypeValue`, |
|
|
|
bvm.`marketSegmentsValue`, |
|
|
|
bvm.`engineTypeValue`, |
|
|
|
bvm.`announcementModel`, |
|
|
|
bvm.`specifications`, |
|
|
|
bvm.gearboxTypeValue, |
|
|
|
bvm.marketSegmentsValue, |
|
|
|
bvm.engineTypeValue, |
|
|
|
bvm.announcementModel, |
|
|
|
bvm.specifications, |
|
|
|
bmc.packingCase, |
|
|
|
bvm.`department`, |
|
|
|
bvm.`insideCode`, |
|
|
|
bvm.department, |
|
|
|
bvm.insideCode, |
|
|
|
bmc.carColor, |
|
|
|
bmc.specification, |
|
|
|
bmc.baffleModel, |
|
|
@ -615,12 +615,12 @@ |
|
|
|
bvm.carBrand as brandSid, |
|
|
|
bvm.vehicleTypeCode, |
|
|
|
bmc.configCode, |
|
|
|
concat_ws('、', bvm.`vehicleVersionValue`, bvm.`fuelTypeValue`, bvm.`gearboxTypeValue`, |
|
|
|
bvm.`marketSegmentsValue`, bvm.`engineTypeValue`, bvm.`specifications`, |
|
|
|
bvm.`department`) as vehModelInfor |
|
|
|
concat_ws('、', bvm.vehicleVersionValue, bvm.fuelTypeValue, bvm.gearboxTypeValue, |
|
|
|
bvm.marketSegmentsValue, bvm.engineTypeValue, bvm.specifications, |
|
|
|
bvm.department) as vehModelInfor |
|
|
|
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.sid = #{vehModelConfigSid} LIMIT 1 |
|
|
|
</select> |
|
|
|
|
|
|
@ -644,8 +644,8 @@ |
|
|
|
<!--销售指导价--> |
|
|
|
<!--bv.guidedPrice--> |
|
|
|
FROM base_vehicle bv |
|
|
|
LEFT JOIN base_vehicle_model bvm ON bv.`modelSid` = bvm.`sid` |
|
|
|
LEFT JOIN base_model_config bmc ON bv.modelConfigSid = bmc.`sid` |
|
|
|
LEFT JOIN base_vehicle_model bvm ON bv.modelSid = bvm.sid |
|
|
|
LEFT JOIN base_model_config bmc ON bv.modelConfigSid = bmc.sid |
|
|
|
WHERE bv.sid = #{sid} |
|
|
|
</select> |
|
|
|
|
|
|
@ -686,8 +686,8 @@ |
|
|
|
<!--配置Sid--> |
|
|
|
bv.modelConfigSid AS configSid |
|
|
|
FROM base_vehicle bv |
|
|
|
LEFT JOIN base_vehicle_model bvm ON bv.`modelSid` = bvm.`sid` |
|
|
|
LEFT JOIN base_model_config bmc ON bv.modelConfigSid = bmc.`sid` |
|
|
|
LEFT JOIN base_vehicle_model bvm ON bv.modelSid = bvm.sid |
|
|
|
LEFT JOIN base_model_config bmc ON bv.modelConfigSid = bmc.sid |
|
|
|
${ew.customSqlSegment} |
|
|
|
ORDER BY |
|
|
|
bv.priceDate desc |
|
|
@ -761,7 +761,7 @@ |
|
|
|
resultType="com.yxt.anrui.base.api.basevehicle.AppCurrentCarDetailConfigVo"> |
|
|
|
SELECT convert(bvc.guidedPrice / 10000, decimal (10, 2)) AS price, |
|
|
|
bvc.guidedPrice as prices, |
|
|
|
bvc.priceValidity AS `date`, |
|
|
|
bvc.priceValidity AS date, |
|
|
|
bvm.vehicleAlias AS model, |
|
|
|
bvm.brandName AS brand, |
|
|
|
bvm.carBrand AS brandSid, |
|
|
@ -852,8 +852,8 @@ |
|
|
|
bmc.configName, |
|
|
|
DATE_FORMAT(bv.priceDate, '%Y-%m-%d') as priceDate |
|
|
|
FROM base_vehicle bv |
|
|
|
LEFT JOIN base_vehicle_model bvm ON bv.`modelSid` = bvm.`sid` |
|
|
|
LEFT JOIN base_model_config bmc ON bv.modelConfigSid = bmc.`sid` |
|
|
|
LEFT JOIN base_vehicle_model bvm ON bv.modelSid = bvm.sid |
|
|
|
LEFT JOIN base_model_config bmc ON bv.modelConfigSid = bmc.sid |
|
|
|
${ew.customSqlSegment} |
|
|
|
</select> |
|
|
|
|
|
|
@ -945,8 +945,8 @@ |
|
|
|
bvm.gearboxTypeValue, |
|
|
|
bvm.emissionStandardValue |
|
|
|
FROM base_vehicle bv |
|
|
|
LEFT JOIN base_vehicle_model bvm ON bv.`modelSid` = bvm.`sid` |
|
|
|
LEFT JOIN base_model_config bmc ON bv.modelConfigSid = bmc.`sid` |
|
|
|
LEFT JOIN base_vehicle_model bvm ON bv.modelSid = bvm.sid |
|
|
|
LEFT JOIN base_model_config bmc ON bv.modelConfigSid = bmc.sid |
|
|
|
<where> |
|
|
|
${ew.sqlSegment} |
|
|
|
</where> |
|
|
@ -1008,7 +1008,7 @@ |
|
|
|
<select id="getModelNowCarList" resultType="com.yxt.anrui.base.api.basevehicle.AppBaseVinNowCarVo"> |
|
|
|
SELECT bv.sid, |
|
|
|
vinNo AS vin, |
|
|
|
vehicleStateValue AS `state`, |
|
|
|
vehicleStateValue AS state, |
|
|
|
carColor AS color, |
|
|
|
locationName AS address |
|
|
|
FROM base_vehicle bv |
|
|
@ -1054,13 +1054,13 @@ |
|
|
|
LEFT JOIN base_vehmodelconfig_label bvcl |
|
|
|
ON bvcl.labelSid = bvl.sid |
|
|
|
LEFT JOIN base_vehmodel_config bvc |
|
|
|
ON bvc.`sid` = bvcl.`vehmodelConfigSid` |
|
|
|
ON bvc.sid = bvcl.vehmodelConfigSid |
|
|
|
WHERE bvc.modelSid = bvm.sid |
|
|
|
AND bvc.`configurationItemsSid` = bmc.sid |
|
|
|
AND bvc.`useOrgSid` = #{useOrg}) AS labelName |
|
|
|
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` |
|
|
|
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} |
|
|
@ -1072,8 +1072,8 @@ |
|
|
|
convert(bvc.guidedPrice / 10000, decimal (10, 2)) 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} |
|
|
@ -1081,11 +1081,11 @@ |
|
|
|
<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.orderDate AS date, |
|
|
|
bvo.expectLaunchDate AS forecastDate, |
|
|
|
bvo.launchDate AS `upDate`, |
|
|
|
bvo.launchDate AS upDate, |
|
|
|
bvo.offlineDate AS downDate, |
|
|
|
bvad.quantity as `number` |
|
|
|
bvad.quantity as number |
|
|
|
FROM bus_vehicle_order bvo |
|
|
|
left join bus_vehicle_apply_detail bvad on bvo.purchaseApplyMediumModelSid = bvad.sid |
|
|
|
<where> |
|
|
@ -1178,9 +1178,9 @@ |
|
|
|
SELECT |
|
|
|
bv.sid as vehSid, |
|
|
|
bv.vinNo, |
|
|
|
bvm.`carBrand` AS brandSid, |
|
|
|
bvm.`brandName`, |
|
|
|
bvm.`vehicleAlias`, |
|
|
|
bvm.carBrand AS brandSid, |
|
|
|
bvm.brandName, |
|
|
|
bvm.vehicleAlias, |
|
|
|
bvm.announcementModel AS noticeModel, |
|
|
|
bvm.sid as vehModelSid, |
|
|
|
bv.priceDate, |
|
|
@ -1189,7 +1189,7 @@ |
|
|
|
bv.vehicleStateValue |
|
|
|
FROM base_vehicle bv |
|
|
|
LEFT JOIN base_vehicle_model bvm |
|
|
|
ON bv.`modelSid` = bvm.`sid` |
|
|
|
ON bv.modelSid = bvm.sid |
|
|
|
<where> |
|
|
|
${ew.sqlSegment} |
|
|
|
</where> |
|
|
@ -1275,10 +1275,10 @@ |
|
|
|
DATE_FORMAT(bv.priceDate, '%Y-%m-%d') as priceDate, |
|
|
|
bv.costPrice as priced |
|
|
|
FROM base_vehicle bv |
|
|
|
LEFT JOIN base_vehicle_model bvm ON bv.`modelSid` = bvm.`sid` |
|
|
|
LEFT JOIN base_model_config bmc ON bv.modelConfigSid = bmc.`sid` |
|
|
|
LEFT JOIN base_vehicle_model bvm ON bv.modelSid = bvm.sid |
|
|
|
LEFT JOIN base_model_config bmc ON bv.modelConfigSid = bmc.sid |
|
|
|
LEFT JOIN base_vehmodel_config bvc |
|
|
|
ON bvc.`modelSid` = bvm.`sid` AND bvc.`configurationItemsSid` = bmc.`sid` AND bvc.useOrgSid = bv.createOrgSid |
|
|
|
ON bvc.modelSid = bvm.sid AND bvc.configurationItemsSid = bmc.sid AND bvc.useOrgSid = bv.createOrgSid |
|
|
|
<where> |
|
|
|
${ew.sqlSegment} |
|
|
|
</where> |
|
|
@ -1313,23 +1313,23 @@ |
|
|
|
<select id="vehicleRebatePageList" resultType="com.yxt.anrui.base.api.basevehicle.BaseVehicleRebateVo"> |
|
|
|
SELECT |
|
|
|
bv.sid, |
|
|
|
bvm.`carBrand`, |
|
|
|
bvm.carBrand, |
|
|
|
bvm.brandName, |
|
|
|
bv.purchaseSystemSid, |
|
|
|
bv.purchaseSystemName, |
|
|
|
bvm.vehicleAlias, |
|
|
|
bvm.sid AS modelSid, |
|
|
|
bv.vinNo, |
|
|
|
bv.`freight`, |
|
|
|
bv.`costPrice`, |
|
|
|
bv.freight, |
|
|
|
bv.costPrice, |
|
|
|
IFNULL(bs.costPrice, 0) AS topAmount |
|
|
|
FROM |
|
|
|
base_vehicle bv |
|
|
|
LEFT JOIN base_vehicle_model bvm |
|
|
|
ON bv.`modelSid` = bvm.`sid` |
|
|
|
ON bv.modelSid = bvm.sid |
|
|
|
AND bv.createOrgSid = bvm.createOrg |
|
|
|
LEFT JOIN base_vehinstall bs |
|
|
|
ON RIGHT(bv.`vinNo`, 8) = RIGHT(bs.`vinNo`, 8) |
|
|
|
ON RIGHT(bv.vinNo, 8) = RIGHT(bs.vinNo, 8) |
|
|
|
<where> |
|
|
|
${ew.sqlSegment} |
|
|
|
</where> |
|
|
@ -1342,21 +1342,21 @@ |
|
|
|
bmc.carColor color, |
|
|
|
bv.locationName location, |
|
|
|
bv.sid as vehSid, |
|
|
|
bv.`modelSid`, |
|
|
|
bv.`modelName`, |
|
|
|
bv.`vinNo`, |
|
|
|
bv.`costPrice`, |
|
|
|
bv.`priceDate`, |
|
|
|
bv.`salesDate`, |
|
|
|
bv.`solidDate` |
|
|
|
bv.modelSid, |
|
|
|
bv.modelName, |
|
|
|
bv.vinNo, |
|
|
|
bv.costPrice, |
|
|
|
bv.priceDate, |
|
|
|
bv.salesDate, |
|
|
|
bv.solidDate |
|
|
|
FROM |
|
|
|
base_vehicle bv |
|
|
|
LEFT JOIN base_vehicle_model bvm |
|
|
|
ON bv.`modelSid` = bvm.`sid` |
|
|
|
AND bv.`createOrgSid` = bvm.`createOrg` |
|
|
|
ON bv.modelSid = bvm.sid |
|
|
|
AND bv.createOrgSid = bvm.createOrg |
|
|
|
LEFT JOIN base_vehicle_brand bvb |
|
|
|
ON bvm.`carBrand` = bvb.`sid` |
|
|
|
LEFT JOIN base_model_config bmc ON bv.modelConfigSid = bmc.`sid` |
|
|
|
ON bvm.carBrand = bvb.sid |
|
|
|
LEFT JOIN base_model_config bmc ON bv.modelConfigSid = bmc.sid |
|
|
|
<where> |
|
|
|
${ew.sqlSegment} |
|
|
|
</where> |
|
|
@ -1368,21 +1368,21 @@ |
|
|
|
bv.locationName location, |
|
|
|
ssv.vehSid, |
|
|
|
ssv.sid as specialRebateVehSid, |
|
|
|
bv.`modelSid`, |
|
|
|
bv.`modelName`, |
|
|
|
ssv.`vinNo`, |
|
|
|
bv.`costPrice`, |
|
|
|
bv.`priceDate`, |
|
|
|
bv.`salesDate`, |
|
|
|
bv.`solidDate` |
|
|
|
FROM anrui_scm.`scm_specialrebate_vehs` ssv |
|
|
|
LEFT JOIN anrui_base.`base_vehicle` bv |
|
|
|
ON ssv.`vehSid` = bv.`sid` |
|
|
|
bv.modelSid, |
|
|
|
bv.modelName, |
|
|
|
ssv.vinNo, |
|
|
|
bv.costPrice, |
|
|
|
bv.priceDate, |
|
|
|
bv.salesDate, |
|
|
|
bv.solidDate |
|
|
|
FROM anrui_scm.scm_specialrebate_vehs ssv |
|
|
|
LEFT JOIN anrui_base.base_vehicle bv |
|
|
|
ON ssv.vehSid = bv.sid |
|
|
|
LEFT JOIN base_vehicle_model bvm |
|
|
|
ON bv.`modelSid` = bvm.`sid` |
|
|
|
AND bv.`createOrgSid` = bvm.`createOrg` |
|
|
|
LEFT JOIN base_model_config bmc ON bv.modelConfigSid = bmc.`sid` |
|
|
|
WHERE ssv.`specialRebateSid` = #{specialRebateSid} |
|
|
|
ON bv.modelSid = bvm.sid |
|
|
|
AND bv.createOrgSid = bvm.createOrg |
|
|
|
LEFT JOIN base_model_config bmc ON bv.modelConfigSid = bmc.sid |
|
|
|
WHERE ssv.specialRebateSid = #{specialRebateSid} |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="getInspectionVinList" resultType="com.yxt.anrui.base.api.basevehicle.InspectionVinVo"> |
|
|
@ -1468,9 +1468,9 @@ |
|
|
|
FROM |
|
|
|
base_vehicle bv |
|
|
|
LEFT JOIN base_vehicle_model bvm |
|
|
|
ON bv.`modelSid` = bvm.`sid` |
|
|
|
ON bv.modelSid = bvm.sid |
|
|
|
LEFT JOIN base_model_config bmc |
|
|
|
ON bv.modelConfigSid = bmc.`sid` |
|
|
|
ON bv.modelConfigSid = bmc.sid |
|
|
|
LEFT JOIN base_vehinstall bvs |
|
|
|
ON bvs.vinNo = bv.vinNo |
|
|
|
LEFT JOIN base_vehinstallmodel bvsm |
|
|
@ -1500,7 +1500,7 @@ |
|
|
|
<!--存放地点--> |
|
|
|
bv.locationName as location |
|
|
|
FROM base_vehicle bv |
|
|
|
LEFT JOIN base_model_config bmc ON bv.modelConfigSid = bmc.`sid` |
|
|
|
LEFT JOIN base_model_config bmc ON bv.modelConfigSid = bmc.sid |
|
|
|
${ew.customSqlSegment} |
|
|
|
</select> |
|
|
|
|
|
|
@ -1523,12 +1523,12 @@ |
|
|
|
<!--存放地点--> |
|
|
|
bv.locationName |
|
|
|
FROM base_vehicle bv |
|
|
|
LEFT JOIN base_vehicle_model bvm ON bv.`modelSid` = bvm.`sid` |
|
|
|
LEFT JOIN base_model_config bmc ON bv.modelConfigSid = bmc.`sid` |
|
|
|
LEFT JOIN base_vehicle_model bvm ON bv.modelSid = bvm.sid |
|
|
|
LEFT JOIN base_model_config bmc ON bv.modelConfigSid = bmc.sid |
|
|
|
LEFT JOIN base_vehmodel_config bvc |
|
|
|
ON bvc.`modelSid` = bvm.`sid` AND bvc.`configurationItemsSid` = bmc.`sid` AND bvc.useOrgSid = bv.createOrgSid |
|
|
|
ON bvc.modelSid = bvm.sid AND bvc.configurationItemsSid = bmc.sid AND bvc.useOrgSid = bv.createOrgSid |
|
|
|
LEFT JOIN base_vehicle_brand bvb |
|
|
|
ON bvm.`carBrand` = bvb.`sid` |
|
|
|
ON bvm.carBrand = bvb.sid |
|
|
|
<where> |
|
|
|
${ew.sqlSegment} |
|
|
|
</where> |
|
|
@ -1544,10 +1544,10 @@ |
|
|
|
bv.salesDate, |
|
|
|
bv.solidDate |
|
|
|
FROM base_vehicle bv |
|
|
|
LEFT JOIN base_vehicle_model bvm ON bv.`modelSid` = bvm.`sid` |
|
|
|
LEFT JOIN base_model_config bmc ON bv.modelConfigSid = bmc.`sid` |
|
|
|
LEFT JOIN base_vehicle_model bvm ON bv.modelSid = bvm.sid |
|
|
|
LEFT JOIN base_model_config bmc ON bv.modelConfigSid = bmc.sid |
|
|
|
LEFT JOIN base_vehmodel_config bvc |
|
|
|
ON bvc.`modelSid` = bvm.`sid` AND bvc.`configurationItemsSid` = bmc.`sid` AND bvc.useOrgSid = bv.createOrgSid |
|
|
|
ON bvc.modelSid = bvm.sid AND bvc.configurationItemsSid = bmc.sid AND bvc.useOrgSid = bv.createOrgSid |
|
|
|
<where> |
|
|
|
(bv.solidDate IS NULL AND bv.salesDate IS NOT NULL OR bv.salesDate IS NOT NULL) AND |
|
|
|
${ew.sqlSegment} |
|
|
@ -1567,8 +1567,8 @@ |
|
|
|
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.`useOrgSid` = #{useOrgSid}) AS labelName, |
|
|
|
ON bvc.sid = bvcl.vehmodelConfigSid |
|
|
|
WHERE bvc.modelSid = bvm.sid AND bvc.useOrgSid = #{useOrgSid}) AS labelName, |
|
|
|
(SELECT if(MIN(bvc.guidedPrice) = MAX(bvc.guidedPrice), convert(MAX(bvc.guidedPrice)/10000,decimal(10,2)), |
|
|
|
CONCAT(convert(MIN(bvc.guidedPrice)/10000,decimal(10,2)), '-', |
|
|
|
convert(MAX(bvc.guidedPrice)/10000,decimal(10,2)))) |
|
|
@ -1607,8 +1607,8 @@ |
|
|
|
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.`useOrgSid` = #{useOrgSid}) like concat('%',#{lable},'%')) |
|
|
|
ON bvc.sid = bvcl.vehmodelConfigSid |
|
|
|
WHERE bvc.modelSid = bvm.sid AND bvc.useOrgSid = #{useOrgSid}) like concat('%',#{lable},'%')) |
|
|
|
</if> |
|
|
|
and length(bvc.guidedPrice)>0 |
|
|
|
</where> |
|
|
@ -1618,7 +1618,7 @@ |
|
|
|
<select id="getStockModelNowCarList" resultType="com.yxt.anrui.base.api.basevehicle.AppBaseVinNowCarVo"> |
|
|
|
SELECT bv.sid, |
|
|
|
bv.vinNo AS vin, |
|
|
|
bv.vehicleStateValue AS `state`, |
|
|
|
bv.vehicleStateValue AS state, |
|
|
|
bmc.carColor AS color, |
|
|
|
bv.locationName AS address, |
|
|
|
bd.salesPolicy AS label, |
|
|
@ -1641,13 +1641,13 @@ |
|
|
|
LEFT JOIN base_vehmodelconfig_label bvcl |
|
|
|
ON bvcl.labelSid = bvl.sid |
|
|
|
LEFT JOIN base_vehmodel_config bvc |
|
|
|
ON bvc.`sid` = bvcl.`vehmodelConfigSid` |
|
|
|
ON bvc.sid = bvcl.vehmodelConfigSid |
|
|
|
WHERE bvc.modelSid = bvm.sid |
|
|
|
AND bvc.`configurationItemsSid` = bmc.sid |
|
|
|
AND bvc.`useOrgSid` = #{useOrg}) AS labelName |
|
|
|
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` |
|
|
|
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} |
|
|
@ -1778,16 +1778,16 @@ |
|
|
|
bvcf.certificateStateValue, |
|
|
|
bvcf.carModel, |
|
|
|
bvm.modelName AS modelNameQuan, |
|
|
|
bvm.`brandName` AS vehModelBrandName, |
|
|
|
bvm.brandName AS vehModelBrandName, |
|
|
|
(SELECT bbc.guidedPrice FROM base_vehmodel_config bbc WHERE bbc.modelSid = bv.modelSid |
|
|
|
AND bbc.useOrgSid =bv.useOrgSid |
|
|
|
AND bmc.sid=bbc.configurationItemsSid ) AS guidedPrice |
|
|
|
FROM |
|
|
|
base_vehicle bv |
|
|
|
LEFT JOIN base_vehicle_model bvm ON bv.`modelSid` = bvm.`sid` |
|
|
|
LEFT JOIN base_model_config bmc ON bv.`modelConfigSid` = bmc.`sid` |
|
|
|
LEFT JOIN base_vehicle_certificate bvcf ON bv.`sid` = bvcf.`vehicleSid` |
|
|
|
LEFT JOIN base_vehmodel_config bvc ON bvm.`sid` = bvc.`modelSid` |
|
|
|
LEFT JOIN base_vehicle_model bvm ON bv.modelSid = bvm.sid |
|
|
|
LEFT JOIN base_model_config bmc ON bv.modelConfigSid = bmc.sid |
|
|
|
LEFT JOIN base_vehicle_certificate bvcf ON bv.sid = bvcf.vehicleSid |
|
|
|
LEFT JOIN base_vehmodel_config bvc ON bvm.sid = bvc.modelSid |
|
|
|
LEFT JOIN anrui_portal.sys_organization so ON bv.createOrgSid = so.sid |
|
|
|
LEFT JOIN anrui_scm.scm_warehouse sw ON bv.location = sw.sid |
|
|
|
<where> |
|
|
@ -1798,19 +1798,19 @@ |
|
|
|
<select id="vehicleQKKPPageList" resultType="com.yxt.anrui.base.api.basevehicle.BaseVehicleQKKPVo"> |
|
|
|
SELECT |
|
|
|
bsov.linkNo AS vinNo, |
|
|
|
bsov.`linkSid` AS vehSid, |
|
|
|
bso.`customerName`, |
|
|
|
bso.`contractNo`, |
|
|
|
bsov.linkSid AS vehSid, |
|
|
|
bso.customerName, |
|
|
|
bso.contractNo, |
|
|
|
bvc.certificateState, |
|
|
|
bvc.`certificateStateValue` |
|
|
|
bvc.certificateStateValue |
|
|
|
FROM |
|
|
|
anrui_buscenter.bus_sales_order_vehicle bsov |
|
|
|
JOIN anrui_buscenter.bus_sales_order bso |
|
|
|
ON bsov.`salesOrderSid` = bso.`sid` |
|
|
|
ON bsov.salesOrderSid = bso.sid |
|
|
|
JOIN base_vehicle_state bs |
|
|
|
ON bsov.sid = bs.busSid |
|
|
|
JOIN base_vehicle_certificate bvc |
|
|
|
ON bsov.`linkSid` = bvc.`vehicleSid` |
|
|
|
ON bsov.linkSid = bvc.vehicleSid |
|
|
|
<where> |
|
|
|
${ew.sqlSegment} |
|
|
|
AND bs.finSourceKey = '2' |
|
|
|