Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sunac_report
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
java-sunac-report
sunac_report
Commits
75afabe0
Commit
75afabe0
authored
Oct 30, 2019
by
sunxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
角色新增
parent
f8dc5b81
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
111 additions
and
14 deletions
+111
-14
ReportEntity.java
src/main/java/com/ejweb/modules/report/entity/ReportEntity.java
+10
-0
ReportService.java
src/main/java/com/ejweb/modules/report/service/ReportService.java
+34
-6
SysUserController.java
src/main/java/com/ejweb/modules/sys/web/SysUserController.java
+28
-1
ReportDao.xml
src/main/resources/mappings/modules/report/ReportDao.xml
+24
-2
userForm.jsp
src/main/webapp/WEB-INF/views/modules/sys/userForm.jsp
+15
-5
No files found.
src/main/java/com/ejweb/modules/report/entity/ReportEntity.java
View file @
75afabe0
...
@@ -66,6 +66,16 @@ public class ReportEntity extends DataEntity<ReportEntity> {
...
@@ -66,6 +66,16 @@ public class ReportEntity extends DataEntity<ReportEntity> {
private
String
lStatus
;
//关闭修改状态
private
String
lStatus
;
//关闭修改状态
private
String
isAdmin
;
//是否管理员
private
String
isAdmin
;
//是否管理员
private
String
isFzAdmin
;
//是否輔助管理员
private
String
isFzAdmin
;
//是否輔助管理员
private
String
isFzAdmin02
;
//是否輔助管理员2 反舞弊负责人岗
public
String
getIsFzAdmin02
()
{
return
isFzAdmin02
;
}
public
void
setIsFzAdmin02
(
String
isFzAdmin02
)
{
this
.
isFzAdmin02
=
isFzAdmin02
;
}
private
String
oaarea
;
//账号区域
private
String
oaarea
;
//账号区域
private
String
participants
;
//参与人
private
String
participants
;
//参与人
private
String
insider
;
//知情人
private
String
insider
;
//知情人
...
...
src/main/java/com/ejweb/modules/report/service/ReportService.java
View file @
75afabe0
...
@@ -406,7 +406,7 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
...
@@ -406,7 +406,7 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
report
.
setTransferName
(
exchangeAfterUser
);
report
.
setTransferName
(
exchangeAfterUser
);
/*封装转换集团信息*/
/*封装转换集团信息*/
/* String supplementGroup = report.getSupplementGroup();*/
/* String supplementGroup = report.getSupplementGroup();*/
/* if(StringUtils.isNoneBlank(supplementGroup)){
/* if(StringUtils.isNoneBlank(supplementGroup)){
if("3437402691677202102".equals(supplementGroup)){
if("3437402691677202102".equals(supplementGroup)){
report.setSupplementGroup("集团本部");
report.setSupplementGroup("集团本部");
...
@@ -945,10 +945,10 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
...
@@ -945,10 +945,10 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
List
<
Role
>
roleList
=
roleDao
.
findList
(
roleEntity
);
List
<
Role
>
roleList
=
roleDao
.
findList
(
roleEntity
);
if
(
roleList
!=
null
&&
roleList
.
size
()
!=
0
)
{
if
(
roleList
!=
null
&&
roleList
.
size
()
!=
0
)
{
for
(
Role
role
:
roleList
)
{
for
(
Role
role
:
roleList
)
{
if
(
role
.
get
Name
().
equals
(
"系统管理员
"
))
{
if
(
role
.
get
Enname
().
equals
(
"admin
"
))
{
roleNum
=
"1"
;
roleNum
=
"1"
;
break
;
break
;
}
else
if
(
role
.
get
Name
().
equals
(
"辅助管理员
"
))
{
}
else
if
(
role
.
get
Enname
().
equals
(
"fuzhuadmin"
)
||
role
.
getEnname
().
equals
(
"fuzhuadmin02
"
))
{
roleNum
=
"2"
;
roleNum
=
"2"
;
break
;
break
;
}
}
...
@@ -959,6 +959,34 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
...
@@ -959,6 +959,34 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
}
}
/**
/**
* 检验是否是 反舞弊负责人岗
* @param user
* @return
*/
public
Boolean
checkRole02
(
User
user
)
{
boolean
flag
=
false
;
Role
roleEntity
=
new
Role
();
roleEntity
.
setUser
(
user
);
List
<
Role
>
roleList
=
roleDao
.
findList
(
roleEntity
);
if
(
roleList
!=
null
&&
roleList
.
size
()
!=
0
)
{
for
(
Role
role
:
roleList
)
{
if
(
role
.
getEnname
().
equals
(
"admin"
))
{
flag
=
false
;
break
;
}
else
if
(
role
.
getEnname
().
equals
(
"fuzhuadmin"
))
{
flag
=
false
;
break
;
}
else
if
(
role
.
getEnname
().
equals
(
"fuzhuadmin02"
))
{
flag
=
true
;
break
;
}
}
}
return
flag
;
}
/**
* 判断当前用户角色 1管理员 2辅助管理员
* 判断当前用户角色 1管理员 2辅助管理员
*
*
* @param
* @param
...
@@ -972,7 +1000,7 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
...
@@ -972,7 +1000,7 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
List
<
Role
>
roleList
=
roleDao
.
findList
(
roleEntity
);
List
<
Role
>
roleList
=
roleDao
.
findList
(
roleEntity
);
if
(
roleList
!=
null
&&
roleList
.
size
()
!=
0
)
{
if
(
roleList
!=
null
&&
roleList
.
size
()
!=
0
)
{
for
(
Role
role
:
roleList
)
{
for
(
Role
role
:
roleList
)
{
if
(
role
.
getName
().
equals
(
"
辅助管理员
"
))
{
if
(
role
.
getName
().
equals
(
"
反舞弊内控员工岗"
)||
role
.
getName
().
equals
(
"反舞弊负责人岗
"
))
{
roleName
=
"辅助管理员"
;
roleName
=
"辅助管理员"
;
break
;
break
;
}
}
...
@@ -1047,8 +1075,8 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
...
@@ -1047,8 +1075,8 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
*/
*/
public
Page
<
ReportEntity
>
findQyList
(
Page
<
ReportEntity
>
page
,
ReportEntity
reportEntity
)
{
public
Page
<
ReportEntity
>
findQyList
(
Page
<
ReportEntity
>
page
,
ReportEntity
reportEntity
)
{
reportEntity
.
setPage
(
page
);
reportEntity
.
setPage
(
page
);
/*
/*
* *//*查询出区域列表所有集团 id 封装到reportEntity实体内*//*
* *//*查询出区域列表所有集团 id 封装到reportEntity实体内*//*
List<CtBbtcRegion> allList = ctBbtcRegionDao.findAllList();
List<CtBbtcRegion> allList = ctBbtcRegionDao.findAllList();
System.out.println("区域总数:=========="+allList.size());
System.out.println("区域总数:=========="+allList.size());
reportEntity.setRegionList(allList);
reportEntity.setRegionList(allList);
...
...
src/main/java/com/ejweb/modules/sys/web/SysUserController.java
View file @
75afabe0
...
@@ -11,6 +11,7 @@ import com.ejweb.core.utils.StringUtils;
...
@@ -11,6 +11,7 @@ import com.ejweb.core.utils.StringUtils;
import
com.ejweb.core.utils.excel.ExportExcel
;
import
com.ejweb.core.utils.excel.ExportExcel
;
import
com.ejweb.core.utils.excel.ImportExcel
;
import
com.ejweb.core.utils.excel.ImportExcel
;
import
com.ejweb.core.validator.BeanValidators
;
import
com.ejweb.core.validator.BeanValidators
;
import
com.ejweb.modules.report.service.ReportService
;
import
com.ejweb.modules.sys.entity.Office
;
import
com.ejweb.modules.sys.entity.Office
;
import
com.ejweb.modules.sys.entity.Role
;
import
com.ejweb.modules.sys.entity.Role
;
import
com.ejweb.modules.sys.entity.User
;
import
com.ejweb.modules.sys.entity.User
;
...
@@ -43,6 +44,9 @@ public class SysUserController extends BaseController {
...
@@ -43,6 +44,9 @@ public class SysUserController extends BaseController {
@Autowired
@Autowired
private
SystemService
systemService
;
private
SystemService
systemService
;
@Autowired
private
ReportService
reportService
;
@ModelAttribute
@ModelAttribute
public
User
get
(
@RequestParam
(
required
=
false
)
String
id
)
{
public
User
get
(
@RequestParam
(
required
=
false
)
String
id
)
{
...
@@ -78,6 +82,7 @@ public class SysUserController extends BaseController {
...
@@ -78,6 +82,7 @@ public class SysUserController extends BaseController {
@RequiresPermissions
(
"sys:user:view"
)
@RequiresPermissions
(
"sys:user:view"
)
@RequestMapping
(
value
=
"form"
)
@RequestMapping
(
value
=
"form"
)
public
String
form
(
User
user
,
Model
model
)
{
public
String
form
(
User
user
,
Model
model
)
{
if
(
user
.
getCompany
()==
null
||
user
.
getCompany
().
getId
()==
null
){
if
(
user
.
getCompany
()==
null
||
user
.
getCompany
().
getId
()==
null
){
user
.
setCompany
(
UserUtils
.
getUser
().
getCompany
());
user
.
setCompany
(
UserUtils
.
getUser
().
getCompany
());
}
}
...
@@ -88,9 +93,31 @@ public class SysUserController extends BaseController {
...
@@ -88,9 +93,31 @@ public class SysUserController extends BaseController {
if
(
StringUtils
.
isNotBlank
(
user
.
getId
())){
if
(
StringUtils
.
isNotBlank
(
user
.
getId
())){
user
=
systemService
.
getUser
(
user
.
getId
());
user
=
systemService
.
getUser
(
user
.
getId
());
}
}
model
.
addAttribute
(
"user"
,
user
);
model
.
addAttribute
(
"user"
,
user
);
List
<
Role
>
roleList
=
systemService
.
findAllRole
();
List
<
Role
>
roleList
=
systemService
.
findAllRole
();
//判断登录人的角色 如果是新角色 反舞弊负责人 去掉集团审查。。。角色
User
userr
=
UserUtils
.
getUser
();
Boolean
isAdmin
=
reportService
.
checkRole02
(
userr
);
//当角色为 反舞弊负责人岗位时 不能让其修改系统管理员的人员资料
String
show_save
=
"0"
;
List
<
Role
>
roleList1
=
user
.
getRoleList
();
if
(
isAdmin
){
for
(
int
i
=
roleList
.
size
()
-
1
;
i
>
0
;
i
--)
{
if
(
"admin"
.
equals
(
roleList
.
get
(
i
).
getEnname
()))
{
System
.
out
.
println
(
roleList
.
get
(
i
).
getName
()+
"=========="
);
roleList
.
remove
(
roleList
.
get
(
i
));
}
}
for
(
Role
role:
roleList1
)
{
if
(
"admin"
.
equals
(
role
.
getEnname
())){
show_save
=
"1"
;
}
}
}
model
.
addAttribute
(
"show_save"
,
show_save
);
for
(
int
i
=
roleList
.
size
()
-
1
;
i
>
0
;
i
--)
{
for
(
int
i
=
roleList
.
size
()
-
1
;
i
>
0
;
i
--)
{
if
(
"1"
.
equals
(
roleList
.
get
(
i
).
getUnChecked
()))
{
if
(
"1"
.
equals
(
roleList
.
get
(
i
).
getUnChecked
()))
{
roleList
.
remove
(
roleList
.
get
(
i
));
roleList
.
remove
(
roleList
.
get
(
i
));
...
...
src/main/resources/mappings/modules/report/ReportDao.xml
View file @
75afabe0
...
@@ -99,7 +99,7 @@
...
@@ -99,7 +99,7 @@
LEFT JOIN ct_bbtc_region CR2 ON r.transferArea = CR2.id
LEFT JOIN ct_bbtc_region CR2 ON r.transferArea = CR2.id
<where>
<where>
1 = 1
1 = 1
<if
test=
"isAdmin == null and isFzAdmin == null
"
>
<if
test=
"isAdmin == null and isFzAdmin == null
and isFzAdmin02 == null"
>
AND r.exchange_after_user = #{exchangeAfterUser} AND r.create_by != #{exchangeAfterUser}
AND r.exchange_after_user = #{exchangeAfterUser} AND r.create_by != #{exchangeAfterUser}
</if>
</if>
<if
test=
"isAdmin != null"
>
<if
test=
"isAdmin != null"
>
...
@@ -110,6 +110,11 @@
...
@@ -110,6 +110,11 @@
R.EXCHANGE_AFTER_USER = #{exchangeBeforeUser}
R.EXCHANGE_AFTER_USER = #{exchangeBeforeUser}
OR R.CREATE_BY = #{exchangeBeforeUser})) AND SU.AREA IS NULL
OR R.CREATE_BY = #{exchangeBeforeUser})) AND SU.AREA IS NULL
</if>
</if>
<if
test=
"isFzAdmin02 != null"
>
AND ((R.EXCHANGE_BEFORE_USER = #{exchangeBeforeUser} OR
R.EXCHANGE_AFTER_USER = #{exchangeBeforeUser}
OR R.CREATE_BY = #{exchangeBeforeUser})) AND SU.AREA IS NULL
</if>
<if
test=
"reportStatus != null and reportStatus != ''"
>
<if
test=
"reportStatus != null and reportStatus != ''"
>
AND r.report_status = #{reportStatus}
AND r.report_status = #{reportStatus}
</if>
</if>
...
@@ -298,7 +303,7 @@
...
@@ -298,7 +303,7 @@
ON R.supplement_type = CC.type*/
ON R.supplement_type = CC.type*/
<where>
<where>
1 = 1
1 = 1
<if
test=
"isAdmin == null and isFzAdmin == null"
>
<if
test=
"isAdmin == null and isFzAdmin == null
and isFzAdmin02 == null
"
>
AND r.exchange_after_user = #{exchangeAfterUser} AND r.create_by = #{exchangeAfterUser}
AND r.exchange_after_user = #{exchangeAfterUser} AND r.create_by = #{exchangeAfterUser}
</if>
</if>
<if
test=
"isAdmin != null"
>
<if
test=
"isAdmin != null"
>
...
@@ -333,6 +338,23 @@
...
@@ -333,6 +338,23 @@
*/
*/
AND su.area IS NOT NULL
AND su.area IS NOT NULL
</if>
</if>
<if
test=
"isFzAdmin02 != null"
>
AND r.Exchange_After_User = #{exchangeBeforeUser}
AND r.create_by != #{exchangeBeforeUser}
/*
AND su.area IN ('North China',
'BeiJing',
'ShangHai',
'SouthWest',
'SouthEast',
'Central China',
'GuangShen',
'Hainan',
'Group',
'PropertyGroup')
*/
AND su.area IS NOT NULL
</if>
<if
test=
"reportStatus != null and reportStatus != ''"
>
<if
test=
"reportStatus != null and reportStatus != ''"
>
AND r.report_status = #{reportStatus}
AND r.report_status = #{reportStatus}
</if>
</if>
...
...
src/main/webapp/WEB-INF/views/modules/sys/userForm.jsp
View file @
75afabe0
...
@@ -241,11 +241,20 @@
...
@@ -241,11 +241,20 @@
</div>
</div>
</div>
</div>
</c:if>
--%>
</c:if>
--%>
<div
class=
"form-actions"
>
<c:if
test=
"${show_save eq 1}"
>
<shiro:hasPermission
name=
"sys:user:edit"
><input
id=
"btnSubmit"
class=
"btn btn-primary"
type=
"submit"
<div
class=
"form-actions"
>
value=
"保 存"
/>
</shiro:hasPermission>
<h3>
您暂时没有权限修改集团审计监察部门负责人岗角色人员资料!!!
</h3>
<input
id=
"btnCancel"
class=
"btn"
type=
"button"
value=
"返 回"
onclick=
"history.go(-1)"
/>
<input
id=
"btnCancel"
class=
"btn"
type=
"button"
value=
"返 回"
onclick=
"history.go(-1)"
/>
</div>
</div>
</c:if>
<c:if
test=
"${show_save eq 0}"
>
<div
class=
"form-actions"
>
<shiro:hasPermission
name=
"sys:user:edit"
><input
id=
"btnSubmit"
class=
"btn btn-primary"
type=
"submit"
value=
"保 存"
/>
</shiro:hasPermission>
<input
id=
"btnCancel"
class=
"btn"
type=
"button"
value=
"返 回"
onclick=
"history.go(-1)"
/>
</div>
</c:if>
</form:form>
</form:form>
</body>
</body>
</html>
</html>
\ No newline at end of file
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