|
|
@ -4,23 +4,24 @@ |
|
|
|
<!--分页列表--> |
|
|
|
<select id="pagerList" resultType="com.yxt.anrui.base.api.basevehiclemodel.BaseVehicleModelVo"> |
|
|
|
SELECT bvm.sid, |
|
|
|
bvm.brandName, |
|
|
|
bvm.vehicleTypeValue, |
|
|
|
bvm.productLineValue, |
|
|
|
bvm.driveFormValue, |
|
|
|
bvm.powerValue, |
|
|
|
bvm.gearboxTypeValue, |
|
|
|
bvm.fuelTypeValue, |
|
|
|
bvm.vehicleVersionValue, |
|
|
|
bvm.modelName, |
|
|
|
bvm.engineTypeValue, |
|
|
|
bvm.`vehicleVersionValue` vehicleVersion, |
|
|
|
bvm.`vehicleTypeCode`, |
|
|
|
bvm.`emissionStandardValue`, |
|
|
|
bvm.vehicleAlias |
|
|
|
bvm.brandName, |
|
|
|
bvm.vehicleTypeValue, |
|
|
|
bvm.productLineValue, |
|
|
|
bvm.driveFormValue, |
|
|
|
bvm.powerValue, |
|
|
|
bvm.gearboxTypeValue, |
|
|
|
bvm.fuelTypeValue, |
|
|
|
bvm.vehicleVersionValue, |
|
|
|
bvm.modelName, |
|
|
|
bvm.engineTypeValue, |
|
|
|
bvm.`vehicleVersionValue` vehicleVersion, |
|
|
|
bvm.`vehicleTypeCode`, |
|
|
|
bvm.`emissionStandardValue`, |
|
|
|
bvm.vehicleAlias, |
|
|
|
bvm.createOrgName |
|
|
|
FROM base_vehicle_model bvm |
|
|
|
LEFT JOIN base_vehicle_brand bvb |
|
|
|
ON bvm.carBrand = bvb.sid |
|
|
|
LEFT JOIN base_vehicle_brand bvb |
|
|
|
ON bvm.carBrand = bvb.sid |
|
|
|
<where> |
|
|
|
${ew.sqlSegment} |
|
|
|
</where> |
|
|
@ -28,7 +29,7 @@ |
|
|
|
<!--详情--> |
|
|
|
<select id="details" resultType="com.yxt.anrui.base.api.basevehiclemodel.BaseVehicleModelDetailsVo"> |
|
|
|
SELECT |
|
|
|
-- <!--厂商名称--> |
|
|
|
-- <!--厂商名称--> |
|
|
|
bm.manufacturerName, |
|
|
|
-- <!--厂商sid--> |
|
|
|
bvm.manufacturer, |
|
|
@ -88,8 +89,8 @@ |
|
|
|
-- <!--是否可以删除(1是0否)--> |
|
|
|
bvm.isDel |
|
|
|
FROM base_vehicle_model bvm |
|
|
|
LEFT JOIN base_manufacturer bm ON bm.sid = bvm.manufacturer |
|
|
|
LEFT JOIN base_vehicle_brand bvb ON bvb.sid = bvm.carBrand |
|
|
|
LEFT JOIN base_manufacturer bm ON bm.sid = bvm.manufacturer |
|
|
|
LEFT JOIN base_vehicle_brand bvb ON bvb.sid = bvm.carBrand |
|
|
|
where bvm.sid = #{sid} |
|
|
|
</select> |
|
|
|
<!--删除、批量删除--> |
|
|
@ -124,8 +125,8 @@ |
|
|
|
<!--发动机号--> |
|
|
|
bvm.engineType |
|
|
|
FROM base_vehicle_model bvm |
|
|
|
left join base_vehicle_brand bvb on bvb.sid = bvm.carBrand |
|
|
|
${ew.customSqlSegment} |
|
|
|
left join base_vehicle_brand bvb on bvb.sid = bvm.carBrand |
|
|
|
${ew.customSqlSegment} |
|
|
|
</select> |
|
|
|
<!--查询车型信息下拉框--> |
|
|
|
<!-- <select id="selectDown" resultType="java.util.List">--> |
|
|
@ -145,20 +146,20 @@ |
|
|
|
<!--车型sid--> |
|
|
|
bvm.sid |
|
|
|
FROM base_vehicle_model bvm |
|
|
|
${ew.customSqlSegment} |
|
|
|
${ew.customSqlSegment} |
|
|
|
</select> |
|
|
|
<select id="selectAppPageByOrgSid" resultType="com.yxt.anrui.base.api.basevehiclemodel.AppBaseVehicleModelVo"> |
|
|
|
SELECT bvm.sid, bvb.brandName, bm.manufacturerName, bvm.modelName |
|
|
|
FROM base_vehicle_model bvm |
|
|
|
LEFT JOIN base_vehicle_brand bvb ON bvb.sid = bvm.carBrand |
|
|
|
LEFT JOIN base_manufacturer bm ON bvm.manufacturer = bm.sid |
|
|
|
${ew.customSqlSegment} |
|
|
|
LEFT JOIN base_vehicle_brand bvb ON bvb.sid = bvm.carBrand |
|
|
|
LEFT JOIN base_manufacturer bm ON bvm.manufacturer = bm.sid |
|
|
|
${ew.customSqlSegment} |
|
|
|
</select> |
|
|
|
<!--根据车型型号模糊查询下拉款--> |
|
|
|
<select id="selectDownPlus" resultType="java.util.Map"> |
|
|
|
select bvm.sid |
|
|
|
from base_vehicle_model bvm |
|
|
|
${ew.customSqlSegment} |
|
|
|
${ew.customSqlSegment} |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="getPcChooseListByModelSid" |
|
|
@ -171,10 +172,9 @@ |
|
|
|
bmc.`specification`, |
|
|
|
bmc.`fuelTank` |
|
|
|
FROM anrui_base.base_vehicle_model bvm |
|
|
|
LEFT JOIN anrui_base.base_vehmodel_config bvc ON bvc.modelSid = bvm.sid |
|
|
|
LEFT JOIN anrui_base.base_model_config bmc ON bvc.configurationItemsSid = bmc.sid |
|
|
|
WHERE bvm.sid = #{vehicleSid} |
|
|
|
LIMIT 1 |
|
|
|
LEFT JOIN anrui_base.base_vehmodel_config bvc ON bvc.modelSid = bvm.sid |
|
|
|
LEFT JOIN anrui_base.base_model_config bmc ON bvc.configurationItemsSid = bmc.sid |
|
|
|
WHERE bvm.sid = #{vehicleSid} LIMIT 1 |
|
|
|
</select> |
|
|
|
<select id="getListByModelSid" |
|
|
|
resultType="com.yxt.anrui.base.api.basemodelconfig.BaseModelConfigVo"> |
|
|
@ -197,7 +197,7 @@ |
|
|
|
bvm.modelName, |
|
|
|
bvm.engineTypeValue |
|
|
|
FROM base_model_config bmc |
|
|
|
LEFT JOIN base_vehicle_model bvm ON bmc.vehicleSid = bvm.sid |
|
|
|
LEFT JOIN base_vehicle_model bvm ON bmc.vehicleSid = bvm.sid |
|
|
|
WHERE vehicleSid = #{vehicleSid} |
|
|
|
</select> |
|
|
|
|
|
|
@ -218,8 +218,8 @@ |
|
|
|
bmc.configName AS sketChconfiguration, |
|
|
|
bv.guidedPrice AS vehicleModelOffer |
|
|
|
FROM base_vehicle_model bvm |
|
|
|
LEFT JOIN base_vehicle bv ON bv.modelSid = bvm.sid |
|
|
|
LEFT JOIN base_model_config bmc ON bvm.sid = bmc.vehicleSid |
|
|
|
LEFT JOIN base_vehicle bv ON bv.modelSid = bvm.sid |
|
|
|
LEFT JOIN base_model_config bmc ON bvm.sid = bmc.vehicleSid |
|
|
|
WHERE bvm.sid = #{modelSid} |
|
|
|
AND bmc.sid = #{configModelSid} |
|
|
|
</select> |
|
|
@ -289,15 +289,15 @@ |
|
|
|
<!--是否可以删除(1是0否)--> |
|
|
|
bvm.isDel |
|
|
|
FROM base_vehicle_model bvm |
|
|
|
LEFT JOIN base_manufacturer bm ON bm.sid = bvm.manufacturer |
|
|
|
LEFT JOIN base_vehicle_brand bvb ON bvb.sid = bvm.carBrand |
|
|
|
LEFT JOIN base_manufacturer bm ON bm.sid = bvm.manufacturer |
|
|
|
LEFT JOIN base_vehicle_brand bvb ON bvb.sid = bvm.carBrand |
|
|
|
where bvm.sid = #{sid} |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="selectDownPlusByModelName" resultType="java.util.Map"> |
|
|
|
SELECT bvm.modelName, bvm.sid |
|
|
|
SELECT bvm.modelName, bvm.sid,bvm.vehicleAlias |
|
|
|
FROM base_vehicle_model bvm |
|
|
|
${ew.customSqlSegment} |
|
|
|
${ew.customSqlSegment} |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="selectPageList" resultType="com.yxt.anrui.base.api.basevehiclemodel.BaseVehicleModelListVo"> |
|
|
@ -310,9 +310,9 @@ |
|
|
|
CONCAT(MIN(salesReferencePrice), '-', MAX(salesReferencePrice)) as salesReferencePrice, |
|
|
|
bv.configurationItemsSid as configSid |
|
|
|
from base_vehicle_model bm |
|
|
|
left join base_vehmodel_config bv on bv.modelSid = bm.sid |
|
|
|
left join base_model_config bc on bc.sid = bv.configurationItemsSid |
|
|
|
${ew.customSqlSegment} |
|
|
|
left join base_vehmodel_config bv on bv.modelSid = bm.sid |
|
|
|
left join base_model_config bc on bc.sid = bv.configurationItemsSid |
|
|
|
${ew.customSqlSegment} |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="downList" resultType="com.yxt.anrui.base.api.basevehiclemodel.BaseVehicleModelDownListVo"> |
|
|
@ -323,64 +323,65 @@ |
|
|
|
bvm.`manufacturer`, |
|
|
|
bvm.`carBrand` |
|
|
|
FROM base_vehicle_model bvm |
|
|
|
LEFT JOIN base_manufacturer bm |
|
|
|
ON bvm.`manufacturer` = bm.`sid` |
|
|
|
LEFT JOIN base_manufacturer bm |
|
|
|
ON bvm.`manufacturer` = bm.`sid` |
|
|
|
</select> |
|
|
|
|
|
|
|
<!-- <select id="modelPageList" resultType="com.yxt.anrui.base.api.basevehiclemodel.BaseVehicleModelListVo"> |
|
|
|
SELECT DISTINCT bm.sid, |
|
|
|
bm.brandName, |
|
|
|
bm.carBrand as brandSid, |
|
|
|
bm.vehicleAlias, |
|
|
|
bm.vehicleVersionValue, |
|
|
|
bm.fuelTypeValue, |
|
|
|
bm.gearboxTypeValue, |
|
|
|
bm.modelName, |
|
|
|
(SELECT if(MIN(bvc.guidedPrice) = MAX(bvc.guidedPrice), MAX(bvc.guidedPrice), |
|
|
|
CONCAT(MIN(bvc.guidedPrice), '-', MAX(bvc.guidedPrice))) |
|
|
|
FROM base_vehmodel_config bvc |
|
|
|
WHERE bvc.modelSid |
|
|
|
= bm.sid |
|
|
|
AND bvc.useOrgSid = #{useOrgSid}) AS guidedPrice, |
|
|
|
(SELECT COUNT(*) |
|
|
|
FROM base_vehicle bv |
|
|
|
WHERE bv.modelSid = bm.sid |
|
|
|
AND bv.useOrg = #{useOrgSid} |
|
|
|
AND lockedState = #{lockedStateKey}) AS nowCarNum, |
|
|
|
(SELECT COUNT(*) |
|
|
|
FROM bus_vehicle_apply_detail bvad |
|
|
|
WHERE bvad.vehicleSid = bm.sid) AS productionCarNum |
|
|
|
FROM base_vehicle_model bm |
|
|
|
LEFT JOIN base_vehmodel_config bvc |
|
|
|
ON bm.sid = bvc.modelSid |
|
|
|
<where> |
|
|
|
${ew.sqlSegment} |
|
|
|
</where> |
|
|
|
ORDER BY nowCarNum DESC |
|
|
|
</select>--> |
|
|
|
<!-- <select id="modelPageList" resultType="com.yxt.anrui.base.api.basevehiclemodel.BaseVehicleModelListVo"> |
|
|
|
SELECT DISTINCT bm.sid, |
|
|
|
bm.brandName, |
|
|
|
bm.carBrand as brandSid, |
|
|
|
bm.vehicleAlias, |
|
|
|
bm.vehicleVersionValue, |
|
|
|
bm.fuelTypeValue, |
|
|
|
bm.gearboxTypeValue, |
|
|
|
bm.modelName, |
|
|
|
(SELECT if(MIN(bvc.guidedPrice) = MAX(bvc.guidedPrice), MAX(bvc.guidedPrice), |
|
|
|
CONCAT(MIN(bvc.guidedPrice), '-', MAX(bvc.guidedPrice))) |
|
|
|
FROM base_vehmodel_config bvc |
|
|
|
WHERE bvc.modelSid |
|
|
|
= bm.sid |
|
|
|
AND bvc.useOrgSid = #{useOrgSid}) AS guidedPrice, |
|
|
|
(SELECT COUNT(*) |
|
|
|
FROM base_vehicle bv |
|
|
|
WHERE bv.modelSid = bm.sid |
|
|
|
AND bv.useOrg = #{useOrgSid} |
|
|
|
AND lockedState = #{lockedStateKey}) AS nowCarNum, |
|
|
|
(SELECT COUNT(*) |
|
|
|
FROM bus_vehicle_apply_detail bvad |
|
|
|
WHERE bvad.vehicleSid = bm.sid) AS productionCarNum |
|
|
|
FROM base_vehicle_model bm |
|
|
|
LEFT JOIN base_vehmodel_config bvc |
|
|
|
ON bm.sid = bvc.modelSid |
|
|
|
<where> |
|
|
|
${ew.sqlSegment} |
|
|
|
</where> |
|
|
|
ORDER BY nowCarNum DESC |
|
|
|
</select>--> |
|
|
|
|
|
|
|
<!-- <select id="notTheCompanyModelPageList" resultType="com.yxt.anrui.base.api.basevehiclemodel.BaseVehicleModelListVo"> |
|
|
|
SELECT bvc.useOrgSid, |
|
|
|
(SELECT count(*) |
|
|
|
FROM base_vehicle bv |
|
|
|
WHERE bv.modelSid = bvc.modelSid |
|
|
|
and bv.useOrg = bvc.useOrgSid) AS nowCarNum, |
|
|
|
(SELECT count(*) FROM bus_vehicle_apply_detail bvad WHERE bvad.vehicleSid = bm.sid) AS productionCarNum |
|
|
|
FROM base_vehmodel_config bvc |
|
|
|
LEFT JOIN base_vehicle_model bm ON bvc.modelSid = bm.sid |
|
|
|
<where> |
|
|
|
${ew.sqlSegment} |
|
|
|
</where> |
|
|
|
group by bvc.useOrgSid |
|
|
|
</select>--> |
|
|
|
<!-- <select id="notTheCompanyModelPageList" resultType="com.yxt.anrui.base.api.basevehiclemodel.BaseVehicleModelListVo"> |
|
|
|
SELECT bvc.useOrgSid, |
|
|
|
(SELECT count(*) |
|
|
|
FROM base_vehicle bv |
|
|
|
WHERE bv.modelSid = bvc.modelSid |
|
|
|
and bv.useOrg = bvc.useOrgSid) AS nowCarNum, |
|
|
|
(SELECT count(*) FROM bus_vehicle_apply_detail bvad WHERE bvad.vehicleSid = bm.sid) AS productionCarNum |
|
|
|
FROM base_vehmodel_config bvc |
|
|
|
LEFT JOIN base_vehicle_model bm ON bvc.modelSid = bm.sid |
|
|
|
<where> |
|
|
|
${ew.sqlSegment} |
|
|
|
</where> |
|
|
|
group by bvc.useOrgSid |
|
|
|
</select>--> |
|
|
|
|
|
|
|
<select id="listPageByVehmodel" resultType="com.yxt.anrui.base.api.basevehiclemodel.VehModelVo"> |
|
|
|
SELECT bvm.`brandName`, bvm.`modelName`, bmc.`configName`, bmc.otherConfig, bvc.guidedPrice,bvc.modelSid,bvc.configurationItemsSid configSid |
|
|
|
SELECT bvm.`brandName`, bvm.`modelName`, bmc.`configName`, bmc.otherConfig, |
|
|
|
bvc.guidedPrice,bvc.modelSid,bvc.configurationItemsSid configSid |
|
|
|
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> |
|
|
|
${ew.sqlSegment} |
|
|
|
</where> |
|
|
@ -420,8 +421,8 @@ |
|
|
|
SELECT bmc.sid, |
|
|
|
bmc.`configName` |
|
|
|
FROM base_model_config bmc |
|
|
|
LEFT JOIN base_vehmodel_config bvc |
|
|
|
ON bmc.sid = bvc.`configurationItemsSid` |
|
|
|
LEFT JOIN base_vehmodel_config bvc |
|
|
|
ON bmc.sid = bvc.`configurationItemsSid` |
|
|
|
WHERE bvc.`modelSid` = #{modelSid} |
|
|
|
and bvc.useOrgSid = #{orgSid} |
|
|
|
</select> |
|
|
|