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
01678ca0
Commit
01678ca0
authored
Aug 12, 2025
by
tianbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor(ymt): 修改手动获取96333码接口
--接口修改为调用业务生成96333码方法:createElevatorCode(prefix)。 --没有获取到空余码则重新生成一个
parent
a3c685c8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
29 deletions
+29
-29
EquipmentCategoryServiceImpl.java
...le/ymt/biz/service/impl/EquipmentCategoryServiceImpl.java
+29
-29
No files found.
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 @
01678ca0
...
...
@@ -79,7 +79,6 @@ import java.util.*;
import
java.util.concurrent.ExecutorService
;
import
java.util.concurrent.Executors
;
import
java.util.stream.Collectors
;
import
java.util.stream.IntStream
;
import
static
com
.
alibaba
.
fastjson
.
JSON
.
toJSONString
;
...
...
@@ -766,34 +765,35 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
* @return 96333电梯识别码
*/
public
String
selectExceedElevatorCode
(
String
prefix
)
{
StringBuilder
elevatorCode
=
new
StringBuilder
();
// 生成生成96333电梯码前缀
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
(
prefix
));
}
else
{
// 获取行政区划区县、市是否存在历史96333电梯码
CategoryOtherInfo
elevatorOtherInfo
=
categoryOtherInfoMapper
.
selectElevatorCode
(
elevatorCode
.
toString
(),
null
);
if
(!
ObjectUtils
.
isEmpty
(
elevatorOtherInfo
)
&&
elevatorOtherInfo
.
getCode
()
!=
null
)
{
StopWatch
stopWatch
=
new
StopWatch
();
stopWatch
.
start
();
Integer
start
=
Integer
.
valueOf
(
prefix
+
EquipmentCategoryEnum
.
getCode
.
get
(
prefix
));
Integer
end
=
Integer
.
valueOf
(
elevatorOtherInfo
.
getCode
());
List
<
Integer
>
allCodeList
=
IntStream
.
rangeClosed
(
start
,
end
)
.
boxed
()
.
collect
(
Collectors
.
toList
());
List
<
Integer
>
codeList
=
categoryOtherInfoMapper
.
selectExceedElevatorCodeList
(
start
,
prefix
);
List
<
Integer
>
resultList
=
getDiffrent
(
allCodeList
,
codeList
);
if
(!
ObjectUtils
.
isEmpty
(
resultList
))
{
elevatorCode
.
setLength
(
0
);
elevatorCode
.
append
(
resultList
.
get
(
0
));
}
stopWatch
.
stop
();
}
}
return
elevatorCode
.
toString
();
return
createElevatorCode
(
prefix
);
// StringBuilder elevatorCode = new StringBuilder();
// // 生成生成96333电梯码前缀
// 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(prefix));
// } else {
// // 获取行政区划区县、市是否存在历史96333电梯码
// CategoryOtherInfo elevatorOtherInfo = categoryOtherInfoMapper.selectElevatorCode(elevatorCode.toString(), null);
// if (!ObjectUtils.isEmpty(elevatorOtherInfo) && elevatorOtherInfo.getCode() != null) {
// StopWatch stopWatch = new StopWatch();
// stopWatch.start();
// Integer start = Integer.valueOf(prefix + EquipmentCategoryEnum.getCode.get(prefix));
// Integer end = Integer.valueOf(elevatorOtherInfo.getCode());
// List<Integer> allCodeList = IntStream.rangeClosed(start, end)
// .boxed()
// .collect(Collectors.toList());
// List<Integer> codeList = categoryOtherInfoMapper.selectExceedElevatorCodeList(start, prefix);
// List<Integer> resultList = getDiffrent(allCodeList, codeList);
// if (!ObjectUtils.isEmpty(resultList)) {
// elevatorCode.setLength(0);
// elevatorCode.append(resultList.get(0));
// }
// stopWatch.stop();
// }
// }
// return elevatorCode.toString();
}
@Override
...
...
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