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
80e3ad9e
Commit
80e3ad9e
authored
Dec 09, 2021
by
袁伟铭
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加职责办事项目录绑定
parent
afe47988
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
72 additions
and
8 deletions
+72
-8
resource-server/src/main/java/com/zq/resource/controller/DeptDutyController.java
+10
-1
resource-server/src/main/java/com/zq/resource/service/DeptDutyService.java
+62
-7
No files found.
resource-server/src/main/java/com/zq/resource/controller/DeptDutyController.java
View file @
80e3ad9e
...
...
@@ -127,7 +127,7 @@ public class DeptDutyController {
return
ResultVo
.
success
();
}
@ApiOperation
(
"获取
机构职责
列表"
)
@ApiOperation
(
"获取
职责办事项
列表"
)
@PostMapping
(
value
=
"/getDeptLiabilityList"
)
public
ResultVo
<
PageVo
<
DeptLiability
>>
getDeptLiabilityList
(
@RequestBody
KeywordFindVo
vo
)
{
return
ResultVo
.
success
(
deptDutyService
.
getDeptLiabilityList
(
vo
));
...
...
@@ -220,6 +220,15 @@ public class DeptDutyController {
return
ResultVo
.
success
();
}
@ApiOperation
(
"删除事项-资源目录表"
)
@DeleteMapping
(
value
=
"/deleteDeptLiabilityCategory/{id}"
)
public
ResultVo
deleteDeptLiabilityCategory
(
@PathVariable
String
id
)
{
AssertUtils
.
hasText
(
id
,
"ID不能为空"
);
deptDutyService
.
deleteDeptLiabilityCategory
(
id
);
return
ResultVo
.
success
();
}
@ApiOperation
(
"获取事项-资源目录表列表"
)
@PostMapping
(
value
=
"/getDeptLiabilityCategoryList"
)
public
ResultVo
<
PageVo
<
DeptLiabilityCategoryVo
>>
getDeptLiabilityCategoryList
(
@RequestBody
DeptLiabilityCategoryFindVo
vo
)
{
...
...
resource-server/src/main/java/com/zq/resource/service/DeptDutyService.java
View file @
80e3ad9e
...
...
@@ -3,6 +3,7 @@ package com.zq.resource.service;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.util.StrUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.zq.common.utils.AssertUtils
;
...
...
@@ -21,10 +22,7 @@ import lombok.RequiredArgsConstructor;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Service
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
...
...
@@ -40,6 +38,7 @@ public class DeptDutyService {
private
final
DeptLiabilityCategoryDao
deptLiabilityCategoryDao
;
private
final
DeptLiabilityLabelDao
deptLiabilityLabelDao
;
private
final
OrgDeptDao
orgDeptDao
;
private
final
DataCategoryDao
dataCategoryDao
;
public
PageVo
<
DeptDuty
>
getDeptDutyList
(
DeptDutyFindVo
vo
)
{
LambdaQueryWrapper
<
DeptDuty
>
lambdaQuery
=
Wrappers
.
lambdaQuery
(
DeptDuty
.
class
);
...
...
@@ -153,6 +152,11 @@ public class DeptDutyService {
}
public
void
addDeptLiabilityCategory
(
DeptLiabilityCategory
vo
)
{
DataCategory
dataCategory
=
dataCategoryDao
.
selectById
(
vo
.
getCategoryId
());
AssertUtils
.
notNull
(
dataCategory
,
"目录不存在"
);
DeptLiability
deptLiability
=
deptLiabilityDao
.
selectById
(
vo
.
getDeptLiabilityId
());
AssertUtils
.
notNull
(
deptLiability
,
"办事项不存在"
);
vo
.
setCreateTime
(
DateUtil
.
date
());
vo
.
setUpdateTime
(
DateUtil
.
date
());
...
...
@@ -171,11 +175,47 @@ public class DeptDutyService {
}
public
PageVo
<
DeptLiabilityCategoryVo
>
getDeptLiabilityCategoryList
(
DeptLiabilityCategoryFindVo
vo
)
{
return
PagingUtils
.
paging
(
vo
,
deptLiabilityCategoryDao:
:
getDeptLiabilityCategoryList
);
LambdaQueryWrapper
<
DeptLiabilityCategory
>
lambdaQuery
=
Wrappers
.
lambdaQuery
(
DeptLiabilityCategory
.
class
);
lambdaQuery
.
orderByDesc
(
DeptLiabilityCategory:
:
getCreateTime
);
List
<
DeptLiabilityCategoryVo
>
list
=
new
ArrayList
<>();
PageVo
<
DeptLiabilityCategory
>
paging
=
PagingUtils
.
paging
(
vo
,
deptLiabilityCategoryDao
,
DeptLiabilityCategory
.
class
,
lambdaQuery
);
for
(
DeptLiabilityCategory
row
:
paging
.
getRows
())
{
DataCategory
dataCategory
=
dataCategoryDao
.
selectById
(
row
.
getCategoryId
());
DeptLiability
deptLiability
=
deptLiabilityDao
.
selectById
(
row
.
getDeptLiabilityId
());
DeptLiabilityCategoryVo
build
=
DeptLiabilityCategoryVo
.
builder
()
.
id
(
row
.
getId
())
.
categoryId
(
dataCategory
.
getId
())
.
deptLiabilityId
(
deptLiability
.
getId
())
.
categoryName
(
dataCategory
.
getCataTitle
())
.
deptLiabilityName
(
deptLiability
.
getBusinessName
())
.
createTime
(
row
.
getCreateTime
())
.
updateTime
(
row
.
getUpdateTime
())
.
build
();
list
.
add
(
build
);
}
return
PageVo
.
ofReqVo
(
vo
,
list
,
paging
.
getTotal
());
}
public
DeptLiabilityCategoryVo
getDeptLiabilityCategoryInfo
(
String
liabilityCategoryId
)
{
return
deptLiabilityCategoryDao
.
getDeptLiabilityCategoryById
(
liabilityCategoryId
);
DeptLiabilityCategory
deptLiabilityCategory
=
deptLiabilityCategoryDao
.
selectById
(
liabilityCategoryId
);
AssertUtils
.
notNull
(
deptLiabilityCategory
,
"办事项目录不存在"
);
DataCategory
dataCategory
=
dataCategoryDao
.
selectById
(
deptLiabilityCategory
.
getCategoryId
());
DeptLiability
deptLiability
=
deptLiabilityDao
.
selectById
(
deptLiabilityCategory
.
getDeptLiabilityId
());
DeptLiabilityCategoryVo
build
=
DeptLiabilityCategoryVo
.
builder
()
.
id
(
deptLiabilityCategory
.
getId
())
.
categoryId
(
dataCategory
.
getId
())
.
deptLiabilityId
(
deptLiability
.
getId
())
.
categoryName
(
dataCategory
.
getCataTitle
())
.
deptLiabilityName
(
deptLiability
.
getBusinessName
())
.
createTime
(
deptLiabilityCategory
.
getCreateTime
())
.
updateTime
(
deptLiabilityCategory
.
getUpdateTime
())
.
build
();
return
build
;
}
public
void
addDeptLiabilityLabel
(
DeptLiabilityLabel
vo
)
{
...
...
@@ -261,7 +301,18 @@ public class DeptDutyService {
String
label
=
deptLiabilityLabelList
.
stream
().
map
(
DeptLiabilityLabel:
:
getLabel
).
collect
(
Collectors
.
joining
(
";"
));
params
.
put
(
"label"
,
label
);
params
.
put
(
"cataId"
,
""
);
List
<
DeptLiabilityCategory
>
liabilityCategoryList
=
deptLiabilityCategoryDao
.
selectList
(
Wrappers
.
lambdaQuery
(
DeptLiabilityCategory
.
builder
().
deptLiabilityId
(
deptLiability
.
getId
()).
build
()));
List
<
DataCategory
>
list
=
new
ArrayList
<>();
for
(
DeptLiabilityCategory
deptLiabilityCategory
:
liabilityCategoryList
)
{
DataCategory
dataCategory
=
dataCategoryDao
.
selectById
(
deptLiabilityCategory
.
getCategoryId
());
if
(
dataCategory
!=
null
)
{
AssertUtils
.
hasText
(
dataCategory
.
getCascadeguid
(),
dataCategory
.
getCataTitle
()
+
"目录未注册"
);
list
.
add
(
dataCategory
);
}
}
String
cataId
=
list
.
stream
().
map
(
DataCategory:
:
getCascadeguid
).
filter
(
StrUtil:
:
isNotBlank
).
collect
(
Collectors
.
joining
(
";"
));
params
.
put
(
"cataId"
,
cataId
);
ShareApiResponse
shareApiResponse
=
ShareApiUtils
.
doPost
(
params
,
ShareApiEnum
.
RESPONSIBILITY_ADD_UPDATE
);
if
(
shareApiResponse
.
isSuccess
())
{
deptLiability
.
setCascadeguid
(
shareApiResponse
.
getString
(
"cascadeguid"
));
...
...
@@ -318,4 +369,8 @@ public class DeptDutyService {
public
void
deleteDeptLiabilityLabel
(
String
id
)
{
deptLiabilityLabelDao
.
deleteById
(
id
);
}
public
void
deleteDeptLiabilityCategory
(
String
id
)
{
deptLiabilityCategoryDao
.
deleteById
(
id
);
}
}
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