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
b3866f6a
Commit
b3866f6a
authored
Feb 18, 2025
by
zhaopanyu
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://49.232.152.146:6688/qangqi/dd_school
parents
a81275cd
9326d4a1
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
409 additions
and
148 deletions
+409
-148
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
+5
-0
smart-campus/src/main/java/yangtz/cs/liu/campus/domain/schoolNewTeacherDzdn/SchoolAclassTeacherAssessmentExport.java
+4
-0
smart-campus/src/main/java/yangtz/cs/liu/campus/domain/schoolNewTeacherDzdn/SchoolAclassTeacherAssessmentReq.java
+3
-0
smart-campus/src/main/java/yangtz/cs/liu/campus/service/impl/schoolEquipment/CirculationServiceImpl.java
+15
-13
smart-campus/src/main/java/yangtz/cs/liu/campus/service/impl/schoolEquipment/EquipmentLedgerServiceImpl.java
+15
-13
smart-campus/src/main/java/yangtz/cs/liu/campus/service/impl/schoolEquipment/EquipmentRepairServiceImpl.java
+55
-13
smart-campus/src/main/java/yangtz/cs/liu/campus/service/impl/schoolEquipment/InStockServiceImpl.java
+15
-13
smart-campus/src/main/java/yangtz/cs/liu/campus/service/impl/schoolEquipment/OutStockServiceImpl.java
+15
-13
smart-campus/src/main/java/yangtz/cs/liu/campus/service/impl/schoolEquipment/ProductCategoryServiceImpl.java
+56
-48
smart-campus/src/main/java/yangtz/cs/liu/campus/service/impl/schoolEquipment/ReceiveServiceImpl.java
+15
-13
smart-campus/src/main/java/yangtz/cs/liu/campus/service/schoolEquipment/IEquipmentRepairService.java
+3
-0
smart-campus/src/main/java/yangtz/cs/liu/wechat/controller/equipment/EquipmentLeaseController.java
+23
-16
smart-campus/src/main/resources/file/班主任任职导入模板.xlsx
+0
-0
smart-campus/src/main/resources/mapper/schoolEquipment/EquipmentRepairMapper.xml
+1
-2
No files found.
smart-campus/src/main/java/yangtz/cs/liu/campus/controller/schoolRewardsPunishments/SchoolScAwardsController.java
View file @
b3866f6a
...
...
@@ -9,6 +9,7 @@ import java.util.zip.ZipEntry;
import
java.util.zip.ZipOutputStream
;
import
javax.servlet.http.HttpServletResponse
;
import
com.ruoyi.common.config.RuoYiConfig
;
import
com.ruoyi.common.core.domain.entity.SysUser
;
import
com.ruoyi.common.utils.SecurityUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -197,19 +198,196 @@ public class SchoolScAwardsController extends BaseController
/** 批量导出附件图片 */
@
Ge
tMapping
(
"/pldcfjtp"
)
@
Reques
tMapping
(
"/pldcfjtp"
)
public
void
pldcfjtp
(
SchoolScAwardsVo
schoolScAwardsVo
,
HttpServletResponse
response
)
{
schoolScAwardsVo
.
setAuditState
(
"0"
);
startPage
();
//
startPage();
List
<
SchoolScAwardsVo
>
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
(
"/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
)
{
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
());
dcfjs
.
add
(
dc
);
}
}
...
...
@@ -226,7 +404,9 @@ public class SchoolScAwardsController extends BaseController
int
len
;
for
(
int
i
=
0
;
i
<
dcfjs
.
size
();
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
();
File
file
=
new
File
(
dcfjurl
);
...
...
smart-campus/src/main/java/yangtz/cs/liu/campus/domain/schoolNewTeacherDzdn/SchoolAclassTeacherAssessment.java
View file @
b3866f6a
...
...
@@ -77,6 +77,10 @@ public class SchoolAclassTeacherAssessment extends BaseEntity
@Excel
(
name
=
"考核结果"
)
private
String
assessmentResults
;
/** 家长满意度评价 */
@Excel
(
name
=
"家长满意度评价"
)
private
String
jzmydpj
;
/** 备注*/
@Excel
(
name
=
"备注"
)
private
String
remark
;
...
...
@@ -86,4 +90,5 @@ public class SchoolAclassTeacherAssessment extends BaseEntity
private
String
delFlag
;
}
smart-campus/src/main/java/yangtz/cs/liu/campus/domain/schoolNewTeacherDzdn/SchoolAclassTeacherAssessmentExport.java
View file @
b3866f6a
...
...
@@ -68,6 +68,10 @@ public class SchoolAclassTeacherAssessmentExport extends BaseEntity
@Excel
(
name
=
"考核结果"
,
dictType
=
"assessment_results"
)
private
String
assessmentResults
;
/** 家长满意度评价 */
@Excel
(
name
=
"家长满意度评价"
)
private
String
jzmydpj
;
/** 备注*/
@Excel
(
name
=
"备注"
)
private
String
remark
;
...
...
smart-campus/src/main/java/yangtz/cs/liu/campus/domain/schoolNewTeacherDzdn/SchoolAclassTeacherAssessmentReq.java
View file @
b3866f6a
...
...
@@ -88,4 +88,7 @@ public class SchoolAclassTeacherAssessmentReq extends BaseEntity
private
String
delFlag
;
/** 家长满意度评价 */
private
String
jzmydpj
;
}
smart-campus/src/main/java/yangtz/cs/liu/campus/service/impl/schoolEquipment/CirculationServiceImpl.java
View file @
b3866f6a
...
...
@@ -63,20 +63,22 @@ public class CirculationServiceImpl extends ServiceImpl<CirculationMapper, Schoo
*/
@Override
public
List
<
SchoolCirculationVo
>
selectSchoolCirculationVoList
(
SchoolCirculationVo
schoolCirculationVo
)
{
List
<
SysRole
>
roles
=
SecurityUtils
.
getLoginUser
().
getUser
().
getRoles
();
SysUser
user
=
SecurityUtils
.
getLoginUser
().
getUser
();
for
(
SysRole
role
:
roles
)
{
if
(
role
.
getRoleKey
().
equals
(
"admin"
)){
return
circulationMapper
.
selectSchoolCirculationVoList
(
schoolCirculationVo
);
}
else
if
(
role
.
getRoleKey
().
equals
(
"productCategoryAdmin"
)){
schoolCirculationVo
.
setAdminId
(
SecurityUtils
.
getLoginUser
().
getUser
().
getUserId
());
return
circulationMapper
.
selectSchoolCirculationVoListGr
(
schoolCirculationVo
);
}
}
if
(
user
.
isAdmin
()){
return
circulationMapper
.
selectSchoolCirculationVoList
(
schoolCirculationVo
);
}
return
new
ArrayList
<>();
// List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
// SysUser user = SecurityUtils.getLoginUser().getUser();
// for (SysRole role : roles) {
// if (role.getRoleKey().equals("admin")){
// return circulationMapper.selectSchoolCirculationVoList(schoolCirculationVo);
// }else if (role.getRoleKey().equals("productCategoryAdmin")){
// schoolCirculationVo.setAdminId(SecurityUtils.getLoginUser().getUser().getUserId());
// return circulationMapper.selectSchoolCirculationVoListGr(schoolCirculationVo);
// }
// }
// if (user.isAdmin()){
// return circulationMapper.selectSchoolCirculationVoList(schoolCirculationVo);
// }
// return new ArrayList<>();
}
public
List
<
SchoolCirculationVo
>
selectVxSchoolCirculationVoList
(
SchoolReceiveQuery
schoolReceiveQuery
)
{
...
...
smart-campus/src/main/java/yangtz/cs/liu/campus/service/impl/schoolEquipment/EquipmentLedgerServiceImpl.java
View file @
b3866f6a
...
...
@@ -48,20 +48,22 @@ public class EquipmentLedgerServiceImpl extends ServiceImpl<EquipmentLedgerMappe
*/
@Override
public
List
<
SchoolEquipmentLedger
>
selectSchoolEquipmentLedgerList
(
SchoolEquipmentLedgerVo
schoolEquipmentLedgerVo
)
{
List
<
SysRole
>
roles
=
SecurityUtils
.
getLoginUser
().
getUser
().
getRoles
();
SysUser
user
=
SecurityUtils
.
getLoginUser
().
getUser
();
for
(
SysRole
role
:
roles
)
{
if
(
role
.
getRoleKey
().
equals
(
"admin"
)){
return
equipmentLedgerMapper
.
selectSchoolEquipmentLedgerList
(
schoolEquipmentLedgerVo
);
}
else
if
(
role
.
getRoleKey
().
equals
(
"productCategoryAdmin"
)){
schoolEquipmentLedgerVo
.
setAdminId
(
SecurityUtils
.
getLoginUser
().
getUser
().
getUserId
());
return
equipmentLedgerMapper
.
selectSchoolEquipmentLedgerListGr
(
schoolEquipmentLedgerVo
);
}
}
if
(
user
.
isAdmin
()){
return
equipmentLedgerMapper
.
selectSchoolEquipmentLedgerList
(
schoolEquipmentLedgerVo
);
}
return
new
ArrayList
<>();
// List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
// SysUser user = SecurityUtils.getLoginUser().getUser();
// for (SysRole role : roles) {
// if (role.getRoleKey().equals("admin")){
// return equipmentLedgerMapper.selectSchoolEquipmentLedgerList(schoolEquipmentLedgerVo);
// }else if (role.getRoleKey().equals("productCategoryAdmin")){
// schoolEquipmentLedgerVo.setAdminId(SecurityUtils.getLoginUser().getUser().getUserId());
// return equipmentLedgerMapper.selectSchoolEquipmentLedgerListGr(schoolEquipmentLedgerVo);
// }
// }
// if (user.isAdmin()){
// return equipmentLedgerMapper.selectSchoolEquipmentLedgerList(schoolEquipmentLedgerVo);
// }
// return new ArrayList<>();
}
/**
...
...
smart-campus/src/main/java/yangtz/cs/liu/campus/service/impl/schoolEquipment/EquipmentRepairServiceImpl.java
View file @
b3866f6a
package
yangtz
.
cs
.
liu
.
campus
.
service
.
impl
.
schoolEquipment
;
import
com.alibaba.fastjson2.JSONObject
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.core.utils.HttpClientUtil
;
import
com.ruoyi.common.annotation.DataScope
;
import
com.ruoyi.common.core.domain.entity.SysRole
;
import
com.ruoyi.common.core.domain.entity.SysUser
;
...
...
@@ -8,12 +10,15 @@ import com.ruoyi.common.exception.ServiceException;
import
com.ruoyi.common.utils.DateUtils
;
import
com.ruoyi.common.utils.SecurityUtils
;
import
com.ruoyi.common.utils.StringUtils
;
import
com.ruoyi.common.utils.http.HttpUtils
;
import
com.ruoyi.system.mapper.SysUserMapper
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
yangtz.cs.liu.campus.domain.schoolEquipment.SchoolEquipmentLedger
;
import
yangtz.cs.liu.campus.domain.schoolEquipment.SchoolEquipmentRepair
;
import
yangtz.cs.liu.campus.mapper.schoolEquipment.EquipmentLedgerMapper
;
import
yangtz.cs.liu.campus.mapper.schoolEquipment.EquipmentRepairMapper
;
import
yangtz.cs.liu.campus.service.schoolEquipment.IEquipmentRepairService
;
import
yangtz.cs.liu.campus.vo.schoolEquipment.SchoolEquipmentRepairVo
;
...
...
@@ -32,6 +37,9 @@ public class EquipmentRepairServiceImpl extends ServiceImpl<EquipmentRepairMappe
@Autowired
private
SysUserMapper
sysUserMapper
;
@Autowired
private
EquipmentLedgerMapper
equipmentLedgerMapper
;
/**
* 查看设备报修列表
* @param schoolEquipmentRepairVo
...
...
@@ -39,20 +47,21 @@ public class EquipmentRepairServiceImpl extends ServiceImpl<EquipmentRepairMappe
*/
@Override
public
List
<
SchoolEquipmentRepairVo
>
selectSchoolEquipmentRepairVoList
(
SchoolEquipmentRepairVo
schoolEquipmentRepairVo
)
{
List
<
SysRole
>
roles
=
SecurityUtils
.
getLoginUser
().
getUser
().
getRoles
();
SysUser
user
=
SecurityUtils
.
getLoginUser
().
getUser
();
for
(
SysRole
role
:
roles
)
{
if
(
role
.
getRoleKey
().
equals
(
"admin"
)){
return
equipmentRepairMapper
.
selectSchoolEquipmentRepairVoList
(
schoolEquipmentRepairVo
);
}
else
if
(
role
.
getRoleKey
().
equals
(
"productCategoryAdmin"
)){
schoolEquipmentRepairVo
.
setAdminId
(
SecurityUtils
.
getLoginUser
().
getUser
().
getUserId
());
return
equipmentRepairMapper
.
selectSchoolEquipmentRepairVoListGr
(
schoolEquipmentRepairVo
);
}
}
if
(
user
.
isAdmin
()){
return
equipmentRepairMapper
.
selectSchoolEquipmentRepairVoList
(
schoolEquipmentRepairVo
);
}
return
new
ArrayList
<>();
// List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
// SysUser user = SecurityUtils.getLoginUser().getUser();
// for (SysRole role : roles) {
// if (role.getRoleKey().equals("admin")){
// return equipmentRepairMapper.selectSchoolEquipmentRepairVoList(schoolEquipmentRepairVo);
// }else if (role.getRoleKey().equals("productCategoryAdmin")){
// schoolEquipmentRepairVo.setAdminId(SecurityUtils.getLoginUser().getUser().getUserId());
// return equipmentRepairMapper.selectSchoolEquipmentRepairVoListGr(schoolEquipmentRepairVo);
// }
// }
// if (user.isAdmin()){
// return equipmentRepairMapper.selectSchoolEquipmentRepairVoList(schoolEquipmentRepairVo);
// }
// return new ArrayList<>();
}
/**
...
...
@@ -184,5 +193,38 @@ public class EquipmentRepairServiceImpl extends ServiceImpl<EquipmentRepairMappe
public
List
<
SchoolEquipmentRepairVo
>
getMaintenanceUserList
(
SchoolReceiveQuery
schoolReceiveQuery
)
{
return
equipmentRepairMapper
.
getMaintenanceUserList
(
schoolReceiveQuery
);
}
String
url
=
"https://oapi.dingtalk.com/robot/send?access_token=06ac9f1927d64a8058d6df0ae21a4a2c6c6414c8567fb3fe89bbd3ec12fe0e3f"
;
//发送订单机器人
@Override
public
void
sendDDJqr
(
SchoolEquipmentRepair
schoolEquipmentRepair
)
{
//根据设备id获取设备信息
SchoolEquipmentLedger
schoolEquipmentLedger
=
equipmentLedgerMapper
.
selectById
(
schoolEquipmentRepair
.
getEquipmentId
());
StringBuffer
sb
=
new
StringBuffer
();
sb
.
append
(
"[智慧校园]消息通知:"
);
sb
.
append
(
"\n"
);
sb
.
append
(
"报修人:"
);
sb
.
append
(
schoolEquipmentRepair
.
getReportRepair
());
sb
.
append
(
"\n"
);
sb
.
append
(
"设备名称:"
);
sb
.
append
(
schoolEquipmentLedger
.
getEquipmentName
());
sb
.
append
(
"\n"
);
sb
.
append
(
"保修地点"
);
sb
.
append
(
schoolEquipmentRepair
.
getPlace
());
sb
.
append
(
"\n"
);
sb
.
append
(
"问题:"
);
sb
.
append
(
schoolEquipmentRepair
.
getProblem
());
//构造text语句
JSONObject
text
=
new
JSONObject
();
text
.
put
(
"content"
,
sb
.
toString
());
JSONObject
at
=
new
JSONObject
();
at
.
put
(
"atMobiles"
,
new
String
[]{
"13800000000"
});
at
.
put
(
"isAtAll"
,
false
);
//构造发送语句
JSONObject
json
=
new
JSONObject
();
json
.
put
(
"msgtype"
,
"text"
);
json
.
put
(
"text"
,
text
);
json
.
put
(
"at"
,
at
);
HttpUtils
.
sendJsonPost
(
url
,
json
);
}
}
smart-campus/src/main/java/yangtz/cs/liu/campus/service/impl/schoolEquipment/InStockServiceImpl.java
View file @
b3866f6a
...
...
@@ -28,20 +28,22 @@ public class InStockServiceImpl extends ServiceImpl<InStockMapper, SchoolInStock
*/
@Override
public
List
<
SchoolInStockVo
>
selectSchoolInStockVoList
(
SchoolInStockVo
schoolInStockVo
)
{
List
<
SysRole
>
roles
=
SecurityUtils
.
getLoginUser
().
getUser
().
getRoles
();
SysUser
user
=
SecurityUtils
.
getLoginUser
().
getUser
();
for
(
SysRole
role
:
roles
)
{
if
(
role
.
getRoleKey
().
equals
(
"admin"
)){
return
inStockMapper
.
selectSchoolInStockVoList
(
schoolInStockVo
);
}
else
if
(
role
.
getRoleKey
().
equals
(
"productCategoryAdmin"
)){
schoolInStockVo
.
setAdminId
(
SecurityUtils
.
getLoginUser
().
getUser
().
getUserId
());
return
inStockMapper
.
selectSchoolInStockVoListGr
(
schoolInStockVo
);
}
}
if
(
user
.
isAdmin
()){
return
inStockMapper
.
selectSchoolInStockVoList
(
schoolInStockVo
);
}
return
new
ArrayList
<>();
// List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
// SysUser user = SecurityUtils.getLoginUser().getUser();
// for (SysRole role : roles) {
// if (role.getRoleKey().equals("admin")){
// return inStockMapper.selectSchoolInStockVoList(schoolInStockVo);
// }else if (role.getRoleKey().equals("productCategoryAdmin")){
// schoolInStockVo.setAdminId(SecurityUtils.getLoginUser().getUser().getUserId());
// return inStockMapper.selectSchoolInStockVoListGr(schoolInStockVo);
// }
// }
// if (user.isAdmin()){
// return inStockMapper.selectSchoolInStockVoList(schoolInStockVo);
// }
// return new ArrayList<>();
}
/**
...
...
smart-campus/src/main/java/yangtz/cs/liu/campus/service/impl/schoolEquipment/OutStockServiceImpl.java
View file @
b3866f6a
...
...
@@ -28,20 +28,22 @@ public class OutStockServiceImpl extends ServiceImpl<OutStockMapper, SchoolOutSt
*/
@Override
public
List
<
SchoolOutStockVo
>
selectSchoolOutStockVoList
(
SchoolOutStockVo
schoolOutStockVo
)
{
List
<
SysRole
>
roles
=
SecurityUtils
.
getLoginUser
().
getUser
().
getRoles
();
SysUser
user
=
SecurityUtils
.
getLoginUser
().
getUser
();
for
(
SysRole
role
:
roles
)
{
if
(
role
.
getRoleKey
().
equals
(
"admin"
)){
return
outStockMapper
.
selectSchoolOutStockVoList
(
schoolOutStockVo
);
}
else
if
(
role
.
getRoleKey
().
equals
(
"productCategoryAdmin"
)){
schoolOutStockVo
.
setAdminId
(
SecurityUtils
.
getLoginUser
().
getUser
().
getUserId
());
return
outStockMapper
.
selectSchoolOutStockVoListGr
(
schoolOutStockVo
);
}
}
if
(
user
.
isAdmin
()){
return
outStockMapper
.
selectSchoolOutStockVoList
(
schoolOutStockVo
);
}
return
new
ArrayList
<>();
// List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
// SysUser user = SecurityUtils.getLoginUser().getUser();
// for (SysRole role : roles) {
// if (role.getRoleKey().equals("admin")){
// return outStockMapper.selectSchoolOutStockVoList(schoolOutStockVo);
// }else if (role.getRoleKey().equals("productCategoryAdmin")){
// schoolOutStockVo.setAdminId(SecurityUtils.getLoginUser().getUser().getUserId());
// return outStockMapper.selectSchoolOutStockVoListGr(schoolOutStockVo);
// }
// }
// if (user.isAdmin()){
// return outStockMapper.selectSchoolOutStockVoList(schoolOutStockVo);
// }
// return new ArrayList<>();
}
/**
...
...
smart-campus/src/main/java/yangtz/cs/liu/campus/service/impl/schoolEquipment/ProductCategoryServiceImpl.java
View file @
b3866f6a
...
...
@@ -37,20 +37,22 @@ public class ProductCategoryServiceImpl extends ServiceImpl<ProductCategoryMappe
*/
@Override
public
List
<
SchoolProductCategory
>
selectSchoolProductCateGory
(
SchoolProductCategory
schoolProductCategory
)
{
List
<
SysRole
>
roles
=
SecurityUtils
.
getLoginUser
().
getUser
().
getRoles
();
SysUser
user
=
SecurityUtils
.
getLoginUser
().
getUser
();
for
(
SysRole
role
:
roles
)
{
if
(
role
.
getRoleKey
().
equals
(
"admin"
)){
return
productCategoryMapper
.
selectSchoolProductCateGory
(
schoolProductCategory
);
}
else
if
(
role
.
getRoleKey
().
equals
(
"productCategoryAdmin"
)){
schoolProductCategory
.
setAdminId
(
SecurityUtils
.
getLoginUser
().
getUser
().
getUserId
());
return
productCategoryMapper
.
selectSchoolProductCateGoryGr
(
schoolProductCategory
);
}
}
if
(
user
.
isAdmin
()){
return
productCategoryMapper
.
selectSchoolProductCateGory
(
schoolProductCategory
);
}
return
new
ArrayList
<>();
// List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
// SysUser user = SecurityUtils.getLoginUser().getUser();
// for (SysRole role : roles) {
// if (role.getRoleKey().equals("admin")){
// return productCategoryMapper.selectSchoolProductCateGory(schoolProductCategory);
// }else if (role.getRoleKey().equals("productCategoryAdmin")){
// schoolProductCategory.setAdminId(SecurityUtils.getLoginUser().getUser().getUserId());
// return productCategoryMapper.selectSchoolProductCateGoryGr(schoolProductCategory);
// }
// }
// if (user.isAdmin()){
// return productCategoryMapper.selectSchoolProductCateGory(schoolProductCategory);
// }
// return new ArrayList<>();
}
/**
...
...
@@ -222,20 +224,22 @@ public class ProductCategoryServiceImpl extends ServiceImpl<ProductCategoryMappe
@Override
// @DataScope(userAlias = "u")
public
List
<
Map
<
String
,
String
>>
getEquipmentType
(
SchoolProductCategory
schoolProductCategory
)
{
List
<
SysRole
>
roles
=
SecurityUtils
.
getLoginUser
().
getUser
().
getRoles
();
SysUser
user
=
SecurityUtils
.
getLoginUser
().
getUser
();
for
(
SysRole
role
:
roles
)
{
if
(
role
.
getRoleKey
().
equals
(
"admin"
)){
return
productCategoryMapper
.
getEquipmentType
(
schoolProductCategory
);
}
else
if
(
role
.
getRoleKey
().
equals
(
"productCategoryAdmin"
)){
schoolProductCategory
.
setAdminId
(
SecurityUtils
.
getLoginUser
().
getUser
().
getUserId
());
return
productCategoryMapper
.
getEquipmentTypeGr
(
schoolProductCategory
);
}
}
if
(
user
.
isAdmin
()){
return
productCategoryMapper
.
getEquipmentType
(
schoolProductCategory
);
}
return
new
ArrayList
<>();
// List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
// SysUser user = SecurityUtils.getLoginUser().getUser();
// for (SysRole role : roles) {
// if (role.getRoleKey().equals("admin")){
// return productCategoryMapper.getEquipmentType(schoolProductCategory);
// }else if (role.getRoleKey().equals("productCategoryAdmin")){
// schoolProductCategory.setAdminId(SecurityUtils.getLoginUser().getUser().getUserId());
// return productCategoryMapper.getEquipmentTypeGr(schoolProductCategory);
// }
// }
// if (user.isAdmin()){
// return productCategoryMapper.getEquipmentType(schoolProductCategory);
// }
// return new ArrayList<>();
}
/**
...
...
@@ -268,31 +272,35 @@ public class ProductCategoryServiceImpl extends ServiceImpl<ProductCategoryMappe
*/
@Override
public
SchoolProductCategory
getEquipmentByCode
(
String
code
)
{
// List<SchoolProductCategory> list = new ArrayList<>();
List
<
SysRole
>
roles
=
SecurityUtils
.
getLoginUser
().
getUser
().
getRoles
();
SysUser
user
=
SecurityUtils
.
getLoginUser
().
getUser
();
if
(
user
.
isAdmin
()){
// list.clear();
LambdaQueryWrapper
<
SchoolProductCategory
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
SchoolProductCategory:
:
getClassificationCode
,
code
);
return
productCategoryMapper
.
selectOne
(
wrapper
);
}
for
(
SysRole
role
:
roles
)
{
if
(
role
.
getRoleKey
().
equals
(
"admin"
)){
// list.clear();
LambdaQueryWrapper
<
SchoolProductCategory
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
SchoolProductCategory:
:
getClassificationCode
,
code
);
// list.add(productCategoryMapper.selectOne(wrapper));
return
productCategoryMapper
.
selectOne
(
wrapper
);
// break;
}
else
if
(
role
.
getRoleKey
().
equals
(
"productCategoryAdmin"
)){
// list.clear();
LambdaQueryWrapper
<
SchoolProductCategory
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
SchoolProductCategory:
:
getClassificationCode
,
code
)
.
eq
(
SchoolProductCategory:
:
getAdminId
,
SecurityUtils
.
getLoginUser
().
getUser
().
getUserId
());
return
productCategoryMapper
.
selectOne
(
wrapper
);
}
}
throw
new
ServiceException
(
"该设备不再您管辖范围内"
);
// List<SchoolProductCategory> list = new ArrayList<>();
// List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
// SysUser user = SecurityUtils.getLoginUser().getUser();
// if (user.isAdmin()){
//// list.clear();
// LambdaQueryWrapper<SchoolProductCategory> wrapper = new LambdaQueryWrapper<>();
// wrapper.eq(SchoolProductCategory::getClassificationCode,code);
// return productCategoryMapper.selectOne(wrapper);
// }
// for (SysRole role : roles) {
// if (role.getRoleKey().equals("admin")){
//// list.clear();
// LambdaQueryWrapper<SchoolProductCategory> wrapper = new LambdaQueryWrapper<>();
// wrapper.eq(SchoolProductCategory::getClassificationCode,code);
//// list.add(productCategoryMapper.selectOne(wrapper));
// return productCategoryMapper.selectOne(wrapper);
//// break;
// }else if (role.getRoleKey().equals("productCategoryAdmin")){
//// list.clear();
// LambdaQueryWrapper<SchoolProductCategory> wrapper = new LambdaQueryWrapper<>();
// wrapper.eq(SchoolProductCategory::getClassificationCode,code)
// .eq(SchoolProductCategory::getAdminId,SecurityUtils.getLoginUser().getUser().getUserId());
// return productCategoryMapper.selectOne(wrapper);
// }
// }
// throw new ServiceException("该设备不再您管辖范围内");
}
}
smart-campus/src/main/java/yangtz/cs/liu/campus/service/impl/schoolEquipment/ReceiveServiceImpl.java
View file @
b3866f6a
...
...
@@ -39,20 +39,22 @@ public class ReceiveServiceImpl extends ServiceImpl<ReceiveMapper, SchoolReceive
*/
@Override
public
List
<
SchoolReceiveVo
>
selectSchoolReceiveVoList
(
SchoolReceiveVo
schoolReceiveVo
)
{
List
<
SysRole
>
roles
=
SecurityUtils
.
getLoginUser
().
getUser
().
getRoles
();
SysUser
user
=
SecurityUtils
.
getLoginUser
().
getUser
();
for
(
SysRole
role
:
roles
)
{
if
(
role
.
getRoleKey
().
equals
(
"admin"
)){
return
receiveMapper
.
selectSchoolReceiveVoList
(
schoolReceiveVo
);
}
else
if
(
role
.
getRoleKey
().
equals
(
"productCategoryAdmin"
)){
schoolReceiveVo
.
setAdminId
(
SecurityUtils
.
getLoginUser
().
getUser
().
getUserId
());
return
receiveMapper
.
selectSchoolReceiveVoListGr
(
schoolReceiveVo
);
}
}
if
(
user
.
isAdmin
()){
return
receiveMapper
.
selectSchoolReceiveVoList
(
schoolReceiveVo
);
}
return
new
ArrayList
<>();
// List<SysRole> roles = SecurityUtils.getLoginUser().getUser().getRoles();
// SysUser user = SecurityUtils.getLoginUser().getUser();
// for (SysRole role : roles) {
// if (role.getRoleKey().equals("admin")){
// return receiveMapper.selectSchoolReceiveVoList(schoolReceiveVo);
// }else if (role.getRoleKey().equals("productCategoryAdmin")){
// schoolReceiveVo.setAdminId(SecurityUtils.getLoginUser().getUser().getUserId());
// return receiveMapper.selectSchoolReceiveVoListGr(schoolReceiveVo);
// }
// }
// if (user.isAdmin()){
// return receiveMapper.selectSchoolReceiveVoList(schoolReceiveVo);
// }
// return new ArrayList<>();
}
/**
...
...
smart-campus/src/main/java/yangtz/cs/liu/campus/service/schoolEquipment/IEquipmentRepairService.java
View file @
b3866f6a
...
...
@@ -68,5 +68,8 @@ public interface IEquipmentRepairService extends IService<SchoolEquipmentRepair>
public
List
<
SchoolEquipmentRepairVo
>
getMaintenanceUserList
(
SchoolReceiveQuery
schoolReceiveQuery
);
//发送机器人保修信息
public
void
sendDDJqr
(
SchoolEquipmentRepair
schoolEquipmentRepair
);
}
smart-campus/src/main/java/yangtz/cs/liu/wechat/controller/equipment/EquipmentLeaseController.java
View file @
b3866f6a
...
...
@@ -152,24 +152,26 @@ public class EquipmentLeaseController {
*/
@GetMapping
(
"/getMaintenanceList"
)
private
AjaxResult
getMaintenanceList
(
SchoolReceiveQuery
schoolReceiveQuery
){
Boolean
flag
=
false
;
//1.管理员可以查看所有维修列表
SysUser
sysUser
=
iSysUserService
.
selectUserById
(
schoolReceiveQuery
.
getReportRepairid
());
List
<
SysRole
>
roles
=
sysUser
.
getRoles
();
for
(
SysRole
data
:
roles
){
if
(
data
.
getRoleKey
().
contains
(
"productCategoryAdmin"
)){
flag
=
true
;
break
;
}
};
if
(
false
){
List
<
SchoolEquipmentRepairVo
>
getlist
=
iEquipmentRepairService
.
getAdminList
(
schoolReceiveQuery
);
return
AjaxResult
.
success
(
getlist
);
}
else
{
List
<
SchoolEquipmentRepairVo
>
maintenanceList
=
iEquipmentRepairService
.
getMaintenanceList
(
schoolReceiveQuery
);
return
AjaxResult
.
success
(
maintenanceList
);
}
// Boolean flag= false;
// //1.管理员可以查看所有维修列表
// SysUser sysUser = iSysUserService.selectUserById(schoolReceiveQuery.getReportRepairid());
// List<SysRole> roles = sysUser.getRoles();
// for(SysRole data :roles){
// if (data.getRoleKey().contains("productCategoryAdmin")){
// flag=true;
// break;
// }
// };
// if (false){
// List<SchoolEquipmentRepairVo> getlist = iEquipmentRepairService.getAdminList(schoolReceiveQuery);
// return AjaxResult.success(getlist);
// }else {
// List<SchoolEquipmentRepairVo> maintenanceList = iEquipmentRepairService
// .getMaintenanceList(schoolReceiveQuery);
// return AjaxResult.success(maintenanceList);
// }
}
/**
...
...
@@ -177,6 +179,7 @@ public class EquipmentLeaseController {
*/
@PostMapping
(
"/addMaintenance"
)
private
AjaxResult
addMaintenance
(
@RequestBody
SchoolEquipmentRepair
schoolEquipmentRepair
){
iEquipmentRepairService
.
sendDDJqr
(
schoolEquipmentRepair
);
boolean
save
=
iEquipmentRepairService
.
save
(
schoolEquipmentRepair
);
return
AjaxResult
.
success
(
save
);
}
...
...
@@ -316,4 +319,8 @@ public class EquipmentLeaseController {
return
AjaxResult
.
success
(
iEquipmentRepairService
.
getRepair
());
}
}
smart-campus/src/main/resources/file/班主任任职导入模板.xlsx
View file @
b3866f6a
No preview for this file type
smart-campus/src/main/resources/mapper/schoolEquipment/EquipmentRepairMapper.xml
View file @
b3866f6a
...
...
@@ -160,8 +160,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
SELECT er.id,er.equipment_id,el.encode,el.equipment_name,el.model,el.date_of_production,er.place,el.place,el.classification_code,
er.report_repair_time,er.report_repair_id,er.report_repair,er.problem,er.repair_id,er.repair_name,er.repair_phone,
er.repair_time,er.repair_state,er.dispose_state,er.evaluate,er.remark FROM school_equipment_repair er LEFT JOIN
school_equipment_ledger el on er.equipment_id = el.id LEFT JOIN school_product_category pc
on pc.classification_code = el.classification_code WHERE pc.admin_id=#{reportRepairid} AND er.del_flag=0
school_equipment_ledger el on er.equipment_id = el.id where er.del_flag=0
<if
test=
"equipmentName != null and equipmentName != ''"
>
and el.equipment_name like concat('%', #{equipmentName}, '%')
</if>
ORDER BY er.report_repair_time DESC
</select>
...
...
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