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
889f837d
Commit
889f837d
authored
Apr 07, 2023
by
tianyiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
赋码修改
parent
f154d8d2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
4 deletions
+11
-4
EquipmentCategoryEnum.java
...amos/boot/module/tzs/api/enums/EquipmentCategoryEnum.java
+2
-1
EquipmentCategoryServiceImpl.java
...le/tzs/biz/service/impl/EquipmentCategoryServiceImpl.java
+9
-3
No files found.
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/enums/EquipmentCategoryEnum.java
View file @
889f837d
...
...
@@ -21,7 +21,8 @@ public enum EquipmentCategoryEnum {
CSM
(
"96333初始码"
,
"00001"
),
CSZT
(
"初始状态"
,
"0"
),
YSY
(
"已使用"
,
"1"
),
WSY
(
"未使用"
,
"2"
);
WSY
(
"未使用"
,
"2"
),
BF
(
"报废"
,
"6"
);
private
String
name
;
private
String
code
;
...
...
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 @
889f837d
...
...
@@ -179,10 +179,13 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
if
(!
ObjectUtils
.
isEmpty
(
record
))
{
EquInfoDto
equInfoDto
=
categoryOtherInfoMapper
.
selectEquipInfo
(
record
);
String
supervisorCode
,
elevatorCode
;
equState
=
EquipmentCategoryEnum
.
WSY
.
getCode
().
equals
(
equInfoDto
.
getEquState
())
?
EquipmentCategoryEnum
.
WSY
.
getCode
()
:
EquipmentCategoryEnum
.
YSY
.
getCode
();
supervisorCode
=
EquipmentCategoryEnum
.
WSY
.
getCode
().
equals
(
equInfoDto
.
getEquState
())
?
null
:
codeMap
.
get
(
"supervisorCode"
);
elevatorCode
=
EquipmentCategoryEnum
.
WSY
.
getCode
().
equals
(
equInfoDto
.
getEquState
())
?
null
:
codeMap
.
get
(
"elevatorCode"
);
//设备状态为报废,对应电梯码作废
equState
=
EquipmentCategoryEnum
.
BF
.
getCode
().
equals
(
equInfoDto
.
getEquState
())
?
EquipmentCategoryEnum
.
WSY
.
getCode
()
:
EquipmentCategoryEnum
.
YSY
.
getCode
();
supervisorCode
=
codeMap
.
get
(
"supervisorCode"
);
elevatorCode
=
EquipmentCategoryEnum
.
BF
.
getCode
().
equals
(
equInfoDto
.
getEquState
())
?
null
:
codeMap
.
get
(
"elevatorCode"
);
//对应电梯码作废
categoryOtherInfoMapper
.
updateCode
(
equInfoDto
.
getCode
(),
equState
);
//修改源数据的电梯码
categoryOtherInfoMapper
.
updateSupervisorCode
(
supervisorCode
,
elevatorCode
,
record
);
}
else
{
SupervisoryCodeInfo
supervisoryCodeInfo
=
new
SupervisoryCodeInfo
();
...
...
@@ -332,6 +335,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
StringBuilder
elevatorCode
=
new
StringBuilder
();
CategoryOtherInfo
otherInfo
;
String
prefix
=
getPrefix
(
EquipmentCategoryEnum
.
XZQHDT
.
getCode
(),
city
);
//查询未使用的电梯码
CategoryOtherInfo
categoryOtherInfo
=
categoryOtherInfoMapper
.
selectElevatorCode
(
prefix
,
EquipmentCategoryEnum
.
WSY
.
getCode
());
if
(!
ObjectUtils
.
isEmpty
(
record
))
{
//查询对应record对应数据
...
...
@@ -349,6 +353,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
if
(!
ObjectUtils
.
isEmpty
(
otherInfo
.
getCode
()))
{
elevatorCode
.
append
(
new
StringBuilder
(
otherInfo
.
getCode
()));
}
else
{
//如果存在未使用的电梯码则启用未使用的否则创建
String
elevator
=
ObjectUtils
.
isEmpty
(
categoryOtherInfo
)
?
createElevatorCode
(
city
,
county
)
:
categoryOtherInfo
.
getCode
();
elevatorCode
.
append
(
elevator
);
}
...
...
@@ -358,6 +363,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
String
supervisor
=
createSupervisorCode
(
city
,
county
,
equipCategory
);
supervisorCode
.
append
(
supervisor
);
if
(
equipCategory
.
startsWith
(
"3"
)
&&
!
XIAN
.
equals
(
city
))
{
//如果存在未使用的电梯码则启用未使用的否则创建
String
elevator
=
ObjectUtils
.
isEmpty
(
categoryOtherInfo
)
?
createElevatorCode
(
city
,
county
)
:
categoryOtherInfo
.
getCode
();
elevatorCode
.
append
(
elevator
);
}
...
...
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