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
6eecb3b4
Commit
6eecb3b4
authored
Mar 21, 2025
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加事项备注字段
parent
74b648f9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
10 deletions
+24
-10
base-manager/src/main/java/com/mortals/xhx/module/matter/web/MatterController.java
...a/com/mortals/xhx/module/matter/web/MatterController.java
+18
-10
base-manager/src/test/java/com/mortals/httpclient/matter/MatterController.http
.../java/com/mortals/httpclient/matter/MatterController.http
+6
-0
No files found.
base-manager/src/main/java/com/mortals/xhx/module/matter/web/MatterController.java
View file @
6eecb3b4
...
...
@@ -8,6 +8,7 @@ import com.mortals.framework.exception.AppException;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.model.PageInfo
;
import
com.mortals.framework.model.Result
;
import
com.mortals.framework.service.ICacheService
;
import
com.mortals.framework.util.DataUtil
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.xhx.base.framework.config.InterceptorConfig
;
...
...
@@ -73,6 +74,8 @@ public class MatterController extends BaseCRUDJsonBodyMappingController<MatterSe
private
MatterChargesService
matterChargesService
;
@Autowired
private
MatterChannelService
matterChannelService
;
@Autowired
private
ICacheService
cacheService
;
public
MatterController
()
{
super
.
setModuleDesc
(
"基础事项"
);
...
...
@@ -314,30 +317,35 @@ public class MatterController extends BaseCRUDJsonBodyMappingController<MatterSe
@GetMapping
(
value
=
"genMatterTxt"
)
@UnAuth
public
Rest
<
Object
>
genMatterTxt
(
@RequestParam
(
value
=
"areaCode"
,
defaultValue
=
""
)
String
areaCode
,
@RequestParam
(
value
=
"genFilePath"
,
defaultValue
=
"/home/txt"
)
String
genFilePath
)
{
public
Rest
<
Object
>
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
))
{
if
(
ObjectUtils
.
isEmpty
(
areaCode
))
{
throw
new
AppException
(
"区域编码不能为空!"
);
}
MatterQuery
query
=
new
MatterQuery
();
query
.
setAreaCode
(
areaCode
);
query
.
setGenFilePath
(
genFilePath
);
new
Thread
(()->{
this
.
service
.
genMatterTXT
(
query
,
getContext
());
}).
start
();
BaseAreaQuery
baseAreaQuery
=
new
BaseAreaQuery
();
baseAreaQuery
.
setAreaCode
(
areaCode
);
BaseAreaEntity
baseAreaEntity
=
baseAreaService
.
selectOne
(
baseAreaQuery
);
String
path
=
genFilePath
+
baseAreaEntity
.
getName
()
+
".txt"
;
String
path
=
genFilePath
+
baseAreaEntity
.
getName
()
+
".txt"
;
boolean
setnx
=
cacheService
.
setnx
(
"genMatterTxt:"
+
areaCode
,
"1"
,
60
*
20
);
if
(!
setnx
)
{
throw
new
AppException
(
baseAreaEntity
.
getName
()
+
".txt 正在生成中,请稍后查看文件!"
);
}
new
Thread
(()
->
{
Rest
<
Void
>
voidRest
=
this
.
service
.
genMatterTXT
(
query
,
getContext
());
cacheService
.
del
(
"genMatterTxt:"
+
areaCode
);
}).
start
();
model
.
put
(
MESSAGE_INFO
,
"异步生成文件中,请稍后查看文件!,文件地址:"
+
path
);
model
.
put
(
MESSAGE_INFO
,
"异步生成文件中,请稍后查看文件!,文件地址:"
+
path
);
}
catch
(
Exception
e
)
{
code
=
VALUE_RESULT_FAILURE
;
...
...
base-manager/src/test/java/com/mortals/httpclient/matter/MatterController.http
View file @
6eecb3b4
...
...
@@ -39,6 +39,12 @@ Content-Type: application/json
{"areaCode": "510903000000", "genFilePath": "E:/home/csv/"}
###生成txt
GET {{baseUrl}}/matter/genMatterTxt?areaCode=511124000000&genFilePath=E:/home/txt/
Content-Type: application/json
###生成文本1
POST {{baseUrl}}/matter/genMatterMarkdown
Content-Type: application/json
...
...
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