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
74b648f9
Commit
74b648f9
authored
Mar 21, 2025
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加事项备注字段
parent
1f9c15e3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
19 deletions
+30
-19
base-manager/src/main/java/com/mortals/xhx/module/matter/service/MatterService.java
.../com/mortals/xhx/module/matter/service/MatterService.java
+2
-2
base-manager/src/main/java/com/mortals/xhx/module/matter/service/impl/MatterServiceImpl.java
...als/xhx/module/matter/service/impl/MatterServiceImpl.java
+3
-4
base-manager/src/main/java/com/mortals/xhx/module/matter/web/MatterController.java
...a/com/mortals/xhx/module/matter/web/MatterController.java
+25
-13
No files found.
base-manager/src/main/java/com/mortals/xhx/module/matter/service/MatterService.java
View file @
74b648f9
...
...
@@ -83,10 +83,10 @@ public interface MatterService extends ICRUDService<MatterEntity, Long> {
* @param context
* @return
*/
Rest
<
Void
>
genMatter
Txt
(
MatterQuery
matterQuery
,
Context
context
);
Rest
<
Void
>
genMatter
Csv
(
MatterQuery
matterQuery
,
Context
context
);
Rest
<
Void
>
genMatterMarkdown
(
MatterQuery
matterQuery
,
Context
context
);
Rest
<
Void
>
genMatter
CSV
(
MatterQuery
matterQuery
,
Context
context
);
Rest
<
Void
>
genMatter
TXT
(
MatterQuery
matterQuery
,
Context
context
);
}
\ No newline at end of file
base-manager/src/main/java/com/mortals/xhx/module/matter/service/impl/MatterServiceImpl.java
View file @
74b648f9
...
...
@@ -1603,7 +1603,7 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter
@Override
public
Rest
<
Void
>
genMatter
Txt
(
MatterQuery
matterQuery
,
Context
context
)
{
public
Rest
<
Void
>
genMatter
Csv
(
MatterQuery
matterQuery
,
Context
context
)
{
List
<
String
>
strList
=
new
ArrayList
<>();
List
<
MatterEntity
>
mattersList
=
this
.
find
(
matterQuery
);
...
...
@@ -1963,14 +1963,13 @@ public class MatterServiceImpl extends AbstractCRUDServiceImpl<MatterDao, Matter
@Override
public
Rest
<
Void
>
genMatter
CSV
(
MatterQuery
matterQuery
,
Context
context
)
{
public
Rest
<
Void
>
genMatter
TXT
(
MatterQuery
matterQuery
,
Context
context
)
{
List
<
String
>
strList
=
new
ArrayList
<>();
BaseAreaQuery
baseAreaQuery
=
new
BaseAreaQuery
();
baseAreaQuery
.
setAreaCode
(
matterQuery
.
getAreaCode
());
BaseAreaEntity
baseAreaEntity
=
baseAreaService
.
selectOne
(
baseAreaQuery
);
String
path
=
matterQuery
.
getGenFilePath
()
+
baseAreaEntity
.
getName
()
+
".
csv
"
;
String
path
=
matterQuery
.
getGenFilePath
()
+
baseAreaEntity
.
getName
()
+
".
txt
"
;
FileUtil
.
writeUtf8String
(
""
,
path
);
List
<
MatterEntity
>
mattersList
=
matterExtService
.
getWebMatterListByAreaCode
(
matterQuery
.
getAreaCode
(),
context
).
getData
();
for
(
MatterEntity
matterEntity
:
mattersList
)
{
...
...
base-manager/src/main/java/com/mortals/xhx/module/matter/web/MatterController.java
View file @
74b648f9
...
...
@@ -9,25 +9,21 @@ import com.mortals.framework.model.Context;
import
com.mortals.framework.model.PageInfo
;
import
com.mortals.framework.model.Result
;
import
com.mortals.framework.util.DataUtil
;
import
com.mortals.framework.util.ThreadPool
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.xhx.base.framework.config.InterceptorConfig
;
import
com.mortals.xhx.base.system.param.service.ParamService
;
import
com.mortals.xhx.common.code.JointInfoShowEnum
;
import
com.mortals.xhx.common.code.YesNoEnum
;
import
com.mortals.xhx.module.base.model.BaseAreaEntity
;
import
com.mortals.xhx.module.base.model.BaseAreaQuery
;
import
com.mortals.xhx.module.base.service.BaseAreaService
;
import
com.mortals.xhx.module.matter.model.*
;
import
com.mortals.xhx.module.matter.service.*
;
import
com.mortals.xhx.module.site.model.SiteThemeQuery
;
import
com.mortals.xhx.module.site.service.SiteThemeService
;
import
org.apache.poi.ss.formula.functions.T
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
...
...
@@ -256,16 +252,16 @@ public class MatterController extends BaseCRUDJsonBodyMappingController<MatterSe
}
@PostMapping
(
value
=
"genMatter
Txt
"
)
@PostMapping
(
value
=
"genMatter
Csv
"
)
@UnAuth
public
Rest
<
Object
>
genMatter
Txt
(
@RequestBody
MatterQuery
query
)
{
public
Rest
<
Object
>
genMatter
Csv
(
@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
.
genMatter
Txt
(
query
,
getContext
());
this
.
service
.
genMatter
Csv
(
query
,
getContext
());
model
.
put
(
MESSAGE_INFO
,
busiDesc
+
"成功"
);
}
catch
(
Exception
e
)
{
...
...
@@ -316,16 +312,32 @@ public class MatterController extends BaseCRUDJsonBodyMappingController<MatterSe
}
@
PostMapping
(
value
=
"genMatterCsv
"
)
@
GetMapping
(
value
=
"genMatterTxt
"
)
@UnAuth
public
Rest
<
Object
>
genMatterCsv
(
@RequestBody
MatterQuery
query
)
{
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
{
this
.
service
.
genMatterCSV
(
query
,
getContext
());
model
.
put
(
MESSAGE_INFO
,
busiDesc
+
"成功"
);
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"
;
model
.
put
(
MESSAGE_INFO
,
"异步生成文件中,请稍后查看文件!,文件地址:"
+
path
);
}
catch
(
Exception
e
)
{
code
=
VALUE_RESULT_FAILURE
;
...
...
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