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
cd75515e
Commit
cd75515e
authored
Feb 26, 2025
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改使用登记表 通过业务类型填充登记类型
parent
745928f1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
0 deletions
+30
-0
RegistrationTypeEnum.java
...n/amos/boot/module/jg/api/enums/RegistrationTypeEnum.java
+26
-0
CommonServiceImpl.java
...os/boot/module/jg/biz/service/impl/CommonServiceImpl.java
+4
-0
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/enums/RegistrationTypeEnum.java
0 → 100644
View file @
cd75515e
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
enums
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
@Getter
@AllArgsConstructor
public
enum
RegistrationTypeEnum
{
新设备首次启用
(
"新设备首次启用"
,
"DJ_SY"
),
历史无证设备登记
(
"历史无证设备登记"
,
"SP_TT"
);
private
String
name
;
private
String
code
;
public
static
String
getNameByType
(
String
code
)
{
String
name
=
null
;
for
(
RegistrationTypeEnum
enumOne
:
RegistrationTypeEnum
.
values
())
{
if
(
enumOne
.
getCode
().
equals
(
code
))
{
name
=
enumOne
.
getName
();
break
;
}
}
return
name
;
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/CommonServiceImpl.java
View file @
cd75515e
...
...
@@ -2234,6 +2234,10 @@ public class CommonServiceImpl implements ICommonService {
DateTimeFormatter
outputFormatter
=
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
);
Pattern
timePattern
=
Pattern
.
compile
(
"\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}"
);
//登记类型
if
(
jsonObject
.
containsKey
(
"type"
)){
formData
.
put
(
"registrationType"
,
RegistrationTypeEnum
.
getNameByType
(
jsonObject
.
getString
(
"type"
)));
}
for
(
String
key
:
formData
.
keySet
())
{
if
(
key
.
contains
(
"Date"
)
&&
timePattern
.
matcher
(
formData
.
getString
(
key
)).
matches
()){
// 解析原始日期时间字符串
...
...
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