Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
730b54dc
Commit
730b54dc
authored
Aug 20, 2025
by
hcing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(ymt): 96333码生成规则bugfix
parent
df97418f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
21 deletions
+17
-21
EquipmentCategoryEnum.java
...amos/boot/module/ymt/api/enums/EquipmentCategoryEnum.java
+2
-9
EquipmentCategoryServiceImpl.java
...le/ymt/biz/service/impl/EquipmentCategoryServiceImpl.java
+15
-12
No files found.
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/java/com/yeejoin/amos/boot/module/ymt/api/enums/EquipmentCategoryEnum.java
View file @
730b54dc
...
...
@@ -47,8 +47,7 @@ public enum EquipmentCategoryEnum {
public
static
Map
<
String
,
String
>
getName
=
new
HashMap
<>();
public
static
Map
<
String
,
String
>
getCode
=
new
HashMap
<>();
public
static
Map
<
String
,
String
>
getValue
=
new
HashMap
<>();
public
static
Map
<
String
,
String
>
getCityCode
=
new
HashMap
<>();
public
static
final
Map
<
String
,
String
>
getCodeValueMap
=
new
HashMap
<>();
public
static
final
Map
<
String
,
String
>
getCityCodeValue
=
new
HashMap
<>();
private
static
final
Map
<
String
,
String
>
valueToCodeMap
=
new
HashMap
<>();
static
{
...
...
@@ -57,9 +56,8 @@ public enum EquipmentCategoryEnum {
getCode
.
put
(
e
.
value
,
e
.
code
);
getValue
.
put
(
e
.
value
,
e
.
code
);
if
(
e
.
cityCode
!=
null
)
{
getCityCode
.
put
(
e
.
cityCode
,
e
.
cod
e
);
getCityCode
Value
.
put
(
e
.
cityCode
,
e
.
valu
e
);
}
getCodeValueMap
.
put
(
e
.
code
,
e
.
value
);
valueToCodeMap
.
put
(
"96333_"
+
e
.
value
,
e
.
getValue
()
+
e
.
getCode
());
}
}
...
...
@@ -68,9 +66,4 @@ public enum EquipmentCategoryEnum {
public
static
String
getCodeByValue
(
String
value
)
{
return
valueToCodeMap
.
get
(
value
);
}
// 根据code获取对应的value
public
static
String
getValueByCode
(
String
code
)
{
return
getCodeValueMap
.
get
(
code
);
}
}
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-biz/src/main/java/com/yeejoin/amos/boot/module/ymt/biz/service/impl/EquipmentCategoryServiceImpl.java
View file @
730b54dc
...
...
@@ -921,7 +921,8 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
if
(
firstAvailableCode
!=
null
)
{
elevatorCode
.
setLength
(
0
);
elevatorCode
.
append
(
prefix
).
append
(
firstAvailableCode
);
// firstAvailableCode 不足5位,前面补0
elevatorCode
.
append
(
prefix
).
append
(
String
.
format
(
"%05d"
,
firstAvailableCode
.
longValue
()));
}
else
{
//// 获取补零位长度
// String elevatorCode1 = elevatorOtherInfo.getCode().substring(2);
...
...
@@ -2789,33 +2790,34 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
}
// 对应关系转化
// city
--> EquipmentCategoryEnum.code
--> EquipmentCategoryEnum.value
// city
/county
--> EquipmentCategoryEnum.value
private
String
cityCodeTo96333CodePrefix
(
String
city
,
String
county
,
String
isNotXixian
)
{
String
code
=
EquipmentCategoryEnum
.
getCityCode
.
get
(
city
);
if
(
StringUtils
.
isEmpty
(
code
))
{
throw
new
RuntimeException
(
"未匹配到对应的cityCode:"
+
city
);
}
String
prefixCode
=
""
;
prefixCode
=
EquipmentCategoryEnum
.
getCityCodeValue
.
get
(
city
);
// 西咸
if
(
XIAN
.
equals
(
city
)
&&
"0"
.
equals
(
isNotXixian
))
{
return
EquipmentCategoryEnum
.
XXCSM
.
getValue
();
prefixCode
=
EquipmentCategoryEnum
.
XXCSM
.
getValue
();
}
// 杨陵
if
(
YANG_LING
.
equals
(
county
))
{
return
EquipmentCategoryEnum
.
YLCSM
.
getValue
();
prefixCode
=
EquipmentCategoryEnum
.
YLCSM
.
getValue
();
}
// 韩城
if
(
HAN_CHENG
.
equals
(
county
))
{
return
EquipmentCategoryEnum
.
HCCSM
.
getValue
();
prefixCode
=
EquipmentCategoryEnum
.
HCCSM
.
getValue
();
}
// 神木
if
(
SHEN_MU
.
equals
(
county
))
{
return
EquipmentCategoryEnum
.
SMCSM
.
getValue
();
prefixCode
=
EquipmentCategoryEnum
.
SMCSM
.
getValue
();
}
// 府谷
if
(
FU_GU
.
equals
(
county
))
{
return
EquipmentCategoryEnum
.
FGCSM
.
getValue
();
prefixCode
=
EquipmentCategoryEnum
.
FGCSM
.
getValue
();
}
if
(
StringUtils
.
isEmpty
(
prefixCode
))
{
throw
new
RuntimeException
(
"未匹配到对应的cityCode/countyCode:"
+
city
+
"/"
+
county
);
}
return
EquipmentCategoryEnum
.
getValueByCode
(
code
)
;
return
prefixCode
;
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment