Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yichengstreet-be
Project
Project
Details
Activity
Releases
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
yichengstreet
yichengstreet-be
Commits
43410708
Commit
43410708
authored
Jun 19, 2025
by
luben
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev-lb' into 'dev'
Dev lb See merge request
!213
parents
65ab38c9
3245c29d
Pipeline
#145025
failed with stages
in 33 minutes and 12 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
0 deletions
+28
-0
RegionController.java
.../java/com/ruoyi/web/controller/grid/RegionController.java
+28
-0
No files found.
ruoyi-admin/src/main/java/com/ruoyi/web/controller/grid/RegionController.java
View file @
43410708
...
...
@@ -33,6 +33,8 @@ import org.springframework.web.multipart.MultipartFile;
import
java.io.FileNotFoundException
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.time.LocalDateTime
;
import
java.time.format.DateTimeFormatter
;
import
java.util.*
;
import
java.util.stream.Collectors
;
...
...
@@ -1008,4 +1010,30 @@ public class RegionController extends BaseController {
}
}
@RequestMapping
(
value
=
"/addRegion"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
String
addRegion
(
@RequestBody
GridRegion
body
)
{
try
{
// 获取当前日期和时间
LocalDateTime
now
=
LocalDateTime
.
now
();
// 定义日期时间格式,去掉特殊符号
DateTimeFormatter
formatter
=
DateTimeFormatter
.
ofPattern
(
"yyyyMMddHHmmss"
);
// 格式化日期时间
String
date
=
now
.
format
(
formatter
);
body
.
setWgCode
(
body
.
getWgParentId
()+
date
);
String
level
=
body
.
getLevel
();
if
(
level
.
equals
(
"1"
)||
level
.
equals
(
"2"
)){
body
.
setStatus
(
"1"
);
}
else
{
body
.
setStatus
(
level
);
}
return
gridRegionFacadeService
.
commit
(
body
,
"insert"
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
JSON
.
toJSONString
(
AjaxResult
.
error
(
500
,
"服务器内部错误"
));
}
}
}
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