Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
long-tern-care-service
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
hubin
long-tern-care-service
Commits
2f490131
Commit
2f490131
authored
Feb 27, 2023
by
zhangwanglin
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev_ch_master' into dev_nursing_records_20230214
parents
10047a2c
e51b7e07
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
231 additions
and
107 deletions
+231
-107
ChDisabAccountsDetailMapper.xml
...src/main/resources/mapper/ChDisabAccountsDetailMapper.xml
+98
-98
DisableController.java
...n/java/com/hungraim/ltc/controller/DisableController.java
+10
-0
DisableService.java
...rc/main/java/com/hungraim/ltc/service/DisableService.java
+8
-0
DisableServiceImpl.java
...ava/com/hungraim/ltc/service/impl/DisableServiceImpl.java
+6
-0
TaskController.java
...main/java/com/hungraim/ltc/controller/TaskController.java
+39
-0
ChDisableEvaluateMapper.xml
...ice/src/main/resources/mapper/ChDisableEvaluateMapper.xml
+3
-0
AuthConstants.java
...rc/main/java/com/hungraim/ltc/constant/AuthConstants.java
+5
-0
ChAprReport.java
.../com/hungraim/ltc/pojo/entity/assessment/ChAprReport.java
+9
-0
SystemInterface.java
.../com/hungraim/ltc/pojo/entity/system/SystemInterface.java
+4
-0
TaskReportVO.java
...ava/com/hungraim/ltc/pojo/vo/assessment/TaskReportVO.java
+10
-0
AuthorizationManager.java
...m/hungraim/ltc/gateway/security/AuthorizationManager.java
+14
-0
RoleController.java
...va/com/hungraim/ltc/system/controller/RoleController.java
+9
-3
UserController.java
...va/com/hungraim/ltc/system/controller/UserController.java
+11
-5
SystemInterfaceMapper.java
...va/com/hungraim/ltc/system/dao/SystemInterfaceMapper.java
+1
-1
SystemInterfaceServiceImpl.java
...m/ltc/system/service/impl/SystemInterfaceServiceImpl.java
+4
-0
No files found.
account/account-service/src/main/resources/mapper/ChDisabAccountsDetailMapper.xml
View file @
2f490131
...
@@ -2,28 +2,28 @@
...
@@ -2,28 +2,28 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.hungraim.ltc.account.dao.ChDisabAccountsDetailMapper"
>
<mapper
namespace=
"com.hungraim.ltc.account.dao.ChDisabAccountsDetailMapper"
>
<select
id=
"queryOrganAccountsDetail"
resultType=
"com.hungraim.ltc.pojo.entity.account.ChDisabDetailAccountsResp"
>
<select
id=
"queryOrganAccountsDetail"
resultType=
"com.hungraim.ltc.pojo.entity.account.ChDisabDetailAccountsResp"
>
select
select
d.MODE_NAME modeName,
d.MODE_NAME modeName,
to_char(d.ACCOUNTS_START_TIME,'yyyy-MM-dd') accountsStartTime,
to_char(d.ACCOUNTS_START_TIME,'yyyy-MM-dd') accountsStartTime,
to_char(d.ACCOUNTS_END_TIME,'yyyy-MM-dd') accountsEndTime,
to_char(d.ACCOUNTS_END_TIME,'yyyy-MM-dd') accountsEndTime,
to_char(d.ACCOUNTS_TIME,'yyyy-MM') accountsTime,
to_char(d.ACCOUNTS_TIME,'yyyy-MM') accountsTime,
emp.EMP_NAME empName,
emp.EMP_NAME empName,
d.ACCOUNTS_ALL_COST accountsAllCost,
d.ACCOUNTS_ALL_COST accountsAllCost,
d.ACCOUNTS_OVERALL_COST accountsOverallCost,
d.ACCOUNTS_OVERALL_COST accountsOverallCost,
d.ACCOUNTS_PERSONAL_COST accountsPersonalCost,
d.ACCOUNTS_PERSONAL_COST accountsPersonalCost,
d.TASK_DETAIL_ID taskDetailId,
d.TASK_DETAIL_ID taskDetailId,
(select district_name from ch_fnd_district dis where apply.MEDICAL_AREA = dis.district_code) medicalArea,
(select district_name from ch_fnd_district dis where apply.MEDICAL_AREA = dis.district_code) medicalArea,
o.SRV_ORGAN_NAME srvOrganName,
o.SRV_ORGAN_NAME srvOrganName,
info.REAL_NAME realName,
info.REAL_NAME realName,
d.DEDUCTION_AMOUNT deductionAmount,
d.DEDUCTION_AMOUNT deductionAmount,
d.REISSUE_AMOUNT reissueAmount,
d.REISSUE_AMOUNT reissueAmount,
d.ACCOUNTS_DETAIL_ID accountsDetailId,
d.ACCOUNTS_DETAIL_ID accountsDetailId,
d.STATUS
d.STATUS
from CH_DISAB_ACCOUNTS_DETAIL d
from CH_DISAB_ACCOUNTS_DETAIL d
left join CH_DISABLE_INFO info on d.DISAB_INFO_ID = info.DISAB_INFO_ID
left join CH_DISABLE_INFO info on d.DISAB_INFO_ID = info.DISAB_INFO_ID
left join CH_DISABLE_APPLY apply on info.APPLY_ID=apply.APPLY_ID
left join CH_DISABLE_APPLY apply on info.APPLY_ID=apply.APPLY_ID
left join CH_SRV_ORGAN o on d.SRV_ORGAN_ID = o.SRV_ORGAN_ID
left join CH_SRV_ORGAN o on d.SRV_ORGAN_ID = o.SRV_ORGAN_ID
left join ch_srv_organ_emp emp on d.emp_id = emp.emp_id
left join ch_srv_organ_emp emp on d.emp_id = emp.emp_id
<where>
<where>
1=1
1=1
<if
test=
"req.accountsId != null and req.accountsId != ''"
>
<if
test=
"req.accountsId != null and req.accountsId != ''"
>
...
@@ -50,16 +50,16 @@ left join CH_DISABLE_INFO info on d.DISAB_INFO_ID = info.DISAB_INFO_ID
...
@@ -50,16 +50,16 @@ left join CH_DISABLE_INFO info on d.DISAB_INFO_ID = info.DISAB_INFO_ID
</select>
</select>
<select
id=
"queryNursingRecords"
resultType=
"com.hungraim.ltc.pojo.entity.account.NursingRecordsRespVO"
>
<select
id=
"queryNursingRecords"
resultType=
"com.hungraim.ltc.pojo.entity.account.NursingRecordsRespVO"
>
select organ.SRV_ORGAN_NAME srvOrganName,
select organ.SRV_ORGAN_NAME srvOrganName,
detail.MODE_NAME modeName,
detail.MODE_NAME modeName,
to_char(item.FCD,'yyyy-MM-dd HH:mm:ss') executionTime,
to_char(item.FCD,'yyyy-MM-dd HH:mm:ss') executionTime,
service.SERVICE_TYPE_DETAILED_NAME itemName
service.SERVICE_TYPE_DETAILED_NAME itemName
from CH_DISAB_ACCOUNTS_DETAIL detail
from CH_DISAB_ACCOUNTS_DETAIL detail
left join CH_SRV_TASK_FINISH_ITEM item on detail.TASK_DETAIL_ID = item.TASK_DETAIL_ID
left join CH_SRV_TASK_FINISH_ITEM item on detail.TASK_DETAIL_ID = item.TASK_DETAIL_ID
left join CH_SRV_ORGAN organ on organ.SRV_ORGAN_ID = detail.SRV_ORGAN_ID
left join CH_SRV_ORGAN organ on organ.SRV_ORGAN_ID = detail.SRV_ORGAN_ID
LEFT JOIN CH_SRV_ORGAN_PROJECT CSOP ON CSOP.PROJECT_ID = item.ITEM_ID
LEFT JOIN CH_SRV_ORGAN_PROJECT CSOP ON CSOP.PROJECT_ID = item.ITEM_ID
left join CH_SERVICE_TYPE_DETAILED service on service.SERVICE_TYPE_DETAILED_ID = CSOP.ITEM_NAME
left join CH_SERVICE_TYPE_DETAILED service on service.SERVICE_TYPE_DETAILED_ID = CSOP.ITEM_NAME
where detail.TASK_DETAIL_ID = #{taskDetailId}
where detail.TASK_DETAIL_ID = #{taskDetailId}
</select>
</select>
...
@@ -170,7 +170,7 @@ left join CH_DISABLE_INFO info on d.DISAB_INFO_ID = info.DISAB_INFO_ID
...
@@ -170,7 +170,7 @@ left join CH_DISABLE_INFO info on d.DISAB_INFO_ID = info.DISAB_INFO_ID
left join ch_srv_organ organ on program.srv_organ_id = organ.srv_organ_id--服务机构
left join ch_srv_organ organ on program.srv_organ_id = organ.srv_organ_id--服务机构
LEFT JOIN CH_SRV_TASK_FINISH_ITEM CSTFI ON detail.TASK_DETAIL_ID = CSTFI.TASK_DETAIL_ID
LEFT JOIN CH_SRV_TASK_FINISH_ITEM CSTFI ON detail.TASK_DETAIL_ID = CSTFI.TASK_DETAIL_ID
<where>
<where>
detail.STATUS = '4'
detail.STATUS = '4'
<if
test=
"taskDetailId != null and taskDetailId != ''"
>
<if
test=
"taskDetailId != null and taskDetailId != ''"
>
AND detail.TASK_DETAIL_ID = #{taskDetailId}
AND detail.TASK_DETAIL_ID = #{taskDetailId}
</if>
</if>
...
@@ -191,31 +191,31 @@ left join CH_DISABLE_INFO info on d.DISAB_INFO_ID = info.DISAB_INFO_ID
...
@@ -191,31 +191,31 @@ left join CH_DISABLE_INFO info on d.DISAB_INFO_ID = info.DISAB_INFO_ID
<!--查询评估信息-->
<!--查询评估信息-->
<select
id=
"getAssessAccountsList"
resultType=
"com.hungraim.ltc.pojo.vo.account.AssessAccountsVO"
>
<select
id=
"getAssessAccountsList"
resultType=
"com.hungraim.ltc.pojo.vo.account.AssessAccountsVO"
>
select
select
DISTINCT task.task_id taskId,
DISTINCT task.task_id taskId,
fndOrgan.ORGAN_NAME organName,
fndOrgan.ORGAN_NAME organName,
task.ORGAN_ID aprOrganId,
task.ORGAN_ID aprOrganId,
(select DISTRICT_NAME from CH_FND_DISTRICT dis where task.DISTRICT_PROVINCIAL = dis.DISTRICT_CODE) districtProvincial,
(select DISTRICT_NAME from CH_FND_DISTRICT dis where task.DISTRICT_PROVINCIAL = dis.DISTRICT_CODE) districtProvincial,
(select DISTRICT_NAME from CH_FND_DISTRICT dis where task.DISTRICT_CITY = dis.DISTRICT_CODE) districtCity,
(select DISTRICT_NAME from CH_FND_DISTRICT dis where task.DISTRICT_CITY = dis.DISTRICT_CODE) districtCity,
(select DISTRICT_NAME from CH_FND_DISTRICT dis where task.DISTRICT_AREA = dis.DISTRICT_CODE) districtArea,
(select DISTRICT_NAME from CH_FND_DISTRICT dis where task.DISTRICT_AREA = dis.DISTRICT_CODE) districtArea,
disable.real_name realName,
disable.real_name realName,
disable.certi_code certiCode,
disable.certi_code certiCode,
disable.BIRTHDAY birthday,
disable.BIRTHDAY birthday,
disable.tel tel,
disable.tel tel,
disable.gender gender,
disable.gender gender,
(SELECT dis.DISTRICT_NAME FROM CH_FND_DISTRICT dis WHERE disable.DISTRICT_PROVINCIAL = dis.DISTRICT_CODE) disDistrictProvincial,
(SELECT dis.DISTRICT_NAME FROM CH_FND_DISTRICT dis WHERE disable.DISTRICT_PROVINCIAL = dis.DISTRICT_CODE) disDistrictProvincial,
(SELECT dis.DISTRICT_NAME FROM CH_FND_DISTRICT dis WHERE disable.district_city = dis.DISTRICT_CODE) disDistrictCity,
(SELECT dis.DISTRICT_NAME FROM CH_FND_DISTRICT dis WHERE disable.district_city = dis.DISTRICT_CODE) disDistrictCity,
(SELECT dis.DISTRICT_NAME FROM CH_FND_DISTRICT dis WHERE disable.district_area = dis.DISTRICT_CODE) disDistrictArea,
(SELECT dis.DISTRICT_NAME FROM CH_FND_DISTRICT dis WHERE disable.district_area = dis.DISTRICT_CODE) disDistrictArea,
disable.end_time endTime,
disable.end_time endTime,
task.finish_time finishTime,
task.finish_time finishTime,
emp.APREMP_TYPE_NAME_F aprempTypeName
emp.APREMP_TYPE_NAME_F aprempTypeName
from CH_APR_TASK task
from CH_APR_TASK task
left join ch_apr_organ aprOrgan on task.apr_organ_id = aprOrgan.apr_organ_id
left join ch_apr_organ aprOrgan on task.apr_organ_id = aprOrgan.apr_organ_id
left join ch_disable_info disable on task.disable_info_id = disable.disab_info_id
left join ch_disable_info disable on task.disable_info_id = disable.disab_info_id
left join ch_apr_emp emp on task.apr_emp_id = emp.emp_id and emp.IS_LOCK = 0
left join ch_apr_emp emp on task.apr_emp_id = emp.emp_id and emp.IS_LOCK = 0
left join ch_apr_report report on report.TASK_ID = task.TASK_ID
left join ch_apr_report report on report.TASK_ID = task.TASK_ID
left join CH_FND_ORGAN fndOrgan on task.ORGAN_ID = fndOrgan.ORGAN_ID
left join CH_FND_ORGAN fndOrgan on task.ORGAN_ID = fndOrgan.ORGAN_ID
where task.task_status = 2 and emp.APREMP_TYPE_NAME_F is not null
where task.task_status = 2 and emp.APREMP_TYPE_NAME_F is not null
</select>
</select>
...
@@ -223,18 +223,18 @@ left join CH_DISABLE_INFO info on d.DISAB_INFO_ID = info.DISAB_INFO_ID
...
@@ -223,18 +223,18 @@ left join CH_DISABLE_INFO info on d.DISAB_INFO_ID = info.DISAB_INFO_ID
<select
id=
"searchSrvOrganAccountDetailExport"
resultType=
"com.hungraim.ltc.pojo.vo.account.AccountExportDetailListResp"
>
<select
id=
"searchSrvOrganAccountDetailExport"
resultType=
"com.hungraim.ltc.pojo.vo.account.AccountExportDetailListResp"
>
select
select
t3.SRV_ORGAN_NAME srvOrganName,
t3.SRV_ORGAN_NAME srvOrganName,
to_char(t1.ACCOUNTS_TIME,'yyyy-MM') accountsTime,
to_char(t1.ACCOUNTS_TIME,'yyyy-MM') accountsTime,
t1.ACCOUNTS_ALL_COST accountsAllCost,
t1.ACCOUNTS_ALL_COST accountsAllCost,
t1.ACCOUNTS_OVERALL_COST accountsOverallCost,
t1.ACCOUNTS_OVERALL_COST accountsOverallCost,
t1.ACCOUNTS_PERSONAL_COST accountsPersonalCost,
t1.ACCOUNTS_PERSONAL_COST accountsPersonalCost,
to_char(t1.ACCOUNTS_START_TIME,'yyyy-MM-dd') accountsStartTime,
to_char(t1.ACCOUNTS_START_TIME,'yyyy-MM-dd') accountsStartTime,
to_char(t1.ACCOUNTS_END_TIME,'yyyy-MM-dd') accountsEndTime
to_char(t1.ACCOUNTS_END_TIME,'yyyy-MM-dd') accountsEndTime
from CH_DISAB_ACCOUNTS_DETAIL t1
from CH_DISAB_ACCOUNTS_DETAIL t1
left join ch_disable_info t2 on t1.disab_info_id = t2.disab_info_id
left join ch_disable_info t2 on t1.disab_info_id = t2.disab_info_id
LEFT JOIN CH_SRV_ORGAN t3 ON t1.SRV_ORGAN_ID = t3.SRV_ORGAN_ID
LEFT JOIN CH_SRV_ORGAN t3 ON t1.SRV_ORGAN_ID = t3.SRV_ORGAN_ID
where t1.ACCOUNTS_ID = #{accountsId}
where t1.ACCOUNTS_ID = #{accountsId}
</select>
</select>
...
@@ -242,36 +242,36 @@ left join CH_DISABLE_INFO info on d.DISAB_INFO_ID = info.DISAB_INFO_ID
...
@@ -242,36 +242,36 @@ left join CH_DISABLE_INFO info on d.DISAB_INFO_ID = info.DISAB_INFO_ID
<select
id=
"getOtherPlaceList"
resultType=
"com.hungraim.ltc.pojo.vo.account.OrganAccountsVO"
>
<select
id=
"getOtherPlaceList"
resultType=
"com.hungraim.ltc.pojo.vo.account.OrganAccountsVO"
>
select
select
--失能人员姓名
--失能人员姓名
disable.real_name realName,
disable.real_name realName,
disable.DISAB_INFO_ID disabInfoId,
disable.DISAB_INFO_ID disabInfoId,
--身份证号
--身份证号
disable.CERTI_CODE certiCode,
disable.CERTI_CODE certiCode,
--所在省市
--所在省市
(select district_name from ch_fnd_district dis where apply.MEDICAL_AREA = dis.district_code) medicalArea,
(select district_name from ch_fnd_district dis where apply.MEDICAL_AREA = dis.district_code) medicalArea,
program.SRV_MODE_ID modeId,
program.SRV_MODE_ID modeId,
--服务方式
--服务方式
DECODE(program.SRV_MODE_ID, '1','医疗','2', '养老','3','上门', '4', '异地') srvModeName,
DECODE(program.SRV_MODE_ID, '1','医疗','2', '养老','3','上门', '4', '异地') srvModeName,
--护理机构名称
--护理机构名称
organ.srv_organ_id srvOrganId,
organ.srv_organ_id srvOrganId,
--护理机构名称
--护理机构名称
organ.srv_organ_name srvOrganName,
organ.srv_organ_name srvOrganName,
detail.TASK_DETAIL_ID taskDetailId,
detail.TASK_DETAIL_ID taskDetailId,
--护理服务人员
--护理服务人员
emp.emp_name empName,
emp.emp_name empName,
--任务时间
--任务时间
detail.SRV_DATE srvDate,
detail.SRV_DATE srvDate,
detail.SRV_START_TIME srvStartTime,
detail.SRV_START_TIME srvStartTime,
detail.SRV_END_TIME srvEndTime,
detail.SRV_END_TIME srvEndTime,
-- 机构等级
-- 机构等级
organ.LEVEL_CODE levelCode
organ.LEVEL_CODE levelCode
from ch_srv_task_detail detail--服务计划
from ch_srv_task_detail detail--服务计划
left join ch_srv_task task on task.srv_task_id = detail.srv_task_id--服务计划详情
left join ch_srv_task task on task.srv_task_id = detail.srv_task_id--服务计划详情
left join ch_disable_info disable on task.disab_info_id = disable.disab_info_id--失能人员
left join ch_disable_info disable on task.disab_info_id = disable.disab_info_id--失能人员
left join CH_DISABLE_APPLY apply on apply.apply_id = disable.apply_id
left join CH_DISABLE_APPLY apply on apply.apply_id = disable.apply_id
left join ch_srv_organ_emp emp on task.srv_emp_id = emp.emp_id--护理人员
left join ch_srv_organ_emp emp on task.srv_emp_id = emp.emp_id--护理人员
left join ch_srv_program program on task.program_id = program.program_id--服务方案
left join ch_srv_program program on task.program_id = program.program_id--服务方案
left join ch_srv_organ organ on program.srv_organ_id = organ.srv_organ_id--服务机构
left join ch_srv_organ organ on program.srv_organ_id = organ.srv_organ_id--服务机构
where program.srv_organ_id = '4' and program.program_id = #{programId}
where program.srv_organ_id = '4' and program.program_id = #{programId}
</select>
</select>
...
...
apply/apply-service/src/main/java/com/hungraim/ltc/controller/DisableController.java
View file @
2f490131
...
@@ -107,6 +107,16 @@ public class DisableController {
...
@@ -107,6 +107,16 @@ public class DisableController {
List
<
ChSrvOrgan
>
chFndSrvModes
=
disableService
.
srvOrganList
(
String
.
valueOf
(
organId
),
srvOrganId
,
false
);
List
<
ChSrvOrgan
>
chFndSrvModes
=
disableService
.
srvOrganList
(
String
.
valueOf
(
organId
),
srvOrganId
,
false
);
return
Result
.
success
(
chFndSrvModes
);
return
Result
.
success
(
chFndSrvModes
);
}
}
/**
* 查询机构意向服务机构
*
* @param
*/
@RequestMapping
(
"/srvOrganList2"
)
public
Result
<
List
<
ChSrvOrgan
>>
srvOrganList2
(
String
organId
)
{
List
<
ChSrvOrgan
>
chFndSrvModes
=
disableService
.
srvOrganList2
(
String
.
valueOf
(
organId
),
false
);
return
Result
.
success
(
chFndSrvModes
);
}
/**
/**
* 查询机构下或者包含子机构下的所有护理机构
* 查询机构下或者包含子机构下的所有护理机构
...
...
apply/apply-service/src/main/java/com/hungraim/ltc/service/DisableService.java
View file @
2f490131
...
@@ -68,6 +68,14 @@ public interface DisableService {
...
@@ -68,6 +68,14 @@ public interface DisableService {
List
<
ChSrvOrgan
>
srvOrganList
(
String
organId
,
Long
srvOrganId
,
Boolean
isInvolveChild
);
List
<
ChSrvOrgan
>
srvOrganList
(
String
organId
,
Long
srvOrganId
,
Boolean
isInvolveChild
);
/**
/**
* 查询机构意向服务机构
*
* @param organId 机构id
* @param isInvolveChild 是否包含子机构
*/
List
<
ChSrvOrgan
>
srvOrganList2
(
String
organId
,
Boolean
isInvolveChild
);
/**
* 查询疾病类型
* 查询疾病类型
*
*
* @param parDiseTypeId 父疾病类型id
* @param parDiseTypeId 父疾病类型id
...
...
apply/apply-service/src/main/java/com/hungraim/ltc/service/impl/DisableServiceImpl.java
View file @
2f490131
...
@@ -346,6 +346,12 @@ public class DisableServiceImpl implements DisableService {
...
@@ -346,6 +346,12 @@ public class DisableServiceImpl implements DisableService {
}
}
@Override
@Override
public
List
<
ChSrvOrgan
>
srvOrganList2
(
String
organId
,
Boolean
isInvolveChild
)
{
List
<
Long
>
organIds
=
organService
.
getOrganIds
(
Long
.
valueOf
(
organId
),
isInvolveChild
);
return
srvOrganMapper
.
selectList
(
new
LambdaQueryWrapper
<
ChSrvOrgan
>().
eq
(
ChSrvOrgan:
:
getStatus
,
(
short
)
0
).
in
(
ChSrvOrgan:
:
getOrganId
,
organIds
));
}
@Override
public
List
<
ChFndDiseaseType
>
fndDiseaseList
(
String
parDiseTypeId
)
{
public
List
<
ChFndDiseaseType
>
fndDiseaseList
(
String
parDiseTypeId
)
{
QueryWrapper
<
ChFndDiseaseType
>
queryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
ChFndDiseaseType
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"IS_VALID"
,
"0"
);
queryWrapper
.
eq
(
"IS_VALID"
,
"0"
);
...
...
assessment/assessment-service/src/main/java/com/hungraim/ltc/controller/TaskController.java
View file @
2f490131
package
com
.
hungraim
.
ltc
.
controller
;
package
com
.
hungraim
.
ltc
.
controller
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.hungraim.ltc.dao.AprReportMapper
;
import
com.hungraim.ltc.dto.QueryDto
;
import
com.hungraim.ltc.dto.QueryDto
;
import
com.hungraim.ltc.pojo.entity.SysConfig.ChFndAttach
;
import
com.hungraim.ltc.pojo.entity.SysConfig.ChFndAttach
;
import
com.hungraim.ltc.pojo.entity.assessment.*
;
import
com.hungraim.ltc.pojo.entity.assessment.*
;
...
@@ -15,6 +18,7 @@ import com.hungraim.ltc.service.TppesApiException;
...
@@ -15,6 +18,7 @@ import com.hungraim.ltc.service.TppesApiException;
import
com.hungraim.ltc.util.FileUtils
;
import
com.hungraim.ltc.util.FileUtils
;
import
com.hungraim.ltc.util.Result
;
import
com.hungraim.ltc.util.Result
;
import
com.hungraim.ltc.util.ResultCode
;
import
com.hungraim.ltc.util.ResultCode
;
import
com.hungraim.ltc.util.TokenParsingUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.poi.ss.usermodel.Workbook
;
import
org.apache.poi.ss.usermodel.Workbook
;
...
@@ -39,6 +43,8 @@ public class TaskController {
...
@@ -39,6 +43,8 @@ public class TaskController {
@Autowired
@Autowired
private
TaskService
taskService
;
private
TaskService
taskService
;
@Autowired
private
AprReportMapper
aprReportMapper
;
/**
/**
* 评定任务分配、查询列表
* 评定任务分配、查询列表
...
@@ -241,6 +247,39 @@ public class TaskController {
...
@@ -241,6 +247,39 @@ public class TaskController {
}
}
/**
/**
* 添加评估公示信息
* @param taskId
* @return
*/
@RequestMapping
(
"/updateReportPublicityInfo"
)
public
Result
updateReportPublicityInfo
(
ChAprReport
updateChAprReport
,
@RequestHeader
(
"Authorization"
)
String
token
)
throws
TppesApiException
{
if
(
updateChAprReport
.
getReportId
()
==
null
){
return
Result
.
failed
(
"reportId不能为空!"
);
}
String
reportId
=
String
.
valueOf
(
updateChAprReport
.
getReportId
());
log
.
info
(
"reportId:"
+
reportId
);
ChAprReport
chAprReport
=
aprReportMapper
.
selectById
(
reportId
);
if
(
chAprReport
==
null
){
return
Result
.
failed
(
"未查询到信息!"
);
}
ChAprReport
newChAprReport
=
new
ChAprReport
();
Integer
userId
=
TokenParsingUtil
.
TokenParsing
(
token
,
"userId"
);
System
.
out
.
println
(
chAprReport
.
getPublicityUser
());
if
(
chAprReport
.
getPublicityUser
()
==
null
){
newChAprReport
.
setPublicityUser
(
userId
);
//当前登录人
newChAprReport
.
setPublicityTime
(
new
Date
());
}
newChAprReport
.
setPublicityStartTime
(
updateChAprReport
.
getPublicityStartTime
());
newChAprReport
.
setPublicityEndTime
(
updateChAprReport
.
getPublicityEndTime
());
newChAprReport
.
setPublicityLcd
(
new
Date
());
//更新时间
newChAprReport
.
setPublicityLcu
(
userId
);
//更新人
newChAprReport
.
setReportId
(
updateChAprReport
.
getReportId
());
aprReportMapper
.
updateById
(
newChAprReport
);
return
Result
.
success
();
}
/**
* 评定任务分配
* 评定任务分配
*
*
* @param taskId 评定任务id,如果多条以逗号(,)分隔
* @param taskId 评定任务id,如果多条以逗号(,)分隔
...
...
assessment/assessment-service/src/main/resources/mapper/ChDisableEvaluateMapper.xml
View file @
2f490131
...
@@ -187,6 +187,9 @@
...
@@ -187,6 +187,9 @@
(SELECT dis.DISTRICT_NAME FROM CH_FND_DISTRICT dis WHERE info.acpt_srv_city = dis.DISTRICT_CODE) acptSrvCity,
(SELECT dis.DISTRICT_NAME FROM CH_FND_DISTRICT dis WHERE info.acpt_srv_city = dis.DISTRICT_CODE) acptSrvCity,
(SELECT dis.DISTRICT_NAME FROM CH_FND_DISTRICT dis WHERE info.acpt_srv_area = dis.DISTRICT_CODE) acptSrvArea,
(SELECT dis.DISTRICT_NAME FROM CH_FND_DISTRICT dis WHERE info.acpt_srv_area = dis.DISTRICT_CODE) acptSrvArea,
lev.DISABLE_LEVEL_NAME riskLevel,
lev.DISABLE_LEVEL_NAME riskLevel,
report.PUBLICITY_START_TIME publicityStartTime,
report.PUBLICITY_END_TIME publicityEndTime,
report.PUBLICITY_TIME publicityTime,
report.EFF_TIME effTime
report.EFF_TIME effTime
FROM ch_apr_report report
FROM ch_apr_report report
LEFT JOIN CH_APR_TASK task ON report.TASK_ID = task.TASK_ID
LEFT JOIN CH_APR_TASK task ON report.TASK_ID = task.TASK_ID
...
...
common/common-core/src/main/java/com/hungraim/ltc/constant/AuthConstants.java
View file @
2f490131
...
@@ -39,6 +39,11 @@ public interface AuthConstants {
...
@@ -39,6 +39,11 @@ public interface AuthConstants {
*/
*/
String
PERMISSION_ROLES_RESOURCE_KEY
=
"ltc:roles:resource"
;
String
PERMISSION_ROLES_RESOURCE_KEY
=
"ltc:roles:resource"
;
/**
* Redis缓存权限规则key
*/
String
PERMISSION_RESOURCE_STATUS_KEY
=
"ltc:interface:status"
;
/**
/**
* 密码加密方式
* 密码加密方式
...
...
common/common-core/src/main/java/com/hungraim/ltc/pojo/entity/assessment/ChAprReport.java
View file @
2f490131
...
@@ -5,6 +5,9 @@ import com.baomidou.mybatisplus.annotation.KeySequence;
...
@@ -5,6 +5,9 @@ import com.baomidou.mybatisplus.annotation.KeySequence;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.Data
;
import
lombok.Data
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.util.Date
;
@Data
@Data
@TableName
(
"CH_APR_REPORT"
)
@TableName
(
"CH_APR_REPORT"
)
...
@@ -24,8 +27,10 @@ public class ChAprReport {
...
@@ -24,8 +27,10 @@ public class ChAprReport {
private
Integer
cfgModeId
;
private
Integer
cfgModeId
;
private
java
.
util
.
Date
evaluateTime
;
private
java
.
util
.
Date
evaluateTime
;
private
String
remark
;
private
String
remark
;
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
private
java
.
util
.
Date
publicityStartTime
;
private
java
.
util
.
Date
publicityStartTime
;
private
java
.
util
.
Date
evaluationTime
;
private
java
.
util
.
Date
evaluationTime
;
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
private
java
.
util
.
Date
publicityEndTime
;
private
java
.
util
.
Date
publicityEndTime
;
private
java
.
util
.
Date
fcd
;
private
java
.
util
.
Date
fcd
;
private
Integer
srvModeId
;
private
Integer
srvModeId
;
...
@@ -44,4 +49,8 @@ public class ChAprReport {
...
@@ -44,4 +49,8 @@ public class ChAprReport {
private
String
checkRemark
;
private
String
checkRemark
;
private
Integer
taskId
;
private
Integer
taskId
;
private
Integer
lcu
;
private
Integer
lcu
;
private
java
.
util
.
Date
publicityTime
;
private
Integer
publicityUser
;
private
Date
publicityLcd
;
private
Integer
publicityLcu
;
}
}
common/common-core/src/main/java/com/hungraim/ltc/pojo/entity/system/SystemInterface.java
View file @
2f490131
...
@@ -14,4 +14,8 @@ public class SystemInterface {
...
@@ -14,4 +14,8 @@ public class SystemInterface {
private
String
interfaceUrl
;
private
String
interfaceUrl
;
private
String
interfaceName
;
private
String
interfaceName
;
private
Date
createdTime
;
private
Date
createdTime
;
/**
* 是否拦截 1.拦截 0.不拦截
*/
private
Long
interceptionStatus
;
}
}
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/assessment/TaskReportVO.java
View file @
2f490131
...
@@ -73,6 +73,16 @@ public class TaskReportVO {
...
@@ -73,6 +73,16 @@ public class TaskReportVO {
//评估类型
//评估类型
private
Integer
evaluateType
;
private
Integer
evaluateType
;
//公示开始时间
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
,
timezone
=
"GMT+8"
)
private
Date
publicityStartTime
;
//公示结束时间
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
,
timezone
=
"GMT+8"
)
private
Date
publicityEndTime
;
//公示时间
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
,
timezone
=
"GMT+8"
)
private
Date
publicityTime
;
private
Map
<
String
,
Object
>
chAprReportFractions
;
private
Map
<
String
,
Object
>
chAprReportFractions
;
//录入时间
//录入时间
...
...
gateway-service/src/main/java/com/hungraim/ltc/gateway/security/AuthorizationManager.java
View file @
2f490131
...
@@ -85,11 +85,25 @@ public class AuthorizationManager implements ReactiveAuthorizationManager<Author
...
@@ -85,11 +85,25 @@ public class AuthorizationManager implements ReactiveAuthorizationManager<Author
if
(
"ROLE_0"
.
equals
(
roleId
))
{
if
(
"ROLE_0"
.
equals
(
roleId
))
{
return
true
;
return
true
;
}
}
//如果是公共资源 直接放行
if
(
"ROLE_1"
.
equals
(
roleId
))
{
return
true
;
}
String
[]
splitpath
=
path
.
split
(
"/"
);
String
[]
splitpath
=
path
.
split
(
"/"
);
String
pathNew
=
"/"
+
splitpath
[
1
]
+
"/"
+
splitpath
[
2
]
+
"/*"
;
String
pathNew
=
"/"
+
splitpath
[
1
]
+
"/"
+
splitpath
[
2
]
+
"/*"
;
Set
<
String
>
authorities
=
new
HashSet
<>();
Set
<
String
>
authorities
=
new
HashSet
<>();
Map
<
String
,
String
>
interfaceHashMap
=
redisTemplate
.
opsForHash
().
entries
(
AuthConstants
.
PERMISSION_RESOURCE_STATUS_KEY
);
Map
<
String
,
List
<
SystemRoleResource
>>
rolesResources
=
redisTemplate
.
opsForHash
().
entries
(
AuthConstants
.
PERMISSION_ROLES_RESOURCE_KEY
);
Map
<
String
,
List
<
SystemRoleResource
>>
rolesResources
=
redisTemplate
.
opsForHash
().
entries
(
AuthConstants
.
PERMISSION_ROLES_RESOURCE_KEY
);
Map
<
String
,
List
<
String
>>
interfaces
=
redisTemplate
.
opsForHash
().
entries
(
AuthConstants
.
PERMISSION_RESOURCE_INTERFACE_KEY
);
Map
<
String
,
List
<
String
>>
interfaces
=
redisTemplate
.
opsForHash
().
entries
(
AuthConstants
.
PERMISSION_RESOURCE_INTERFACE_KEY
);
// Integer status = Integer.parseInt(interfaceHashMap.get(pathNew));
String
status
=
interfaceHashMap
.
get
(
pathNew
);
//是否拦截 1.拦截 0.不拦截
if
(
status
.
equals
(
"0"
)){
log
.
info
(
"访问路径是否拦截:不拦截"
);
return
true
;
}
log
.
info
(
"访问路径是否拦截:拦截"
);
List
<
SystemRoleResource
>
resources
=
rolesResources
.
get
(
roleId
);
List
<
SystemRoleResource
>
resources
=
rolesResources
.
get
(
roleId
);
for
(
SystemRoleResource
resource
:
resources
)
{
for
(
SystemRoleResource
resource
:
resources
)
{
List
<
String
>
systemInterfaces
=
interfaces
.
get
(
resource
.
getResourceId
().
toString
());
List
<
String
>
systemInterfaces
=
interfaces
.
get
(
resource
.
getResourceId
().
toString
());
...
...
system/system-admin-service/src/main/java/com/hungraim/ltc/system/controller/RoleController.java
View file @
2f490131
package
com
.
hungraim
.
ltc
.
system
.
controller
;
package
com
.
hungraim
.
ltc
.
system
.
controller
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.core.util.StrUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
@@ -11,6 +10,7 @@ import com.hungraim.ltc.pojo.vo.system.ReqRoleInfo;
...
@@ -11,6 +10,7 @@ import com.hungraim.ltc.pojo.vo.system.ReqRoleInfo;
import
com.hungraim.ltc.system.dao.SystemRoleResourceMapper
;
import
com.hungraim.ltc.system.dao.SystemRoleResourceMapper
;
import
com.hungraim.ltc.system.service.ISystemRoleResourceService
;
import
com.hungraim.ltc.system.service.ISystemRoleResourceService
;
import
com.hungraim.ltc.system.service.ISystemRoleService
;
import
com.hungraim.ltc.system.service.ISystemRoleService
;
import
com.hungraim.ltc.system.service.impl.SystemInterfaceServiceImpl
;
import
com.hungraim.ltc.util.Result
;
import
com.hungraim.ltc.util.Result
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -36,6 +36,12 @@ public class RoleController {
...
@@ -36,6 +36,12 @@ public class RoleController {
private
SystemRoleResourceMapper
systemRoleResourceMapper
;
private
SystemRoleResourceMapper
systemRoleResourceMapper
;
@Autowired
@Autowired
private
ISystemRoleService
roleService
;
private
ISystemRoleService
roleService
;
private
final
SystemInterfaceServiceImpl
systemInterfaceService
;
@Autowired
public
RoleController
(
SystemInterfaceServiceImpl
systemInterfaceService
)
{
this
.
systemInterfaceService
=
systemInterfaceService
;
}
/**
/**
...
@@ -82,7 +88,7 @@ public class RoleController {
...
@@ -82,7 +88,7 @@ public class RoleController {
return
systemRoleResource
;
return
systemRoleResource
;
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
roleResourceService
.
saveBatch
(
roleResources
);
roleResourceService
.
saveBatch
(
roleResources
);
systemInterfaceService
.
listResourceInterface
();
return
Result
.
success
(
"新增成功"
);
return
Result
.
success
(
"新增成功"
);
}
}
...
@@ -185,7 +191,7 @@ public class RoleController {
...
@@ -185,7 +191,7 @@ public class RoleController {
if
(!
deleteRoleResources
.
isEmpty
()){
if
(!
deleteRoleResources
.
isEmpty
()){
systemRoleResourceMapper
.
removeByIds
(
deleteRoleResources
,
reqRoleInfo
.
getId
());
systemRoleResourceMapper
.
removeByIds
(
deleteRoleResources
,
reqRoleInfo
.
getId
());
}
}
systemInterfaceService
.
listResourceInterface
();
return
Result
.
success
(
"更新成功"
);
return
Result
.
success
(
"更新成功"
);
}
}
...
...
system/system-admin-service/src/main/java/com/hungraim/ltc/system/controller/UserController.java
View file @
2f490131
...
@@ -13,12 +13,10 @@ import com.hungraim.ltc.pojo.vo.system.ReqUserInfo;
...
@@ -13,12 +13,10 @@ import com.hungraim.ltc.pojo.vo.system.ReqUserInfo;
import
com.hungraim.ltc.system.dao.SystemUserRoleMapper
;
import
com.hungraim.ltc.system.dao.SystemUserRoleMapper
;
import
com.hungraim.ltc.system.service.ISystemUserRoleService
;
import
com.hungraim.ltc.system.service.ISystemUserRoleService
;
import
com.hungraim.ltc.system.service.ISystemUserService
;
import
com.hungraim.ltc.system.service.ISystemUserService
;
import
com.hungraim.ltc.system.service.impl.SystemInterfaceServiceImpl
;
import
com.hungraim.ltc.system.service.impl.SystemUserRoleServiceImpl
;
import
com.hungraim.ltc.system.service.impl.SystemUserRoleServiceImpl
;
import
com.hungraim.ltc.system.service.impl.SystemUserServiceImpl
;
import
com.hungraim.ltc.system.service.impl.SystemUserServiceImpl
;
import
com.hungraim.ltc.util.CheckStrength
;
import
com.hungraim.ltc.util.*
;
import
com.hungraim.ltc.util.Result
;
import
com.hungraim.ltc.util.ResultCode
;
import
com.hungraim.ltc.util.TokenParsingUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder
;
import
org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder
;
...
@@ -39,15 +37,21 @@ import java.util.stream.Collectors;
...
@@ -39,15 +37,21 @@ import java.util.stream.Collectors;
public
class
UserController
{
public
class
UserController
{
private
final
ISystemUserService
userInfoService
;
private
final
ISystemUserService
userInfoService
;
private
final
ISystemUserRoleService
userRoleService
;
private
final
ISystemUserRoleService
userRoleService
;
private
final
SystemInterfaceServiceImpl
systemInterfaceService
;
@Resource
@Resource
private
SystemUserRoleMapper
systemUserRoleMapper
;
private
SystemUserRoleMapper
systemUserRoleMapper
;
@Autowired
@Autowired
public
UserController
(
SystemUserServiceImpl
userInfoService
,
SystemUserRoleServiceImpl
userRoleService
)
{
public
UserController
(
SystemUserServiceImpl
userInfoService
,
SystemUserRoleServiceImpl
userRoleService
,
SystemInterfaceServiceImpl
systemInterfaceService
)
{
this
.
userInfoService
=
userInfoService
;
this
.
userInfoService
=
userInfoService
;
this
.
userRoleService
=
userRoleService
;
this
.
userRoleService
=
userRoleService
;
this
.
systemInterfaceService
=
systemInterfaceService
;
}
}
...
@@ -127,6 +131,7 @@ public class UserController {
...
@@ -127,6 +131,7 @@ public class UserController {
return
systemUserRole
;
return
systemUserRole
;
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
userRoleService
.
saveBatch
(
roleList
);
userRoleService
.
saveBatch
(
roleList
);
systemInterfaceService
.
listResourceInterface
();
return
Result
.
success
(
"新增成功"
);
return
Result
.
success
(
"新增成功"
);
}
}
...
@@ -282,6 +287,7 @@ public class UserController {
...
@@ -282,6 +287,7 @@ public class UserController {
if
(!
deleteRoleResources
.
isEmpty
()){
if
(!
deleteRoleResources
.
isEmpty
()){
systemUserRoleMapper
.
removeByIds
(
deleteRoleResources
,
reqUserInfo
.
getId
());
systemUserRoleMapper
.
removeByIds
(
deleteRoleResources
,
reqUserInfo
.
getId
());
}
}
systemInterfaceService
.
listResourceInterface
();
// systemUserRoleMapper.removeByIds(deleteRoleResources,reqUserInfo.getId());
// systemUserRoleMapper.removeByIds(deleteRoleResources,reqUserInfo.getId());
// userRoleService.removeByIds(deleteRoleResources);
// userRoleService.removeByIds(deleteRoleResources);
return
Result
.
success
(
"更新成功"
);
return
Result
.
success
(
"更新成功"
);
...
...
system/system-admin-service/src/main/java/com/hungraim/ltc/system/dao/SystemInterfaceMapper.java
View file @
2f490131
...
@@ -16,7 +16,7 @@ import java.util.List;
...
@@ -16,7 +16,7 @@ import java.util.List;
@Mapper
@Mapper
public
interface
SystemInterfaceMapper
extends
BaseMapper
<
SystemInterface
>
{
public
interface
SystemInterfaceMapper
extends
BaseMapper
<
SystemInterface
>
{
@Select
(
"SELECT a.INTERFACE_ID,a.INTERFACE_URL FROM LTC_INTERFACE a"
)
@Select
(
"SELECT a.INTERFACE_ID,a.INTERFACE_URL
,a.INTERCEPTION_STATUS
FROM LTC_INTERFACE a"
)
List
<
SystemInterface
>
listInterface
();
List
<
SystemInterface
>
listInterface
();
@Select
(
"select c.RESOURCE_ID,c.INTERFACE_ID from LTC_RESOURCE_INTERFACE c"
)
@Select
(
"select c.RESOURCE_ID,c.INTERFACE_ID from LTC_RESOURCE_INTERFACE c"
)
...
...
system/system-admin-service/src/main/java/com/hungraim/ltc/system/service/impl/SystemInterfaceServiceImpl.java
View file @
2f490131
...
@@ -40,8 +40,10 @@ public class SystemInterfaceServiceImpl extends ServiceImpl<SystemInterfaceMappe
...
@@ -40,8 +40,10 @@ public class SystemInterfaceServiceImpl extends ServiceImpl<SystemInterfaceMappe
redisTemplate
.
delete
(
AuthConstants
.
PERMISSION_RESOURCE_INTERFACE_KEY
);
redisTemplate
.
delete
(
AuthConstants
.
PERMISSION_RESOURCE_INTERFACE_KEY
);
redisTemplate
.
delete
(
AuthConstants
.
PERMISSION_ROLES_RESOURCE_KEY
);
redisTemplate
.
delete
(
AuthConstants
.
PERMISSION_ROLES_RESOURCE_KEY
);
redisTemplate
.
delete
(
AuthConstants
.
PERMISSION_RESOURCE_STATUS_KEY
);
Map
<
String
,
List
<
SystemRoleResource
>>
roleResourcesMap
=
new
TreeMap
<>();
Map
<
String
,
List
<
SystemRoleResource
>>
roleResourcesMap
=
new
TreeMap
<>();
Map
<
String
,
List
<
String
>>
stringStringHashMap
=
new
HashMap
<>();
Map
<
String
,
List
<
String
>>
stringStringHashMap
=
new
HashMap
<>();
Map
<
String
,
String
>
interfaceHashMap
=
new
HashMap
<>();
//角色数据
//角色数据
List
<
Long
>
roles
=
systemInterfaceMapper
.
listRole
();
List
<
Long
>
roles
=
systemInterfaceMapper
.
listRole
();
//角色和资源数据
//角色和资源数据
...
@@ -50,6 +52,7 @@ public class SystemInterfaceServiceImpl extends ServiceImpl<SystemInterfaceMappe
...
@@ -50,6 +52,7 @@ public class SystemInterfaceServiceImpl extends ServiceImpl<SystemInterfaceMappe
List
<
SystemResourceinterface
>
resourceInterface
=
systemInterfaceMapper
.
listResourceInterface
();
List
<
SystemResourceinterface
>
resourceInterface
=
systemInterfaceMapper
.
listResourceInterface
();
//接口数据
//接口数据
List
<
SystemInterface
>
systemInterfaces
=
systemInterfaceMapper
.
listInterface
();
List
<
SystemInterface
>
systemInterfaces
=
systemInterfaceMapper
.
listInterface
();
systemInterfaces
.
stream
().
forEach
(
systemInterface
->
interfaceHashMap
.
put
(
systemInterface
.
getInterfaceUrl
(),
systemInterface
.
getInterceptionStatus
().
toString
()));
roles
.
stream
().
forEach
(
role
->
{
roles
.
stream
().
forEach
(
role
->
{
//角色和资源数据
//角色和资源数据
List
<
SystemRoleResource
>
roleResourceList
=
roleResources
.
stream
().
filter
(
roleResource
->
roleResource
.
getRoleId
().
equals
(
role
)).
collect
(
Collectors
.
toList
());
List
<
SystemRoleResource
>
roleResourceList
=
roleResources
.
stream
().
filter
(
roleResource
->
roleResource
.
getRoleId
().
equals
(
role
)).
collect
(
Collectors
.
toList
());
...
@@ -68,6 +71,7 @@ public class SystemInterfaceServiceImpl extends ServiceImpl<SystemInterfaceMappe
...
@@ -68,6 +71,7 @@ public class SystemInterfaceServiceImpl extends ServiceImpl<SystemInterfaceMappe
//角色和资源
//角色和资源
roleResourcesMap
.
put
(
AuthConstants
.
AUTHORITY_PREFIX
+
role
.
toString
(),
roleResourceList
);
roleResourcesMap
.
put
(
AuthConstants
.
AUTHORITY_PREFIX
+
role
.
toString
(),
roleResourceList
);
});
});
redisTemplate
.
opsForHash
().
putAll
(
AuthConstants
.
PERMISSION_RESOURCE_STATUS_KEY
,
interfaceHashMap
);
redisTemplate
.
opsForHash
().
putAll
(
AuthConstants
.
PERMISSION_ROLES_RESOURCE_KEY
,
roleResourcesMap
);
redisTemplate
.
opsForHash
().
putAll
(
AuthConstants
.
PERMISSION_ROLES_RESOURCE_KEY
,
roleResourcesMap
);
redisTemplate
.
opsForHash
().
putAll
(
AuthConstants
.
PERMISSION_RESOURCE_INTERFACE_KEY
,
stringStringHashMap
);
redisTemplate
.
opsForHash
().
putAll
(
AuthConstants
.
PERMISSION_RESOURCE_INTERFACE_KEY
,
stringStringHashMap
);
...
...
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