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
ae51bbe3
Commit
ae51bbe3
authored
Jul 20, 2023
by
tianyiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
渭南韩城市96333码生成错乱修改
parent
0804f4b6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
9 deletions
+7
-9
EquipmentCategoryServiceImpl.java
...le/tzs/biz/service/impl/EquipmentCategoryServiceImpl.java
+7
-9
No files found.
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/EquipmentCategoryServiceImpl.java
View file @
ae51bbe3
...
...
@@ -466,11 +466,12 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
if
(
equipCategory
.
startsWith
(
"3"
)
&&
!
XIAN
.
equals
(
city
))
{
//判断数据是否携带96333电梯码,携带则使用,不携带则生成
if
(
"null"
.
equals
(
code96333
)){
prefix
=
getPrefix
(
EquipmentCategoryEnum
.
XZQHDT
.
getCode
(),
city
);
Map
<
String
,
Object
>
elevatorMap
=
equipmentCategoryMapper
.
getAdministrativeDivision
(
EquipmentCategoryEnum
.
XZQHDT
.
getCode
(),
county
);
prefix
=
ObjectUtils
.
isEmpty
(
elevatorMap
)
?
equipmentCategoryMapper
.
getAdministrativeDivision
(
EquipmentCategoryEnum
.
XZQHDT
.
getCode
(),
city
).
get
(
"code"
).
toString
()
:
elevatorMap
.
get
(
"code"
).
toString
();
//查询未使用的电梯码
categoryOtherInfo
=
categoryOtherInfoMapper
.
selectElevatorCode
(
prefix
,
EquipmentCategoryEnum
.
WSY
.
getCode
());
//如果存在未使用的电梯码则启用未使用的否则创建
String
elevator
=
ObjectUtils
.
isEmpty
(
categoryOtherInfo
)
?
createElevatorCode
(
city
,
county
)
:
categoryOtherInfo
.
getCode
();
String
elevator
=
ObjectUtils
.
isEmpty
(
categoryOtherInfo
)
?
createElevatorCode
(
prefix
)
:
categoryOtherInfo
.
getCode
();
if
(!
ObjectUtils
.
isEmpty
(
categoryOtherInfo
)){
supervisoryCodeInfoMapper
.
delete
(
new
QueryWrapper
<
SupervisoryCodeInfo
>().
eq
(
"code96333"
,
categoryOtherInfo
.
getCode
()));
}
...
...
@@ -555,20 +556,17 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
/**
* 生成96333电梯识别码
*
* @param city 行政区划市
* @param county 行政区划区
* @param prefix 电梯码前缀
* @return 96333电梯识别码
*/
public
String
createElevatorCode
(
String
city
,
String
county
)
{
public
String
createElevatorCode
(
String
prefix
)
{
StringBuilder
elevatorCode
=
new
StringBuilder
();
//生成生成96333电梯码前缀
Map
<
String
,
Object
>
elevatorMap
=
equipmentCategoryMapper
.
getAdministrativeDivision
(
EquipmentCategoryEnum
.
XZQHDT
.
getCode
(),
county
);
String
elevator
=
ObjectUtils
.
isEmpty
(
elevatorMap
)
?
equipmentCategoryMapper
.
getAdministrativeDivision
(
EquipmentCategoryEnum
.
XZQHDT
.
getCode
(),
city
).
get
(
"code"
).
toString
()
:
elevatorMap
.
get
(
"code"
).
toString
();
elevatorCode
.
append
(
elevator
);
elevatorCode
.
append
(
prefix
);
String
initCode
=
elevatorCode
+
EquipmentCategoryEnum
.
getValue
.
get
(
elevatorCode
.
toString
());
CategoryOtherInfo
initSupervisoryCode
=
categoryOtherInfoMapper
.
queryInitCode
(
initCode
);
// 查询是否已经生成过初始值
if
(
ValidationUtil
.
isEmpty
(
initSupervisoryCode
))
{
elevatorCode
.
append
(
EquipmentCategoryEnum
.
getValue
.
get
(
elevator
));
elevatorCode
.
append
(
EquipmentCategoryEnum
.
getValue
.
get
(
prefix
));
}
else
{
//获取行政区划区县、市是否存在历史96333电梯码
CategoryOtherInfo
elevatorOtherInfo
=
categoryOtherInfoMapper
.
selectElevatorCode
(
elevatorCode
.
toString
(),
null
);
...
...
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