Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
smart_gov_platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
smart_gov_platform
Commits
7c7c20f6
Commit
7c7c20f6
authored
Apr 03, 2025
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加终端修改密码日志记录
parent
4ea992de
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
206 additions
and
181 deletions
+206
-181
base-manager/src/main/java/com/mortals/xhx/module/matter/service/impl/MatterServiceImpl.java
...als/xhx/module/matter/service/impl/MatterServiceImpl.java
+157
-153
base-manager/src/main/java/com/mortals/xhx/module/matter/web/MatterController.java
...a/com/mortals/xhx/module/matter/web/MatterController.java
+49
-28
No files found.
base-manager/src/main/java/com/mortals/xhx/module/matter/service/impl/MatterServiceImpl.java
View file @
7c7c20f6
This diff is collapsed.
Click to expand it.
base-manager/src/main/java/com/mortals/xhx/module/matter/web/MatterController.java
View file @
7c7c20f6
...
@@ -285,27 +285,7 @@ public class MatterController extends BaseCRUDJsonBodyMappingController<MatterSe
...
@@ -285,27 +285,7 @@ public class MatterController extends BaseCRUDJsonBodyMappingController<MatterSe
}
}
@PostMapping
(
value
=
"genMatterCsv"
)
@UnAuth
public
Rest
<
Object
>
genMatterCsv
(
@RequestBody
MatterQuery
query
)
{
Rest
<
Object
>
ret
=
new
Rest
<>();
Map
<
String
,
Object
>
model
=
new
HashMap
<>();
Context
context
=
this
.
getContext
();
String
busiDesc
=
"生成文本"
+
this
.
getModuleDesc
();
int
code
=
VALUE_RESULT_SUCCESS
;
try
{
this
.
service
.
genMatterCsv
(
query
,
getContext
());
model
.
put
(
MESSAGE_INFO
,
busiDesc
+
"成功"
);
}
catch
(
Exception
e
)
{
code
=
VALUE_RESULT_FAILURE
;
this
.
doException
(
request
,
busiDesc
,
model
,
e
);
}
ret
.
setCode
(
code
);
ret
.
setData
(
model
);
ret
.
setMsg
(
model
.
get
(
MESSAGE_INFO
)
==
null
?
""
:
model
.
remove
(
MESSAGE_INFO
).
toString
());
return
ret
;
}
@PostMapping
(
value
=
"genMatterMarkdown"
)
@PostMapping
(
value
=
"genMatterMarkdown"
)
...
@@ -345,12 +325,13 @@ public class MatterController extends BaseCRUDJsonBodyMappingController<MatterSe
...
@@ -345,12 +325,13 @@ public class MatterController extends BaseCRUDJsonBodyMappingController<MatterSe
}
}
@GetMapping
(
value
=
"genMatter
Txt
"
)
@GetMapping
(
value
=
"genMatter
Csv
"
)
@UnAuth
@UnAuth
public
String
genMatter
Txt
(
@RequestParam
(
value
=
"areaCode"
,
defaultValue
=
""
)
String
areaCode
public
String
genMatter
Csv
(
@RequestParam
(
value
=
"areaCode"
,
defaultValue
=
""
)
String
areaCode
,
@RequestParam
(
value
=
"genFilePath"
,
defaultValue
=
"/home/txt/"
)
String
genFilePath
)
{
,
@RequestParam
(
value
=
"genFilePath"
,
defaultValue
=
"/home/txt/"
)
String
genFilePath
)
{
Rest
<
Object
>
ret
=
new
Rest
<>();
Rest
<
Object
>
ret
=
new
Rest
<>();
Map
<
String
,
Object
>
model
=
new
HashMap
<>();
Map
<
String
,
Object
>
model
=
new
HashMap
<>();
Context
context
=
this
.
getContext
();
String
busiDesc
=
"生成文本"
+
this
.
getModuleDesc
();
String
busiDesc
=
"生成文本"
+
this
.
getModuleDesc
();
int
code
=
VALUE_RESULT_SUCCESS
;
int
code
=
VALUE_RESULT_SUCCESS
;
try
{
try
{
...
@@ -367,21 +348,61 @@ public class MatterController extends BaseCRUDJsonBodyMappingController<MatterSe
...
@@ -367,21 +348,61 @@ public class MatterController extends BaseCRUDJsonBodyMappingController<MatterSe
if
(
ObjectUtils
.
isEmpty
(
baseAreaEntity
))
{
if
(
ObjectUtils
.
isEmpty
(
baseAreaEntity
))
{
throw
new
AppException
(
"区域编码不存在!"
+
areaCode
);
throw
new
AppException
(
"区域编码不存在!"
+
areaCode
);
}
}
boolean
setnx
=
cacheService
.
setnx
(
"genMatterCsv:"
+
areaCode
,
"1"
,
60
*
20
);
if
(!
setnx
)
{
return
baseAreaEntity
.
getName
()
+
".csv 正在生成中,请稍后查看文件!"
;
}
new
Thread
(()
->
{
this
.
service
.
genMatterCsv
(
query
,
getContext
());
cacheService
.
del
(
"genMatterCsv:"
+
areaCode
);
}).
start
();
return
"异步生成文件中,请稍后查看文件!,文件访问地址: http://192.168.0.98:11071"
+
genFilePath
;
/*
this.service.genMatterCsv(query, getContext());
model.put(MESSAGE_INFO, busiDesc + "成功");*/
}
catch
(
Exception
e
)
{
code
=
VALUE_RESULT_FAILURE
;
this
.
doException
(
request
,
busiDesc
,
model
,
e
);
}
ret
.
setCode
(
code
);
ret
.
setData
(
model
);
ret
.
setMsg
(
model
.
get
(
MESSAGE_INFO
)
==
null
?
""
:
model
.
remove
(
MESSAGE_INFO
).
toString
());
return
ret
.
toString
();
}
// String path = genFilePath + baseAreaEntity.getName() + ".txt";
@GetMapping
(
value
=
"genMatterTxt"
)
@UnAuth
public
String
genMatterTxt
(
@RequestParam
(
value
=
"areaCode"
,
defaultValue
=
""
)
String
areaCode
,
@RequestParam
(
value
=
"genFilePath"
,
defaultValue
=
"/home/txt/"
)
String
genFilePath
)
{
Rest
<
Object
>
ret
=
new
Rest
<>();
Map
<
String
,
Object
>
model
=
new
HashMap
<>();
String
busiDesc
=
"生成文本"
+
this
.
getModuleDesc
();
int
code
=
VALUE_RESULT_SUCCESS
;
try
{
if
(
ObjectUtils
.
isEmpty
(
areaCode
))
{
throw
new
AppException
(
"区域编码不能为空!"
);
}
MatterQuery
query
=
new
MatterQuery
();
query
.
setAreaCode
(
areaCode
);
query
.
setGenFilePath
(
genFilePath
);
BaseAreaQuery
baseAreaQuery
=
new
BaseAreaQuery
();
baseAreaQuery
.
setAreaCode
(
areaCode
);
BaseAreaEntity
baseAreaEntity
=
baseAreaService
.
selectOne
(
baseAreaQuery
);
if
(
ObjectUtils
.
isEmpty
(
baseAreaEntity
))
{
throw
new
AppException
(
"区域编码不存在!"
+
areaCode
);
}
boolean
setnx
=
cacheService
.
setnx
(
"genMatterTxt:"
+
areaCode
,
"1"
,
60
*
20
);
boolean
setnx
=
cacheService
.
setnx
(
"genMatterTxt:"
+
areaCode
,
"1"
,
60
*
20
);
if
(!
setnx
)
{
if
(!
setnx
)
{
return
baseAreaEntity
.
getName
()
+
".txt 正在生成中,请稍后查看文件!"
;
return
baseAreaEntity
.
getName
()
+
".txt 正在生成中,请稍后查看文件!"
;
}
}
new
Thread
(()
->
{
new
Thread
(()
->
{
Rest
<
Void
>
voidRest
=
this
.
service
.
genMatterTXT
(
query
,
getContext
());
this
.
service
.
genMatterTXT
(
query
,
getContext
());
cacheService
.
del
(
"genMatterTxt:"
+
areaCode
);
cacheService
.
del
(
"genMatterTxt:"
+
areaCode
);
}).
start
();
}).
start
();
//http://192.168.0.98:11071/home/txt/
// model.put(MESSAGE_INFO, "异步生成文件中,请稍后查看文件!,文件访问地址:http://192.168.0.98:11071" + genFilePath+"/");
return
"异步生成文件中,请稍后查看文件!,文件访问地址: http://192.168.0.98:11071"
+
genFilePath
;
return
"异步生成文件中,请稍后查看文件!,文件访问地址: http://192.168.0.98:11071"
+
genFilePath
;
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
...
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