Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
usedCarAuction
/
aus
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit b18686c6
authored
Apr 23, 2026
by
章家宝
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat:添加子品牌,枚举类型
1 parent
ec9e6806
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
118 additions
and
55 deletions
aus-core/src/main/java/com/glsx/usedcar/enums/common/FuelTypeEnum.java
aus-core/src/main/java/com/glsx/usedcar/enums/common/TransmissionTypeEnum.java
aus-core/src/main/java/com/glsx/usedcar/enums/common/VehicleNatureEnum.java
aus-core/src/main/java/com/glsx/usedcar/module/vrsystem/entity/VrAudit.java
aus-core/src/main/java/com/glsx/usedcar/module/vrsystem/service/VrAuditService.java
aus-core/src/main/java/com/glsx/usedcar/enums/common/FuelTypeEnum.java
0 → 100644
View file @
b18686c
package
com
.
glsx
.
usedcar
.
enums
.
common
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
/**
* 燃料类型枚举
* 对应字段:fuel_type
*/
@Getter
@AllArgsConstructor
public
enum
FuelTypeEnum
{
GASOLINE
(
1
,
"汽油"
),
DIESEL
(
2
,
"柴油"
),
ELECTRIC
(
3
,
"电动"
),
HYBRID
(
4
,
"混动"
);
private
final
int
code
;
private
final
String
description
;
// ===================== 集成原有方法逻辑 =====================
public
static
String
getDescByCode
(
Integer
code
)
{
// 空值返回默认:汽油
if
(
code
==
null
)
{
return
GASOLINE
.
description
;
}
for
(
FuelTypeEnum
enums
:
FuelTypeEnum
.
values
())
{
if
(
enums
.
getCode
()
==
code
)
{
return
enums
.
getDescription
();
}
}
// 不匹配的code返回默认:汽油
return
GASOLINE
.
description
;
}
}
\ No newline at end of file
aus-core/src/main/java/com/glsx/usedcar/enums/common/TransmissionTypeEnum.java
0 → 100644
View file @
b18686c
package
com
.
glsx
.
usedcar
.
enums
.
common
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
/**
* 变速箱类型枚举
* 对应字段:transmission_type
*/
@Getter
@AllArgsConstructor
public
enum
TransmissionTypeEnum
{
MANUAL
(
1
,
"手动"
),
AUTOMATIC
(
2
,
"自动"
),
DUAL_CLUTCH
(
3
,
"双离合"
),
TIPTRONIC
(
4
,
"手自一体"
);
private
final
int
code
;
private
final
String
description
;
// ===================== 集成原有方法逻辑 =====================
public
static
String
getDescByCode
(
Integer
code
)
{
// 空值返回默认:自动
if
(
code
==
null
)
{
return
AUTOMATIC
.
description
;
}
for
(
TransmissionTypeEnum
enums
:
TransmissionTypeEnum
.
values
())
{
if
(
enums
.
getCode
()
==
code
)
{
return
enums
.
getDescription
();
}
}
// 不匹配的code返回默认:自动
return
AUTOMATIC
.
description
;
}
}
\ No newline at end of file
aus-core/src/main/java/com/glsx/usedcar/enums/common/VehicleNatureEnum.java
0 → 100644
View file @
b18686c
package
com
.
glsx
.
usedcar
.
enums
.
common
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
/**
* 车辆性质枚举
* 对应字段:vehicle_nature
*/
@Getter
@AllArgsConstructor
public
enum
VehicleNatureEnum
{
NON_OPERATING
(
1
,
"非营运"
),
OPERATING
(
2
,
"营运"
),
PROFIT_TO_NON
(
3
,
"盈转非"
);
private
final
int
code
;
private
final
String
description
;
// ===================== 集成原有方法逻辑 =====================
public
static
String
getDescByCode
(
Integer
code
)
{
// 空值返回默认:非营运
if
(
code
==
null
)
{
return
NON_OPERATING
.
description
;
}
for
(
VehicleNatureEnum
enums
:
VehicleNatureEnum
.
values
())
{
if
(
enums
.
getCode
()
==
code
)
{
return
enums
.
getDescription
();
}
}
// 不匹配的code返回默认:非营运
return
NON_OPERATING
.
description
;
}
}
\ No newline at end of file
aus-core/src/main/java/com/glsx/usedcar/module/vrsystem/entity/VrAudit.java
View file @
b18686c
...
...
@@ -180,19 +180,19 @@ public class VrAudit extends AuditingEntity {
private
String
displacement
;
/**
* 变速箱类型(1:手动/2:自动)
* 变速箱类型(1:手动/2:自动
/3:双离合/4:手自一体
)
*/
@Column
private
Integer
transmissionType
;
/**
* 车辆性质(1:非营运/2:营运)
* 车辆性质(1:非营运/2:营运
/3:盈转非
)
*/
@Column
private
Integer
vehicleNature
;
/**
* 燃料类型(1:汽油/2:柴油/3:
电动
/4:混动)
* 燃料类型(1:汽油/2:柴油/3:
纯电
/4:混动)
*/
@Column
private
Integer
fuelType
;
...
...
aus-core/src/main/java/com/glsx/usedcar/module/vrsystem/service/VrAuditService.java
View file @
b18686c
...
...
@@ -9,9 +9,8 @@ import com.glsx.usedcar.consts.common.DatePatternConsts;
import
com.glsx.usedcar.consts.common.SymbolConsts
;
import
com.glsx.usedcar.consts.inspect.JpaQueryConstants
;
import
com.glsx.usedcar.converts.VrAuditConverter
;
import
com.glsx.usedcar.enums.common.
DeleteFlag
;
import
com.glsx.usedcar.enums.common.
*
;
import
com.glsx.usedcar.enums.vr.VrRoleCodeEnum
;
import
com.glsx.usedcar.enums.common.WebhooksBusinessType
;
import
com.glsx.usedcar.handler.WebHookHandler
;
import
com.glsx.usedcar.module.auction.dao.AuctionOrderDao
;
import
com.glsx.usedcar.module.auction.dao.OrderSnapshotRepository
;
...
...
@@ -952,8 +951,8 @@ public class VrAuditService {
vehicle
.
setCoreSpecs
(
coreSpecs
);
}
if
(
StringUtils
.
hasText
(
vrAudit
.
getDisplacement
()))
coreSpecs
.
setDisplacement
(
vrAudit
.
getDisplacement
());
coreSpecs
.
setRlxs
(
getFuelTypeNam
e
(
vrAudit
.
getFuelType
()));
coreSpecs
.
setBxslx
(
getTransmissionTypeNam
e
(
vrAudit
.
getTransmissionType
()));
coreSpecs
.
setRlxs
(
FuelTypeEnum
.
getDescByCod
e
(
vrAudit
.
getFuelType
()));
coreSpecs
.
setBxslx
(
TransmissionTypeEnum
.
getDescByCod
e
(
vrAudit
.
getTransmissionType
()));
if
(
StringUtils
.
hasText
(
vrAudit
.
getBodyColor
()))
coreSpecs
.
setExteriorColor
(
vrAudit
.
getBodyColor
());
if
(
StringUtils
.
hasText
(
vrAudit
.
getInteriorColor
()))
coreSpecs
.
setInteriorColor
(
vrAudit
.
getInteriorColor
());
...
...
@@ -1025,8 +1024,8 @@ public class VrAuditService {
coreSpecs
.
setEmissionStandard
(
5
);
// 排放标准默认国5
coreSpecs
.
setDisplacement
(
vrAudit
.
getDisplacement
());
coreSpecs
.
setJqxs
(
""
);
coreSpecs
.
setRlxs
(
getFuelTypeNam
e
(
vrAudit
.
getFuelType
()));
coreSpecs
.
setBxslx
(
getTransmissionTypeNam
e
(
vrAudit
.
getTransmissionType
()));
coreSpecs
.
setRlxs
(
FuelTypeEnum
.
getDescByCod
e
(
vrAudit
.
getFuelType
()));
coreSpecs
.
setBxslx
(
TransmissionTypeEnum
.
getDescByCod
e
(
vrAudit
.
getTransmissionType
()));
coreSpecs
.
setQdfs
(
""
);
coreSpecs
.
setVehicleClass
(
""
);
coreSpecs
.
setExteriorColor
(
vrAudit
.
getBodyColor
());
...
...
@@ -1188,36 +1187,6 @@ public class VrAuditService {
}
/**
* 获取燃料类型名称
*/
private
String
getFuelTypeName
(
Integer
fuelType
)
{
if
(
fuelType
==
null
)
{
return
"汽油"
;
}
return
switch
(
fuelType
)
{
case
1
->
"汽油"
;
case
2
->
"柴油"
;
case
3
->
"电动"
;
case
4
->
"混动"
;
default
->
"汽油"
;
};
}
/**
* 获取变速箱类型名称
*/
private
String
getTransmissionTypeName
(
Integer
transmissionType
)
{
if
(
transmissionType
==
null
)
{
return
"自动"
;
}
return
switch
(
transmissionType
)
{
case
1
->
"手动"
;
case
2
->
"自动"
;
default
->
"自动"
;
};
}
/**
* 获取发拍单订单详情
* <p>聚合发拍单信息、财务清算信息(AuctionOrder)、快照信息(OrderSnapshot)</p>
*
...
...
@@ -1252,9 +1221,9 @@ public class VrAuditService {
vo
.
setCarTypeName
(
vrAudit
.
getCarTypeName
());
vo
.
setDisplacement
(
vrAudit
.
getDisplacement
());
vo
.
setTransmissionType
(
vrAudit
.
getTransmissionType
());
vo
.
setTransmissionTypeName
(
getTransmissionTypeNam
e
(
vrAudit
.
getTransmissionType
()));
vo
.
setTransmissionTypeName
(
TransmissionTypeEnum
.
getDescByCod
e
(
vrAudit
.
getTransmissionType
()));
vo
.
setFuelType
(
vrAudit
.
getFuelType
());
vo
.
setFuelTypeName
(
getFuelTypeNam
e
(
vrAudit
.
getFuelType
()));
vo
.
setFuelTypeName
(
FuelTypeEnum
.
getDescByCod
e
(
vrAudit
.
getFuelType
()));
vo
.
setBodyColor
(
vrAudit
.
getBodyColor
());
vo
.
setInteriorColor
(
vrAudit
.
getInteriorColor
());
...
...
@@ -1263,7 +1232,7 @@ public class VrAuditService {
vo
.
setMileage
(
vrAudit
.
getMileage
());
vo
.
setTransferCount
(
vrAudit
.
getTransferCount
());
vo
.
setVehicleNature
(
vrAudit
.
getVehicleNature
());
vo
.
setVehicleNatureName
(
getVehicleNatureNam
e
(
vrAudit
.
getVehicleNature
()));
vo
.
setVehicleNatureName
(
VehicleNatureEnum
.
getDescByCod
e
(
vrAudit
.
getVehicleNature
()));
// ==================== 四、财务底价与验车图证区 ====================
vo
.
setReservePrice
(
vrAudit
.
getReservePrice
());
...
...
@@ -1311,17 +1280,4 @@ public class VrAuditService {
return
vo
;
}
/**
* 获取车辆性质名称
*/
private
String
getVehicleNatureName
(
Integer
vehicleNature
)
{
if
(
vehicleNature
==
null
)
{
return
"非营运"
;
}
return
switch
(
vehicleNature
)
{
case
1
->
"非营运"
;
case
2
->
"营运"
;
default
->
"非营运"
;
};
}
}
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment