Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
chnmuseum-party
Project
Project
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
liqin
chnmuseum-party
Commits
e538c807
Commit
e538c807
authored
Apr 01, 2021
by
wzp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
f75cc9f4
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
33 additions
and
192 deletions
+33
-192
TOrganService.java
...a/cn/wisenergy/chnmuseum/party/service/TOrganService.java
+1
-1
TOrganServiceImpl.java
...nergy/chnmuseum/party/service/impl/TOrganServiceImpl.java
+2
-2
AuditController.java
...nergy/chnmuseum/party/web/controller/AuditController.java
+16
-6
TBoxOperationController.java
...nmuseum/party/web/controller/TBoxOperationController.java
+5
-5
TOperationLogController.java
...nmuseum/party/web/controller/TOperationLogController.java
+0
-175
TOrganController.java
...ergy/chnmuseum/party/web/controller/TOrganController.java
+1
-2
TUserController.java
...nergy/chnmuseum/party/web/controller/TUserController.java
+5
-1
TUserMapper.xml
src/main/resources/mapper/TUserMapper.xml
+3
-0
No files found.
src/main/java/cn/wisenergy/chnmuseum/party/service/TOrganService.java
View file @
e538c807
...
@@ -15,7 +15,7 @@ import java.util.List;
...
@@ -15,7 +15,7 @@ import java.util.List;
*/
*/
public
interface
TOrganService
extends
IService
<
TOrgan
>
{
public
interface
TOrganService
extends
IService
<
TOrgan
>
{
List
<
TOrgan
>
getTree
();
List
<
TOrgan
>
getTree
(
String
orgCode
);
boolean
batchUpload
(
List
excelList
);
boolean
batchUpload
(
List
excelList
);
...
...
src/main/java/cn/wisenergy/chnmuseum/party/service/impl/TOrganServiceImpl.java
View file @
e538c807
...
@@ -38,8 +38,8 @@ public class TOrganServiceImpl extends ServiceImpl<TOrganMapper, TOrgan> impleme
...
@@ -38,8 +38,8 @@ public class TOrganServiceImpl extends ServiceImpl<TOrganMapper, TOrgan> impleme
private
TAreaMapper
areaMapper
;
private
TAreaMapper
areaMapper
;
@Override
@Override
public
List
<
TOrgan
>
getTree
()
{
public
List
<
TOrgan
>
getTree
(
String
orgCode
)
{
List
<
TOrgan
>
list
=
list
(
Wrappers
.<
TOrgan
>
lambdaQuery
().
eq
(
TOrgan:
:
getIsDeleted
,
0
).
orderByDesc
(
TOrgan:
:
getLevel
));
List
<
TOrgan
>
list
=
list
(
Wrappers
.<
TOrgan
>
lambdaQuery
().
eq
(
TOrgan:
:
getIsDeleted
,
0
).
likeRight
(
TOrgan:
:
getCode
,
orgCode
).
orderByDesc
(
TOrgan:
:
getLevel
));
HashMap
<
String
,
TOrgan
>
map
=
new
HashMap
<>();
HashMap
<
String
,
TOrgan
>
map
=
new
HashMap
<>();
list
.
forEach
(
o
->
map
.
put
(
o
.
getId
(),
o
));
list
.
forEach
(
o
->
map
.
put
(
o
.
getId
(),
o
));
for
(
TOrgan
o
:
list
)
{
for
(
TOrgan
o
:
list
)
{
...
...
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/AuditController.java
View file @
e538c807
...
@@ -9,6 +9,7 @@ import cn.wisenergy.chnmuseum.party.common.vo.GenericPageParam;
...
@@ -9,6 +9,7 @@ import cn.wisenergy.chnmuseum.party.common.vo.GenericPageParam;
import
cn.wisenergy.chnmuseum.party.model.Audit
;
import
cn.wisenergy.chnmuseum.party.model.Audit
;
import
cn.wisenergy.chnmuseum.party.model.TUser
;
import
cn.wisenergy.chnmuseum.party.model.TUser
;
import
cn.wisenergy.chnmuseum.party.service.AuditService
;
import
cn.wisenergy.chnmuseum.party.service.AuditService
;
import
cn.wisenergy.chnmuseum.party.service.impl.AuditServiceImpl
;
import
cn.wisenergy.chnmuseum.party.service.impl.TUserServiceImpl
;
import
cn.wisenergy.chnmuseum.party.service.impl.TUserServiceImpl
;
import
cn.wisenergy.chnmuseum.party.web.controller.base.BaseController
;
import
cn.wisenergy.chnmuseum.party.web.controller.base.BaseController
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
...
@@ -47,7 +48,7 @@ import java.util.Map;
...
@@ -47,7 +48,7 @@ import java.util.Map;
public
class
AuditController
extends
BaseController
{
public
class
AuditController
extends
BaseController
{
@Resource
@Resource
private
AuditService
auditService
;
private
AuditService
Impl
auditService
;
@Resource
@Resource
private
TUserServiceImpl
userService
;
private
TUserServiceImpl
userService
;
...
@@ -80,8 +81,11 @@ public class AuditController extends BaseController {
...
@@ -80,8 +81,11 @@ public class AuditController extends BaseController {
//如果是账号禁用初审员,设置层级为初审
//如果是账号禁用初审员,设置层级为初审
if
(
user1
.
getRoleList
().
contains
(
"15"
)){
if
(
user1
.
getRoleList
().
contains
(
"15"
)){
user
.
setAuditStatus
(
AuditStatusEnum
.
TBC
.
name
());
user
.
setAuditStatus
(
AuditStatusEnum
.
TBC
.
name
());
}
else
{
}
else
if
(
user1
.
getRoleList
().
contains
(
"16"
))
{
user
.
setAuditStatus
(
AuditStatusEnum
.
TBCA
.
name
());
user
.
setAuditStatus
(
AuditStatusEnum
.
TBCA
.
name
());
}
else
{
//不存在的层级
user
.
setAuditStatus
(
"1"
);
}
}
auditList
=
auditService
.
getUserList
(
getPage
(),
user
);
auditList
=
auditService
.
getUserList
(
getPage
(),
user
);
return
getResult
(
auditList
);
return
getResult
(
auditList
);
...
@@ -238,28 +242,34 @@ public class AuditController extends BaseController {
...
@@ -238,28 +242,34 @@ public class AuditController extends BaseController {
AuditStatusEnum
auditStatus
=
null
;
AuditStatusEnum
auditStatus
=
null
;
AuditStatusEnum
auditStatusLevel
=
null
;
AuditStatusEnum
auditStatusLevel
=
null
;
AuditTypeEnum
auditTypeEnum
=
AuditTypeEnum
.
valueOf
(
type
);
AuditTypeEnum
auditTypeEnum
=
AuditTypeEnum
.
valueOf
(
type
);
//数据权限,暂时注释
// TUser user = getcurUser();
// TUser user = getcurUser();
// switch (auditTypeEnum){
// switch (auditTypeEnum){
// case ASSET:
// case ASSET:
// if (user.getRoleList().contains("9")){
// if (user.getRoleList().contains("9")){
// auditStatusLevel=AuditStatusEnum.TBC;
// auditStatusLevel=AuditStatusEnum.TBC;
// }else {
// }else
if(user.getRoleList().contains("10"))
{
// auditStatusLevel=AuditStatusEnum.TBCA;
// auditStatusLevel=AuditStatusEnum.TBCA;
// }else {
// auditStatusLevel=AuditStatusEnum.APPROVED_FINAL;
// }
// }
// break;
// break;
// case EXHIBITION_BOARD:
// case EXHIBITION_BOARD:
// if (user.getRoleList().contains("11")){
// if (user.getRoleList().contains("11")){
// auditStatusLevel=AuditStatusEnum.TBC;
// auditStatusLevel=AuditStatusEnum.TBC;
// }else {
// }else
if(user.getRoleList().contains("12"))
{
// auditStatusLevel=AuditStatusEnum.TBCA;
// auditStatusLevel=AuditStatusEnum.TBCA;
// }else {
// auditStatusLevel=AuditStatusEnum.APPROVED_FINAL;
// }
// }
// break;
// break;
// case LEARNING_CONTENT:
// case LEARNING_CONTENT:
// if (user.getRoleList().contains("13")){
// if (user.getRoleList().contains("13")){
// auditStatusLevel=AuditStatusEnum.TBC;
// auditStatusLevel=AuditStatusEnum.TBC;
// }else {
// }else
if(user.getRoleList().contains("14"))
{
// auditStatusLevel=AuditStatusEnum.TBCA;
// auditStatusLevel=AuditStatusEnum.TBCA;
// }else {
// auditStatusLevel=AuditStatusEnum.APPROVED_FINAL;
// }
// }
// break;
// break;
//
//
...
...
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/TBoxOperationController.java
View file @
e538c807
...
@@ -62,10 +62,10 @@ public class TBoxOperationController extends BaseController {
...
@@ -62,10 +62,10 @@ public class TBoxOperationController extends BaseController {
user
.
setAreaId
(
areaId
);
user
.
setAreaId
(
areaId
);
}
}
//设置数据权限
//设置数据权限
if
(
StringUtils
.
isNotBlank
(
user1
.
getAreaId
()))
{
//
if (StringUtils.isNotBlank(user1.getAreaId())) {
String
areaId1
=
getAreaId
(
user1
.
getAreaId
());
//
String areaId1 = getAreaId(user1.getAreaId());
user
.
setAreaName
(
areaId1
);
//
user.setAreaName(areaId1);
}
//
}
user
.
setOrgCode
(
user1
.
getOrgCode
());
user
.
setOrgCode
(
user1
.
getOrgCode
());
try
{
try
{
Page
<
TBoxOperation
>
page
=
tBoxOperationService
.
selectBoxPage
(
getPage
(),
user
);
Page
<
TBoxOperation
>
page
=
tBoxOperationService
.
selectBoxPage
(
getPage
(),
user
);
...
@@ -212,7 +212,7 @@ public class TBoxOperationController extends BaseController {
...
@@ -212,7 +212,7 @@ public class TBoxOperationController extends BaseController {
}
}
public
String
getAreaId
(
String
areaId
)
{
public
static
String
getAreaId
(
String
areaId
)
{
if
(
"0000"
.
equals
(
areaId
.
substring
(
2
)))
{
if
(
"0000"
.
equals
(
areaId
.
substring
(
2
)))
{
areaId
=
areaId
.
substring
(
0
,
2
);
areaId
=
areaId
.
substring
(
0
,
2
);
}
else
if
(
"00"
.
equals
(
areaId
.
substring
(
4
)))
{
}
else
if
(
"00"
.
equals
(
areaId
.
substring
(
4
)))
{
...
...
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/TOperationLogController.java
deleted
100644 → 0
View file @
f75cc9f4
//package cn.wisenergy.chnmuseum.party.web.controller;
//
//import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
//import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
//import com.baomidou.mybatisplus.core.toolkit.Wrappers;
//import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
//import cn.wisenergy.chnmuseum.party.web.controller.base.BaseController;
//import cn.wisenergy.chnmuseum.party.model.TOperationLog;
//import cn.wisenergy.chnmuseum.party.service.TOperationLogService;
//import cn.wisenergy.chnmuseum.party.common.enums.AuditStatusEnum;
//import cn.wisenergy.chnmuseum.party.common.validator.groups.Add;
//import cn.wisenergy.chnmuseum.party.common.validator.groups.Update;
//import cn.wisenergy.chnmuseum.party.common.vo.GenericPageParam;
//
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiImplicitParam;
//import io.swagger.annotations.ApiImplicitParams;
//import io.swagger.annotations.ApiOperation;
//
//import lombok.extern.slf4j.Slf4j;
//import org.apache.commons.lang3.StringUtils;
//import org.apache.shiro.authz.annotation.RequiresPermissions;
//import org.springframework.validation.annotation.Validated;
//import org.springframework.web.bind.annotation.*;
//import org.springframework.stereotype.Controller;
//
//import javax.annotation.Resource;
//import javax.validation.constraints.NotNull;
//import java.util.List;
//import java.util.Map;
//
///**
// * <pre>
// * 运维日志表 前端控制器
// * </pre>
// *
// * @author Danny Lee
// * @since 2021-03-23
// */
//@Slf4j
//@RestController
//@RequestMapping("/tOperationLog")
//@Api(tags = {"运维日志表操作接口"})
//public class TOperationLogController extends BaseController {
//
// @Resource
// private TOperationLogService tOperationLogService;
//
// @PostMapping("/batchSave")
// @RequiresPermissions("t:operation:log:batch:save")
// @ApiOperation(value = "批量添加运维日志表", notes = "批量添加运维日志表")
// public Map<String, Object> batchSaveTOperationLog(@Validated(value = {Add.class}) List<TOperationLog> tOperationLogList) {
// // 保存业务节点信息
// boolean result = tOperationLogService.saveBatch(tOperationLogList);
// // 返回操作结果
// if (result) {
// return getSuccessResult();
// } else {
// // 保存失败
// return getFailResult();
// }
// }
//
// @PostMapping("/save")
// @RequiresPermissions("t:operation:log:save")
// @ApiOperation(value = "添加运维日志表", notes = "添加运维日志表")
// public Map<String, Object> saveTOperationLog(@Validated(value = {Add.class}) TOperationLog tOperationLog) {
// // 保存业务节点信息
// boolean result = tOperationLogService.save(tOperationLog);
// // 返回操作结果
// if (result) {
// return getSuccessResult();
// } else {
// // 保存失败
// return getFailResult();
// }
// }
//
// @PutMapping("/update")
// @RequiresPermissions("t:operation:log:update")
// @ApiOperation(value = "修改运维日志表信息", notes = "修改运维日志表信息")
// public Map<String, Object> updateTOperationLog(@Validated(value = {Update.class}) TOperationLog tOperationLog) {
// boolean flag = tOperationLogService.updateById(tOperationLog);
// if (flag) {
// return getSuccessResult();
// }
// return getFailResult();
// }
//
// @PutMapping("/updateAuditStatus/{id}")
// @RequiresPermissions("t:operation:log:update:audit:status")
// @ApiOperation(value = "更新运维日志表审核状态", notes = "更新运维日志表审核状态")
// @ApiImplicitParams(value = {
// @ApiImplicitParam(name = "id", value = "标识ID", dataType = "String", paramType = "path"),
// @ApiImplicitParam(name = "status", value = "状态", paramType = "query", dataType = "String")
// })
// public Map<String, Object> updateStatus(@NotNull(message = "运维日志表ID不能为空") @PathVariable("id") String id, @RequestParam("status") AuditStatusEnum status) {
// UpdateWrapper<TOperationLog> updateWrapper = new UpdateWrapper<>();
// updateWrapper.eq("id", id);
// updateWrapper.eq("audit_status", status.name());
// boolean flag = tOperationLogService.update(updateWrapper);
// if (flag) {
// return getSuccessResult();
// }
// return getFailResult();
// }
//
// @DeleteMapping("/delete/{id}")
// @RequiresPermissions("t:operation:log:delete")
// @ApiOperation(value = "根据ID删除运维日志表", notes = "根据ID删除运维日志表")
// @ApiImplicitParams(value = {
// @ApiImplicitParam(name = "id", value = "标识ID", paramType = "path", dataType = "String")
// })
// public Map<String, Object> deleteTOperationLog(@PathVariable("id") String id) {
// boolean result = tOperationLogService.removeById(id);
// if (result) {
// return getSuccessResult();
// }
// return getFailResult();
// }
//
// @GetMapping("/getList")
// @RequiresPermissions("t:operation:log:list")
// @ApiOperation(value = "获取运维日志表全部列表(无分页)", notes = "获取运维日志表全部列表(无分页)")
// @ApiImplicitParams(value = {
// @ApiImplicitParam(name = "auditStatus", value = "审核状态", paramType = "query", dataType = "String")
// })
// public Map<String, Object> getTOperationLogList(@RequestParam(value = "auditStatus", defaultValue = "APPROVED_FINAL", required = false) AuditStatusEnum auditStatus) {
// List<TOperationLog> tOperationLogList = tOperationLogService.list();
// return getResult(tOperationLogList);
// }
//
// @ApiImplicitParams(value = {
// @ApiImplicitParam(name = "_index", value = "分页起始偏移量", paramType = "query", dataType = "Integer"),
// @ApiImplicitParam(name = "_size", value = "返回条数", paramType = "query", dataType = "Integer"),
// @ApiImplicitParam(name = "nameOrCode", value = "名称或编码", paramType = "query", dataType = "String"),
// @ApiImplicitParam(name = "startDate", value = "创建时间-开始", paramType = "query", dataType = "String"),
// @ApiImplicitParam(name = "endDate", value = "创建时间-结束", paramType = "query", dataType = "String")
// })
// @PostMapping("/getPageList")
// @RequiresPermissions("t:operation:log:page")
// @ApiOperation(value = "获取运维日志表分页列表", notes = "获取运维日志表分页列表")
// public Map<String, Object> getTOperationLogPageList(GenericPageParam genericPageParam) {
// LambdaQueryWrapper<TOperationLog> queryWrapper = new LambdaQueryWrapper<>();
// // 对名称或编码模糊查询
// if (StringUtils.isNotBlank(genericPageParam.getNameOrCode())) {
// queryWrapper.like(TOperationLog::getUserId, genericPageParam.getNameOrCode());
// }
// // 根据创建时间区间检索
// if (genericPageParam.getStartDate() != null && genericPageParam.getEndDate() != null) {
// queryWrapper.ge(TOperationLog::getCreateTime, genericPageParam.getStartDate().atTime(0, 0, 0))
// .le(TOperationLog::getCreateTime, genericPageParam.getEndDate().atTime(23, 59, 59));
// }
// // 设置排序规则
// queryWrapper.orderByDesc(TOperationLog::getCreateTime);
// Page<TOperationLog> page = this.tOperationLogService.page(getPage(), queryWrapper);
// for (TOperationLog tOperationLog : page.getRecords()) {
//
// }
// return getResult(page);
// }
//
// @ApiOperation(value = "获取运维日志表详情", notes = "获取运维日志表详情")
// @ApiImplicitParams({
// @ApiImplicitParam(name = "id", value = "标识ID", dataType = "String", paramType = "path")
// })
// @GetMapping("/get/{id}")
// @RequiresPermissions("t:operation:log:get:id")
// public Map<String, Object> getById(@PathVariable("id") String id) {
// TOperationLog tOperationLog = tOperationLogService.getById(id);
// return getResult(tOperationLog);
// }
//
//}
//
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/TOrganController.java
View file @
e538c807
...
@@ -242,10 +242,9 @@ public class TOrganController extends BaseController {
...
@@ -242,10 +242,9 @@ public class TOrganController extends BaseController {
public
Map
<
String
,
Object
>
getTree
(
String
name
)
{
public
Map
<
String
,
Object
>
getTree
(
String
name
)
{
TUser
user
=
getcurUser
();
TUser
user
=
getcurUser
();
List
<
TOrgan
>
list
=
new
ArrayList
<>();
List
<
TOrgan
>
list
=
new
ArrayList
<>();
try
{
try
{
if
(
StringUtils
.
isBlank
(
name
))
{
if
(
StringUtils
.
isBlank
(
name
))
{
list
=
tOrganService
.
getTree
();
list
=
tOrganService
.
getTree
(
user
.
getOrgCode
()
);
}
else
{
}
else
{
list
=
tOrganService
.
list
(
new
UpdateWrapper
<
TOrgan
>().
like
(
"name"
,
name
).
likeRight
(
"code"
,
user
.
getOrgCode
()));
list
=
tOrganService
.
list
(
new
UpdateWrapper
<
TOrgan
>().
like
(
"name"
,
name
).
likeRight
(
"code"
,
user
.
getOrgCode
()));
}
}
...
...
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/TUserController.java
View file @
e538c807
...
@@ -89,10 +89,14 @@ public class TUserController extends BaseController {
...
@@ -89,10 +89,14 @@ public class TUserController extends BaseController {
}
}
if
(
StringUtils
.
isNotBlank
(
type
))
{
if
(
StringUtils
.
isNotBlank
(
type
))
{
user
.
setType
(
type
);
user
.
setType
(
type
);
if
(!
"4"
.
equals
(
type
)
&&
!
"5"
.
equals
(
type
)
)
{
if
(!
"4"
.
equals
(
type
))
{
//设置用户数据权限
//设置用户数据权限
user
.
setOrgCode
(
user1
.
getOrgCode
());
user
.
setOrgCode
(
user1
.
getOrgCode
());
}
}
if
(
"4"
.
equals
(
type
))
{
//设置用户数据权限
user
.
setAreaName
(
TBoxOperationController
.
getAreaId
(
user1
.
getAreaId
()));
}
if
(
"2"
.
equals
(
type
))
{
if
(
"2"
.
equals
(
type
))
{
List
<
String
>
roleList
=
user1
.
getRoleList
();
List
<
String
>
roleList
=
user1
.
getRoleList
();
//如果是单位用户,只能查看本机构的单位用户
//如果是单位用户,只能查看本机构的单位用户
...
...
src/main/resources/mapper/TUserMapper.xml
View file @
e538c807
...
@@ -87,6 +87,9 @@
...
@@ -87,6 +87,9 @@
<if
test=
" user.areaId != null and user.areaId != '' "
>
<if
test=
" user.areaId != null and user.areaId != '' "
>
and u.area_id = #{user.areaId}
and u.area_id = #{user.areaId}
</if>
</if>
<if
test=
" user.areaName != null and user.areaName != '' "
>
and u.area_id LIKE concat(#{user.areaName}, '%')
</if>
and u.is_deleted = false
and u.is_deleted = false
order by u.create_time desc
order by u.create_time desc
</select>
</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