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
3c9a9e94
Commit
3c9a9e94
authored
Apr 10, 2024
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.设备代码由18位调整位19位
parent
aed7eb95
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
CodeUtil.java
...a/com/yeejoin/amos/boot/module/jg/biz/utils/CodeUtil.java
+5
-5
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/utils/CodeUtil.java
View file @
3c9a9e94
...
...
@@ -36,7 +36,7 @@ public class CodeUtil {
* 按照特种设备代码规范生成 设备代码
*
* @param codeGenerateDto 生成代码需要的数据
* @return 设备基本代码(4位)+ 行政区域代码(6位)+制造年份(4位)+ 制造顺序号(
4
位)
* @return 设备基本代码(4位)+ 行政区域代码(6位)+制造年份(4位)+ 制造顺序号(
5
位)
*/
public
String
generateEquipmentCode
(
CodeGenerateDto
codeGenerateDto
)
{
// 根据区县或者地市级的接收机构代码获取地市级的行政区域代码
...
...
@@ -98,11 +98,11 @@ public class CodeUtil {
}
private
String
longCode2StrCode
(
long
nextNumber
)
{
if
(
nextNumber
>=
10000
)
{
char
prefix
=
(
char
)
(
'A'
+
(
nextNumber
-
10000
)
/
1
000
);
return
prefix
+
""
+
String
.
format
(
"%0
3d"
,
(
nextNumber
-
10000
)
%
1
000
);
if
(
nextNumber
>=
10000
0
)
{
char
prefix
=
(
char
)
(
'A'
+
(
nextNumber
-
10000
0
)
/
10
000
);
return
prefix
+
""
+
String
.
format
(
"%0
4d"
,
(
nextNumber
-
100000
)
%
10
000
);
}
else
{
return
String
.
format
(
"%0
4
d"
,
nextNumber
);
return
String
.
format
(
"%0
5
d"
,
nextNumber
);
}
}
...
...
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