Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
gsc
/
gsc-vcp-api
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 8f08bc4c
authored
Oct 31, 2025
by
林冲
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
车辆取消,需同步取消交付单
1 parent
b4d0bcf5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
63 additions
and
0 deletions
src/main/java/com/gsc4cloud/gsc/vpc/api/enums/DeliveryOrderStatusEnum.java
src/main/java/com/gsc4cloud/gsc/vpc/api/enums/DeliveryOrderStatusEnum.java
0 → 100644
View file @
8f08bc4
package
com
.
gsc4cloud
.
gsc
.
vpc
.
api
.
enums
;
/**
* Delivery order status enum to replace magic numbers in code.
* Codes definition:
* -1: 已取消
* 0: 待交付
* 1: 准备交付/交付中/过户中(进行中)
* 2: 交付完成
*/
public
enum
DeliveryOrderStatusEnum
implements
BaseEnum
<
Integer
,
String
>
{
CANCELLED
(-
1
,
"已取消"
),
PENDING
(
0
,
"待交付"
),
IN_PROGRESS
(
1
,
"进行中"
),
COMPLETED
(
2
,
"交付完成"
);
private
final
Integer
code
;
private
final
String
desc
;
DeliveryOrderStatusEnum
(
Integer
code
,
String
desc
)
{
this
.
code
=
code
;
this
.
desc
=
desc
;
}
@Override
public
Integer
getCode
()
{
return
code
;
}
@Override
public
String
getDesc
()
{
return
desc
;
}
/**
* Map external text to enum
*/
public
static
DeliveryOrderStatusEnum
fromText
(
String
status
)
{
if
(
status
==
null
)
{
return
PENDING
;
}
switch
(
status
)
{
case
"已完成"
:
return
COMPLETED
;
case
"准备交付"
:
case
"交付中"
:
case
"过户中"
:
return
IN_PROGRESS
;
case
"已取消"
:
return
CANCELLED
;
default
:
return
PENDING
;
}
}
/**
* Get enum by numeric code
*/
public
static
DeliveryOrderStatusEnum
ofCode
(
Integer
code
)
{
return
BaseEnum
.
getEnumByCode
(
code
,
DeliveryOrderStatusEnum
.
class
);
}
}
\ No newline at end of file
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