Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dd_school
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangqi
dd_school
Commits
0d1c6aec
Commit
0d1c6aec
authored
Feb 18, 2025
by
wangjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2025-02-18
parent
f6c045be
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
187 additions
and
4 deletions
+187
-4
smart-campus/src/main/java/yangtz/cs/liu/campus/controller/schoolRewardsPunishments/SchoolScAwardsController.java
+184
-4
smart-campus/src/main/java/yangtz/cs/liu/campus/domain/schoolNewTeacherDzdn/SchoolAclassTeacherAssessment.java
+3
-0
No files found.
smart-campus/src/main/java/yangtz/cs/liu/campus/controller/schoolRewardsPunishments/SchoolScAwardsController.java
View file @
0d1c6aec
...
@@ -9,6 +9,7 @@ import java.util.zip.ZipEntry;
...
@@ -9,6 +9,7 @@ import java.util.zip.ZipEntry;
import
java.util.zip.ZipOutputStream
;
import
java.util.zip.ZipOutputStream
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
com.ruoyi.common.config.RuoYiConfig
;
import
com.ruoyi.common.core.domain.entity.SysUser
;
import
com.ruoyi.common.core.domain.entity.SysUser
;
import
com.ruoyi.common.utils.SecurityUtils
;
import
com.ruoyi.common.utils.SecurityUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -197,19 +198,196 @@ public class SchoolScAwardsController extends BaseController
...
@@ -197,19 +198,196 @@ public class SchoolScAwardsController extends BaseController
/** 批量导出附件图片 */
/** 批量导出附件图片 */
@
Ge
tMapping
(
"/pldcfjtp"
)
@
Reques
tMapping
(
"/pldcfjtp"
)
public
void
pldcfjtp
(
SchoolScAwardsVo
schoolScAwardsVo
,
HttpServletResponse
response
)
public
void
pldcfjtp
(
SchoolScAwardsVo
schoolScAwardsVo
,
HttpServletResponse
response
)
{
{
schoolScAwardsVo
.
setAuditState
(
"0"
);
schoolScAwardsVo
.
setAuditState
(
"0"
);
startPage
();
//
startPage();
List
<
SchoolScAwardsVo
>
list
=
schoolScAwardsService
.
selectSchoolScAwardsList
(
schoolScAwardsVo
);
List
<
SchoolScAwardsVo
>
list
=
schoolScAwardsService
.
selectSchoolScAwardsList
(
schoolScAwardsVo
);
List
<
SchoolAccessory
>
dcfjs
=
new
ArrayList
<>();
//导出附件列表
List
<
SchoolAccessory
>
dcfjs
=
new
ArrayList
<>();
//导出附件列表
for
(
SchoolScAwardsVo
entity
:
list
)
{
for
(
SchoolScAwardsVo
entity
:
list
)
{
List
<
SchoolAccessory
>
fjs
=
entity
.
getSchoolAccessoryList
();
List
<
SchoolAccessory
>
fjs
=
entity
.
getSchoolAccessoryList
();
if
(
schoolScAwardsVo
.
getId
()
!=
null
)
{
if
(!
schoolScAwardsVo
.
getId
().
equals
(
entity
.
getId
()))
{
//传入条件包括id 则只导出一个
continue
;
}
}
if
(
fjs
==
null
)
{
continue
;
}
for
(
SchoolAccessory
fj
:
fjs
)
{
SchoolAccessory
dc
=
new
SchoolAccessory
();
dc
.
setAccessoryName
(
entity
.
getCompetitionName
()
+
"_"
+
entity
.
getAwardsName
()
+
"_"
+
fj
.
getId
()
+
"_"
+
fj
.
getAccessoryName
());
dc
.
setAccessoryUrl
(
fj
.
getAccessoryUrl
());
dcfjs
.
add
(
dc
);
}
}
String
fileName
=
"学校获奖附件"
+
".zip"
;
response
.
setContentType
(
"application/zip"
);
response
.
setHeader
(
"content-disposition"
,
"attachment;filename="
+
fileName
);
ZipOutputStream
zos
=
null
;
BufferedInputStream
bis
=
null
;
try
{
zos
=
new
ZipOutputStream
(
response
.
getOutputStream
());
byte
[]
buf
=
new
byte
[
8192
];
int
len
;
for
(
int
i
=
0
;
i
<
dcfjs
.
size
();
i
++)
{
SchoolAccessory
dcfj
=
dcfjs
.
get
(
i
);
String
oripath
=
dcfj
.
getAccessoryUrl
();
oripath
=
oripath
.
replaceFirst
(
"/profile"
,
RuoYiConfig
.
getProfile
());
String
dcfjurl
=
oripath
;
String
dcfjname
=
dcfj
.
getAccessoryName
();
File
file
=
new
File
(
dcfjurl
);
if
(!
file
.
isFile
())
{
continue
;
}
ZipEntry
ze
=
new
ZipEntry
(
dcfjname
);
zos
.
putNextEntry
(
ze
);
bis
=
new
BufferedInputStream
(
new
FileInputStream
(
file
));
while
((
len
=
bis
.
read
(
buf
))
>
0
)
{
zos
.
write
(
buf
,
0
,
len
);
}
zos
.
closeEntry
();
}
zos
.
closeEntry
();
}
catch
(
Exception
ex
){
ex
.
printStackTrace
();
}
finally
{
if
(
bis
!=
null
){
try
{
bis
.
close
();
}
catch
(
Exception
e
){
e
.
printStackTrace
();
}
}
if
(
zos
!=
null
){
try
{
zos
.
close
();
}
catch
(
Exception
e
){
e
.
printStackTrace
();
}
}
}
}
/** 批量导出附件图片 个人 */
@RequestMapping
(
"/pldcfjtpGr"
)
public
void
pldcfjtpGr
(
SchoolScAwardsVo
schoolScAwardsVo
,
HttpServletResponse
response
)
{
List
<
SchoolScAwardsVo
>
list
=
new
ArrayList
<>();
SysUser
user
=
SecurityUtils
.
getLoginUser
().
getUser
();
//管理员查询全部
if
(
user
.
isAdmin
())
{
// startPage();
list
=
schoolScAwardsService
.
selectSchoolScAwardsList
(
schoolScAwardsVo
);
// return getDataTable(list);
}
else
{
//用户查看个人列表
schoolScAwardsVo
.
setApplyId
(
user
.
getUserId
());
// startPage();
list
=
schoolScAwardsService
.
selectSchoolScAwardsList
(
schoolScAwardsVo
);
}
List
<
SchoolAccessory
>
dcfjs
=
new
ArrayList
<>();
//导出附件列表
for
(
SchoolScAwardsVo
entity
:
list
)
{
List
<
SchoolAccessory
>
fjs
=
entity
.
getSchoolAccessoryList
();
if
(
schoolScAwardsVo
.
getId
()
!=
null
)
{
if
(!
schoolScAwardsVo
.
getId
().
equals
(
entity
.
getId
()))
{
//传入条件包括id 则只导出一个
continue
;
}
}
if
(
fjs
==
null
)
{
continue
;
}
for
(
SchoolAccessory
fj
:
fjs
)
{
SchoolAccessory
dc
=
new
SchoolAccessory
();
dc
.
setAccessoryName
(
entity
.
getCompetitionName
()
+
"_"
+
entity
.
getAwardsName
()
+
"_"
+
fj
.
getId
()
+
"_"
+
fj
.
getAccessoryName
());
dc
.
setAccessoryUrl
(
fj
.
getAccessoryUrl
());
dcfjs
.
add
(
dc
);
}
}
String
fileName
=
"学校获奖附件"
+
".zip"
;
response
.
setContentType
(
"application/zip"
);
response
.
setHeader
(
"content-disposition"
,
"attachment;filename="
+
fileName
);
ZipOutputStream
zos
=
null
;
BufferedInputStream
bis
=
null
;
try
{
zos
=
new
ZipOutputStream
(
response
.
getOutputStream
());
byte
[]
buf
=
new
byte
[
8192
];
int
len
;
for
(
int
i
=
0
;
i
<
dcfjs
.
size
();
i
++)
{
SchoolAccessory
dcfj
=
dcfjs
.
get
(
i
);
String
oripath
=
dcfj
.
getAccessoryUrl
();
oripath
=
oripath
.
replaceFirst
(
"/profile"
,
RuoYiConfig
.
getProfile
());
String
dcfjurl
=
oripath
;
String
dcfjname
=
dcfj
.
getAccessoryName
();
File
file
=
new
File
(
dcfjurl
);
if
(!
file
.
isFile
())
{
continue
;
}
ZipEntry
ze
=
new
ZipEntry
(
dcfjname
);
zos
.
putNextEntry
(
ze
);
bis
=
new
BufferedInputStream
(
new
FileInputStream
(
file
));
while
((
len
=
bis
.
read
(
buf
))
>
0
)
{
zos
.
write
(
buf
,
0
,
len
);
}
zos
.
closeEntry
();
}
zos
.
closeEntry
();
}
catch
(
Exception
ex
){
ex
.
printStackTrace
();
}
finally
{
if
(
bis
!=
null
){
try
{
bis
.
close
();
}
catch
(
Exception
e
){
e
.
printStackTrace
();
}
}
if
(
zos
!=
null
){
try
{
zos
.
close
();
}
catch
(
Exception
e
){
e
.
printStackTrace
();
}
}
}
}
/** 批量导出附件图片 通过 */
@RequestMapping
(
"/pldcfjtpTg"
)
public
void
pldcfjtpTg
(
SchoolScAwardsVo
schoolScAwardsVo
,
HttpServletResponse
response
)
{
schoolScAwardsVo
.
setAuditState
(
"2"
);
// startPage();
List
<
SchoolScAwardsVo
>
list
=
schoolScAwardsService
.
selectSchoolScAwardsListTg
(
schoolScAwardsVo
);
List
<
SchoolAccessory
>
dcfjs
=
new
ArrayList
<>();
//导出附件列表
for
(
SchoolScAwardsVo
entity
:
list
)
{
List
<
SchoolAccessory
>
fjs
=
entity
.
getSchoolAccessoryList
();
if
(
schoolScAwardsVo
.
getId
()
!=
null
)
{
if
(!
schoolScAwardsVo
.
getId
().
equals
(
entity
.
getId
()))
{
//传入条件包括id 则只导出一个
continue
;
}
}
if
(
fjs
==
null
)
{
continue
;
}
for
(
SchoolAccessory
fj
:
fjs
)
{
for
(
SchoolAccessory
fj
:
fjs
)
{
SchoolAccessory
dc
=
new
SchoolAccessory
();
SchoolAccessory
dc
=
new
SchoolAccessory
();
dc
.
setAccessoryName
(
entity
.
getCompetitionName
()
+
entity
.
getAwardsName
()
+
fj
.
getId
());
dc
.
setAccessoryName
(
entity
.
getCompetitionName
()
+
"_"
+
entity
.
getAwardsName
()
+
"_"
+
fj
.
getId
()
+
"_"
+
fj
.
getAccessoryName
());
dc
.
setAccessoryUrl
(
fj
.
getAccessoryUrl
());
dc
.
setAccessoryUrl
(
fj
.
getAccessoryUrl
());
dcfjs
.
add
(
dc
);
}
}
}
}
...
@@ -226,7 +404,9 @@ public class SchoolScAwardsController extends BaseController
...
@@ -226,7 +404,9 @@ public class SchoolScAwardsController extends BaseController
int
len
;
int
len
;
for
(
int
i
=
0
;
i
<
dcfjs
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
dcfjs
.
size
();
i
++)
{
SchoolAccessory
dcfj
=
dcfjs
.
get
(
i
);
SchoolAccessory
dcfj
=
dcfjs
.
get
(
i
);
String
dcfjurl
=
dcfj
.
getAccessoryUrl
();
String
oripath
=
dcfj
.
getAccessoryUrl
();
oripath
=
oripath
.
replaceFirst
(
"/profile"
,
RuoYiConfig
.
getProfile
());
String
dcfjurl
=
oripath
;
String
dcfjname
=
dcfj
.
getAccessoryName
();
String
dcfjname
=
dcfj
.
getAccessoryName
();
File
file
=
new
File
(
dcfjurl
);
File
file
=
new
File
(
dcfjurl
);
...
...
smart-campus/src/main/java/yangtz/cs/liu/campus/domain/schoolNewTeacherDzdn/SchoolAclassTeacherAssessment.java
View file @
0d1c6aec
...
@@ -86,4 +86,7 @@ public class SchoolAclassTeacherAssessment extends BaseEntity
...
@@ -86,4 +86,7 @@ public class SchoolAclassTeacherAssessment extends BaseEntity
private
String
delFlag
;
private
String
delFlag
;
/** 家长满意度评价 */
private
String
jzmydpj
;
}
}
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