Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sample-form-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
赵啸非
sample-form-platform
Commits
01506839
Commit
01506839
authored
Nov 21, 2022
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加材料数量统计
parent
dd14c7b8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
15 deletions
+14
-15
sample-form-manager/src/main/java/com/mortals/xhx/module/home/web/HomeController.java
.../java/com/mortals/xhx/module/home/web/HomeController.java
+0
-1
sample-form-manager/src/main/java/com/mortals/xhx/module/matter/service/impl/MatterDatumServiceImpl.java
...hx/module/matter/service/impl/MatterDatumServiceImpl.java
+12
-10
sample-form-manager/src/main/java/com/mortals/xhx/module/matter/web/MatterController.java
...a/com/mortals/xhx/module/matter/web/MatterController.java
+2
-4
No files found.
sample-form-manager/src/main/java/com/mortals/xhx/module/home/web/HomeController.java
View file @
01506839
...
...
@@ -109,7 +109,6 @@ public class HomeController extends BaseJsonBodyController {
Rest
<
Object
>
ret
=
new
Rest
();
Map
<
String
,
Object
>
model
=
new
HashMap
();
String
busiDesc
=
"查询站点部门列表"
;
int
code
=
1
;
try
{
...
...
sample-form-manager/src/main/java/com/mortals/xhx/module/matter/service/impl/MatterDatumServiceImpl.java
View file @
01506839
...
...
@@ -90,11 +90,17 @@ public class MatterDatumServiceImpl extends AbstractCRUDServiceImpl<MatterDatumD
@Override
protected
void
saveAfter
(
MatterDatumEntity
entity
,
Context
context
)
throws
AppException
{
statDatumCount
(
context
,
entity
);
statDatumCount
(
entity
,
context
);
addPubdatum
(
entity
,
context
);
super
.
saveAfter
(
entity
,
context
);
}
@Override
protected
void
updateAfter
(
MatterDatumEntity
entity
,
Context
context
)
throws
AppException
{
addPubdatum
(
entity
,
context
);
super
.
updateAfter
(
entity
,
context
);
}
private
void
addPubdatum
(
MatterDatumEntity
entity
,
Context
context
)
{
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getPub
())
&&
entity
.
getPub
()
==
YesNoEnum
.
YES
.
getValue
())
{
//添加到公共库
...
...
@@ -108,11 +114,7 @@ public class MatterDatumServiceImpl extends AbstractCRUDServiceImpl<MatterDatumD
}
@Override
protected
void
updateAfter
(
MatterDatumEntity
entity
,
Context
context
)
throws
AppException
{
addPubdatum
(
entity
,
context
);
super
.
updateAfter
(
entity
,
context
);
}
@Override
public
int
remove
(
Long
id
,
Context
context
)
throws
AppException
{
...
...
@@ -120,7 +122,7 @@ public class MatterDatumServiceImpl extends AbstractCRUDServiceImpl<MatterDatumD
MatterDatumEntity
matterDatumEntity
=
this
.
get
(
id
,
context
);
int
iRet
=
this
.
dao
.
delete
(
id
);
this
.
removeAfter
(
id
,
context
,
iRet
);
statDatumCount
(
context
,
matterDatumEntity
);
statDatumCount
(
matterDatumEntity
,
context
);
return
iRet
;
}
...
...
@@ -131,11 +133,11 @@ public class MatterDatumServiceImpl extends AbstractCRUDServiceImpl<MatterDatumD
MatterDatumEntity
matterDatumEntity
=
this
.
get
(
ids
[
0
],
context
);
int
iRet
=
this
.
dao
.
delete
(
ids
);
this
.
removeAfter
(
ids
,
context
,
iRet
);
statDatumCount
(
context
,
matterDatumEntity
);
statDatumCount
(
matterDatumEntity
,
context
);
return
iRet
;
}
private
void
statDatumCount
(
Context
context
,
MatterDatumEntity
matterDatumEntity
)
{
private
void
statDatumCount
(
MatterDatumEntity
matterDatumEntity
,
Context
context
)
{
int
count
=
this
.
count
(
new
MatterDatumQuery
().
matterId
(
matterDatumEntity
.
getMatterId
()),
context
);
MatterEntity
matterEntity
=
matterService
.
get
(
matterDatumEntity
.
getMatterId
(),
context
);
if
(!
ObjectUtils
.
isEmpty
(
matterEntity
))
{
...
...
@@ -152,7 +154,7 @@ public class MatterDatumServiceImpl extends AbstractCRUDServiceImpl<MatterDatumD
//生成样表预览图片
String
rootPath
=
this
.
filePath
.
endsWith
(
"/"
)
?
this
.
filePath
:
this
.
filePath
+
"/"
;
String
samplePath
=
rootPath
+
entity
.
getSamplePath
();
String
prePath
=
"
/
file/preview/"
;
String
prePath
=
"file/preview/"
;
String
filePath
=
rootPath
+
prePath
;
File
pathDir
=
new
File
(
filePath
);
if
(!
pathDir
.
exists
())
{
...
...
sample-form-manager/src/main/java/com/mortals/xhx/module/matter/web/MatterController.java
View file @
01506839
...
...
@@ -86,15 +86,13 @@ public class MatterController extends BaseCRUDJsonBodyMappingController<MatterSe
matterDatumQuery
.
setMatterIdList
(
matterIdList
);
}
model
.
put
(
"matterDatumTotal"
,
count
);
// int recommendCount = paramService.getParamIntValue(ParamKey.MATTER_RECOMMEND_COUNT);
// model.put("matterDatumTotal", count);
return
super
.
doListAfter
(
query
,
model
,
context
);
}
@RequestMapping
(
value
=
{
"createMatter"
},
method
=
{
RequestMethod
.
POST
,
RequestMethod
.
GET
})
public
String
createMatter
(
Long
[]
ids
,
Long
siteId
)
{
Map
<
String
,
Object
>
model
=
new
HashMap
();
int
code
=
1
;
int
code
=
VALUE_RESULT_SUCCESS
;
String
busiDesc
=
"站点事项转事项"
;
try
{
Rest
<
String
>
rest
=
this
.
service
.
createMatterbBySheetMatter
(
ids
,
siteId
,
getContext
());
...
...
@@ -102,7 +100,7 @@ public class MatterController extends BaseCRUDJsonBodyMappingController<MatterSe
this
.
recordSysLog
(
this
.
request
,
rest
.
getMsg
());
}
catch
(
Exception
var7
)
{
code
=
-
1
;
code
=
VALUE_RESULT_FAILURE
;
this
.
doException
(
this
.
request
,
busiDesc
,
model
,
var7
);
}
...
...
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