Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
civil-bigdata
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
civil
civil-bigdata
Commits
4e502a6f
Commit
4e502a6f
authored
Aug 25, 2021
by
袁伟铭
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加请求工具类
parent
3d1e3602
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
14 additions
and
16 deletions
+14
-16
resource-server/src/main/java/com/zq/resource/controller/admin/CategoryController.java
+1
-1
resource-server/src/main/java/com/zq/resource/controller/admin/DeptController.java
+3
-4
resource-server/src/main/java/com/zq/resource/controller/admin/DictController.java
+1
-2
resource-server/src/main/java/com/zq/resource/controller/admin/GovAffairController.java
+1
-1
resource-server/src/main/java/com/zq/resource/controller/admin/GovMonitorController.java
+1
-1
resource-server/src/main/java/com/zq/resource/controller/admin/MetadataController.java
+1
-1
resource-server/src/main/java/com/zq/resource/controller/admin/SystemController.java
+2
-2
resource-server/src/main/java/com/zq/resource/service/DeptService.java
+4
-4
No files found.
resource-server/src/main/java/com/zq/resource/controller/admin/CategoryController.java
View file @
4e502a6f
...
@@ -51,7 +51,7 @@ public class CategoryController {
...
@@ -51,7 +51,7 @@ public class CategoryController {
@ApiOperation
(
"修改目录"
)
@ApiOperation
(
"修改目录"
)
@PostMapping
(
value
=
"/modifyCategory"
)
@PostMapping
(
value
=
"/modifyCategory"
)
public
ResultVo
modifyCategory
(
@RequestBody
DataCategory
vo
)
{
public
ResultVo
modifyCategory
(
@RequestBody
DataCategory
vo
)
{
AssertUtils
.
notNull
(
vo
.
getId
());
AssertUtils
.
hasText
(
vo
.
getId
());
categoryService
.
modifyCategory
(
vo
);
categoryService
.
modifyCategory
(
vo
);
return
ResultVo
.
success
();
return
ResultVo
.
success
();
...
...
resource-server/src/main/java/com/zq/resource/controller/admin/DeptController.java
View file @
4e502a6f
...
@@ -34,21 +34,20 @@ public class DeptController {
...
@@ -34,21 +34,20 @@ public class DeptController {
@ApiOperation
(
"获取机构信息"
)
@ApiOperation
(
"获取机构信息"
)
@GetMapping
(
value
=
"/getDeptInfo/{deptId}"
)
@GetMapping
(
value
=
"/getDeptInfo/{deptId}"
)
public
ResultVo
<
OrgDeptVo
>
getDeptInfo
(
@PathVariable
Lo
ng
deptId
)
{
public
ResultVo
<
OrgDeptVo
>
getDeptInfo
(
@PathVariable
Stri
ng
deptId
)
{
AssertUtils
.
notNull
(
deptId
,
"缺少机构ID"
);
AssertUtils
.
notNull
(
deptId
,
"缺少机构ID"
);
return
ResultVo
.
success
(
deptService
.
getDeptInfo
(
deptId
));
return
ResultVo
.
success
(
deptService
.
getDeptInfo
(
deptId
));
}
}
@ApiOperation
(
"根据部门PID查询子机构"
)
@ApiOperation
(
"根据部门PID查询子机构"
)
@GetMapping
(
value
=
"/getDeptByPid/{parentId}"
)
@GetMapping
(
value
=
"/getDeptByPid/{parentId}"
)
public
ResultVo
<
List
<
OrgDept
>>
getDeptByPid
(
@PathVariable
Lo
ng
parentId
)
{
public
ResultVo
<
List
<
OrgDept
>>
getDeptByPid
(
@PathVariable
Stri
ng
parentId
)
{
return
ResultVo
.
success
(
deptService
.
getDeptByPid
(
parentId
));
return
ResultVo
.
success
(
deptService
.
getDeptByPid
(
parentId
));
}
}
@ApiOperation
(
"添加机构"
)
@ApiOperation
(
"添加机构"
)
@PostMapping
(
value
=
"/addDept"
)
@PostMapping
(
value
=
"/addDept"
)
public
ResultVo
addDept
(
@RequestBody
OrgDept
vo
)
{
public
ResultVo
addDept
(
@RequestBody
OrgDept
vo
)
{
AssertUtils
.
notNull
(
vo
.
getParentId
(),
"缺少父级ID"
);
AssertUtils
.
hasText
(
vo
.
getDeptName
(),
"缺少机构名称"
);
AssertUtils
.
hasText
(
vo
.
getDeptName
(),
"缺少机构名称"
);
AssertUtils
.
notNull
(
vo
.
getDeptType
(),
"缺少机构类型"
);
AssertUtils
.
notNull
(
vo
.
getDeptType
(),
"缺少机构类型"
);
AssertUtils
.
hasText
(
vo
.
getAreaCode
(),
"缺少区域码"
);
AssertUtils
.
hasText
(
vo
.
getAreaCode
(),
"缺少区域码"
);
...
@@ -65,7 +64,7 @@ public class DeptController {
...
@@ -65,7 +64,7 @@ public class DeptController {
@ApiOperation
(
"修改机构"
)
@ApiOperation
(
"修改机构"
)
@PostMapping
(
value
=
"/modifyDept"
)
@PostMapping
(
value
=
"/modifyDept"
)
public
ResultVo
modifyDept
(
@RequestBody
OrgDept
vo
)
{
public
ResultVo
modifyDept
(
@RequestBody
OrgDept
vo
)
{
AssertUtils
.
notNull
(
vo
.
getId
());
AssertUtils
.
hasText
(
vo
.
getId
());
deptService
.
modifyDept
(
vo
);
deptService
.
modifyDept
(
vo
);
return
ResultVo
.
success
();
return
ResultVo
.
success
();
...
...
resource-server/src/main/java/com/zq/resource/controller/admin/DictController.java
View file @
4e502a6f
...
@@ -3,7 +3,6 @@ package com.zq.resource.controller.admin;
...
@@ -3,7 +3,6 @@ package com.zq.resource.controller.admin;
import
com.zq.common.utils.AssertUtils
;
import
com.zq.common.utils.AssertUtils
;
import
com.zq.common.vo.PageVo
;
import
com.zq.common.vo.PageVo
;
import
com.zq.common.vo.ResultVo
;
import
com.zq.common.vo.ResultVo
;
import
com.zq.resource.entity.DataCategory
;
import
com.zq.resource.entity.DataDict
;
import
com.zq.resource.entity.DataDict
;
import
com.zq.resource.service.DictService
;
import
com.zq.resource.service.DictService
;
import
com.zq.resource.vo.DataDictFindVo
;
import
com.zq.resource.vo.DataDictFindVo
;
...
@@ -49,7 +48,7 @@ public class DictController {
...
@@ -49,7 +48,7 @@ public class DictController {
@ApiOperation
(
"修改字典"
)
@ApiOperation
(
"修改字典"
)
@PostMapping
(
value
=
"/modifyDict"
)
@PostMapping
(
value
=
"/modifyDict"
)
public
ResultVo
modifyDict
(
@RequestBody
DataDict
vo
)
{
public
ResultVo
modifyDict
(
@RequestBody
DataDict
vo
)
{
AssertUtils
.
notNull
(
vo
.
getId
());
AssertUtils
.
hasText
(
vo
.
getId
());
dictService
.
modifyDict
(
vo
);
dictService
.
modifyDict
(
vo
);
return
ResultVo
.
success
();
return
ResultVo
.
success
();
...
...
resource-server/src/main/java/com/zq/resource/controller/admin/GovAffairController.java
View file @
4e502a6f
...
@@ -48,7 +48,7 @@ public class GovAffairController {
...
@@ -48,7 +48,7 @@ public class GovAffairController {
@ApiOperation
(
"修改政务服务事项"
)
@ApiOperation
(
"修改政务服务事项"
)
@PostMapping
(
value
=
"/modifyGovAffair"
)
@PostMapping
(
value
=
"/modifyGovAffair"
)
public
ResultVo
modifyGovAffair
(
@RequestBody
GovAffairItem
vo
)
{
public
ResultVo
modifyGovAffair
(
@RequestBody
GovAffairItem
vo
)
{
AssertUtils
.
notNull
(
vo
.
getId
());
AssertUtils
.
hasText
(
vo
.
getId
());
govAffairService
.
modifyGovAffair
(
vo
);
govAffairService
.
modifyGovAffair
(
vo
);
return
ResultVo
.
success
();
return
ResultVo
.
success
();
...
...
resource-server/src/main/java/com/zq/resource/controller/admin/GovMonitorController.java
View file @
4e502a6f
...
@@ -48,7 +48,7 @@ public class GovMonitorController {
...
@@ -48,7 +48,7 @@ public class GovMonitorController {
@ApiOperation
(
"修改政务监管事项"
)
@ApiOperation
(
"修改政务监管事项"
)
@PostMapping
(
value
=
"/modifyGovMonitor"
)
@PostMapping
(
value
=
"/modifyGovMonitor"
)
public
ResultVo
modifyGovMonitor
(
@RequestBody
GovMonitorItem
vo
)
{
public
ResultVo
modifyGovMonitor
(
@RequestBody
GovMonitorItem
vo
)
{
AssertUtils
.
notNull
(
vo
.
getId
());
AssertUtils
.
hasText
(
vo
.
getId
());
govMonitorService
.
modifyGovMonitor
(
vo
);
govMonitorService
.
modifyGovMonitor
(
vo
);
return
ResultVo
.
success
();
return
ResultVo
.
success
();
...
...
resource-server/src/main/java/com/zq/resource/controller/admin/MetadataController.java
View file @
4e502a6f
...
@@ -57,7 +57,7 @@ public class MetadataController {
...
@@ -57,7 +57,7 @@ public class MetadataController {
@ApiOperation
(
"修改字典"
)
@ApiOperation
(
"修改字典"
)
@PostMapping
(
value
=
"/modifyMetadata"
)
@PostMapping
(
value
=
"/modifyMetadata"
)
public
ResultVo
modifyMetadata
(
@RequestBody
InfoMetadata
vo
)
{
public
ResultVo
modifyMetadata
(
@RequestBody
InfoMetadata
vo
)
{
AssertUtils
.
notNull
(
vo
.
getId
());
AssertUtils
.
hasText
(
vo
.
getId
());
metadataService
.
modifyMetadata
(
vo
);
metadataService
.
modifyMetadata
(
vo
);
return
ResultVo
.
success
();
return
ResultVo
.
success
();
...
...
resource-server/src/main/java/com/zq/resource/controller/admin/SystemController.java
View file @
4e502a6f
...
@@ -36,7 +36,7 @@ public class SystemController {
...
@@ -36,7 +36,7 @@ public class SystemController {
@PostMapping
(
value
=
"/addSystem"
)
@PostMapping
(
value
=
"/addSystem"
)
public
ResultVo
addSystem
(
@RequestBody
InfoSystem
vo
)
{
public
ResultVo
addSystem
(
@RequestBody
InfoSystem
vo
)
{
AssertUtils
.
hasText
(
vo
.
getSystemName
(),
"缺少系统名称"
);
AssertUtils
.
hasText
(
vo
.
getSystemName
(),
"缺少系统名称"
);
AssertUtils
.
notNull
(
vo
.
getBelongDeptId
(),
"缺少所属部门ID"
);
AssertUtils
.
hasText
(
vo
.
getBelongDeptId
(),
"缺少所属部门ID"
);
AssertUtils
.
notNull
(
vo
.
getSystemType
(),
"缺少系统类型"
);
AssertUtils
.
notNull
(
vo
.
getSystemType
(),
"缺少系统类型"
);
AssertUtils
.
notNull
(
vo
.
getSystemLevelType
(),
"缺少系统层级"
);
AssertUtils
.
notNull
(
vo
.
getSystemLevelType
(),
"缺少系统层级"
);
AssertUtils
.
notNull
(
vo
.
getCoverLevelType
(),
"缺少覆盖层级"
);
AssertUtils
.
notNull
(
vo
.
getCoverLevelType
(),
"缺少覆盖层级"
);
...
@@ -58,7 +58,7 @@ public class SystemController {
...
@@ -58,7 +58,7 @@ public class SystemController {
@ApiOperation
(
"修改系统"
)
@ApiOperation
(
"修改系统"
)
@PostMapping
(
value
=
"/modifySystem"
)
@PostMapping
(
value
=
"/modifySystem"
)
public
ResultVo
modifySystem
(
@RequestBody
InfoSystem
vo
)
{
public
ResultVo
modifySystem
(
@RequestBody
InfoSystem
vo
)
{
AssertUtils
.
notNull
(
vo
.
getId
());
AssertUtils
.
hasText
(
vo
.
getId
());
systemService
.
modifySystem
(
vo
);
systemService
.
modifySystem
(
vo
);
return
ResultVo
.
success
();
return
ResultVo
.
success
();
...
...
resource-server/src/main/java/com/zq/resource/service/DeptService.java
View file @
4e502a6f
...
@@ -3,7 +3,6 @@ package com.zq.resource.service;
...
@@ -3,7 +3,6 @@ package com.zq.resource.service;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.date.DateUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.StringUtils
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.zq.common.utils.AssertUtils
;
import
com.zq.common.utils.AssertUtils
;
import
com.zq.common.utils.PagingUtils
;
import
com.zq.common.utils.PagingUtils
;
...
@@ -15,6 +14,7 @@ import com.zq.resource.vo.DataTreeVo;
...
@@ -15,6 +14,7 @@ import com.zq.resource.vo.DataTreeVo;
import
com.zq.resource.vo.OrgDeptFindVo
;
import
com.zq.resource.vo.OrgDeptFindVo
;
import
com.zq.resource.vo.OrgDeptVo
;
import
com.zq.resource.vo.OrgDeptVo
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.List
;
...
@@ -55,7 +55,7 @@ public class DeptService {
...
@@ -55,7 +55,7 @@ public class DeptService {
return
PagingUtils
.
paging
(
vo
,
orgDeptDao
,
OrgDept
.
class
,
lambdaQuery
);
return
PagingUtils
.
paging
(
vo
,
orgDeptDao
,
OrgDept
.
class
,
lambdaQuery
);
}
}
public
List
<
OrgDept
>
getDeptByPid
(
Lo
ng
parentId
)
{
public
List
<
OrgDept
>
getDeptByPid
(
Stri
ng
parentId
)
{
return
orgDeptDao
.
selectList
(
Wrappers
.
lambdaQuery
(
OrgDept
.
builder
().
parentId
(
parentId
).
build
()));
return
orgDeptDao
.
selectList
(
Wrappers
.
lambdaQuery
(
OrgDept
.
builder
().
parentId
(
parentId
).
build
()));
}
}
...
@@ -105,13 +105,13 @@ public class DeptService {
...
@@ -105,13 +105,13 @@ public class DeptService {
return
TreeUtils
.
buildTree
(
collect
,
"0"
);
return
TreeUtils
.
buildTree
(
collect
,
"0"
);
}
}
public
OrgDeptVo
getDeptInfo
(
Lo
ng
deptId
)
{
public
OrgDeptVo
getDeptInfo
(
Stri
ng
deptId
)
{
OrgDept
orgDept
=
orgDeptDao
.
selectById
(
deptId
);
OrgDept
orgDept
=
orgDeptDao
.
selectById
(
deptId
);
AssertUtils
.
notNull
(
orgDept
,
"机构不存在"
);
AssertUtils
.
notNull
(
orgDept
,
"机构不存在"
);
OrgDeptVo
orgDeptVo
=
BeanUtil
.
copyProperties
(
orgDept
,
OrgDeptVo
.
class
);
OrgDeptVo
orgDeptVo
=
BeanUtil
.
copyProperties
(
orgDept
,
OrgDeptVo
.
class
);
if
(
orgDept
.
getParentId
()
!=
null
&&
orgDept
.
getParentId
()
!=
0
)
{
if
(
StringUtils
.
isNotBlank
(
orgDept
.
getParentId
())
)
{
OrgDept
parentDept
=
orgDeptDao
.
selectById
(
orgDept
.
getParentId
());
OrgDept
parentDept
=
orgDeptDao
.
selectById
(
orgDept
.
getParentId
());
if
(
parentDept
!=
null
)
{
if
(
parentDept
!=
null
)
{
orgDeptVo
.
setParentName
(
parentDept
.
getDeptName
());
orgDeptVo
.
setParentName
(
parentDept
.
getDeptName
());
...
...
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