Commit ca715ec5 authored by 李灿灿's avatar 李灿灿

Merge branch 'feature/insurance-1.3.0' into feature-licancan

parents 1009bb96 7d67194b
...@@ -2489,6 +2489,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2489,6 +2489,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue; continue;
} }
//校验当前项目是否在权限范围内 //校验当前项目是否在权限范围内
if(CollectionUtils.isEmpty(deptNoList)){
param.setErrorMessage(InsurancesConstants.DEPT_NO_NOT_IN_USER_DEPT_LIST);
listResult.add(param);
continue;
}
if(!deptNoList.stream().anyMatch(u ->u.equals(param.getDeptNo()))){ if(!deptNoList.stream().anyMatch(u ->u.equals(param.getDeptNo()))){
param.setErrorMessage(InsurancesConstants.DEPT_NO_NOT_IN_USER_DEPT_LIST); param.setErrorMessage(InsurancesConstants.DEPT_NO_NOT_IN_USER_DEPT_LIST);
listResult.add(param); listResult.add(param);
...@@ -2807,8 +2812,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2807,8 +2812,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult.add(param); listResult.add(param);
continue; continue;
} }
//校验当前项目是否在权限范围内 //校验当前项目是否在权限范围内
if(CollectionUtils.isEmpty(deptNoList)){
param.setErrorMessage(InsurancesConstants.DEPT_NO_NOT_IN_USER_DEPT_LIST);
listResult.add(param);
continue;
}
if(!deptNoList.stream().anyMatch(u ->u.equals(param.getDeptNo()))){ if(!deptNoList.stream().anyMatch(u ->u.equals(param.getDeptNo()))){
param.setErrorMessage(InsurancesConstants.DEPT_NO_NOT_IN_USER_DEPT_LIST); param.setErrorMessage(InsurancesConstants.DEPT_NO_NOT_IN_USER_DEPT_LIST);
listResult.add(param); listResult.add(param);
...@@ -3219,6 +3228,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3219,6 +3228,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue; continue;
}else { }else {
//校验当前项目是否在权限范围内 //校验当前项目是否在权限范围内
if(CollectionUtils.isEmpty(deptNoList)){
param.setErrorMessage(InsurancesConstants.DEPT_NO_NOT_IN_USER_DEPT_LIST);
listResult.add(param);
continue;
}
if(deptNoList.stream().noneMatch(u ->u.equals(param.getDeptNo()))){ if(deptNoList.stream().noneMatch(u ->u.equals(param.getDeptNo()))){
param.setErrorMessage(InsurancesConstants.OLD_DEPT_NO_NOT_IN_DEPT_LIST); param.setErrorMessage(InsurancesConstants.OLD_DEPT_NO_NOT_IN_DEPT_LIST);
listResult.add(param); listResult.add(param);
...@@ -5607,6 +5621,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -5607,6 +5621,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
errorList.add(param); errorList.add(param);
continue; continue;
} }
//校验当前项目是否在权限范围内
if(CollectionUtils.isEmpty(deptNoList)){
param.setErrorMessage(InsurancesConstants.DEPT_NO_NOT_IN_USER_DEPT_LIST);
errorList.add(param);
continue;
}
if(deptNoList.stream().noneMatch(u -> u.equals(one.getDeptNo()))){ if(deptNoList.stream().noneMatch(u -> u.equals(one.getDeptNo()))){
param.setErrorMessage(InsurancesConstants.DEPT_NO_NOT_IN_DEPT_LIST); param.setErrorMessage(InsurancesConstants.DEPT_NO_NOT_IN_DEPT_LIST);
errorList.add(param); errorList.add(param);
...@@ -5841,6 +5861,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -5841,6 +5861,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
errorList.add(param); errorList.add(param);
continue; continue;
} }
//校验当前项目是否在权限范围内
if(CollectionUtils.isEmpty(deptNoList)){
param.setErrorMessage(InsurancesConstants.DEPT_NO_NOT_IN_USER_DEPT_LIST);
errorList.add(param);
continue;
}
//项目所属权限验证 //项目所属权限验证
if(deptNoList.stream().noneMatch(u ->u.equals(deptNo))){ if(deptNoList.stream().noneMatch(u ->u.equals(deptNo))){
param.setErrorMessage(InsurancesConstants.DEPT_NO_NOT_IN_USER_DEPT_LIST); param.setErrorMessage(InsurancesConstants.DEPT_NO_NOT_IN_USER_DEPT_LIST);
...@@ -6410,6 +6436,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -6410,6 +6436,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
errorList.add(param); errorList.add(param);
continue; continue;
} }
//校验当前项目是否在权限范围内
if(CollectionUtils.isEmpty(deptNoList)){
param.setErrorMessage(InsurancesConstants.DEPT_NO_NOT_IN_USER_DEPT_LIST);
errorList.add(param);
continue;
}
//旧项目ID不在当前权限范围内 //旧项目ID不在当前权限范围内
if(deptNoList.stream().noneMatch(u ->u.equals(oldDeptNo))){ if(deptNoList.stream().noneMatch(u ->u.equals(oldDeptNo))){
param.setErrorMessage(InsurancesConstants.OLD_DEPT_NO_NOT_IN_DEPT_LIST); param.setErrorMessage(InsurancesConstants.OLD_DEPT_NO_NOT_IN_DEPT_LIST);
...@@ -6765,35 +6797,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -6765,35 +6797,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @return {@link List< String>} * @return {@link List< String>}
*/ */
public List<String> getDeptNoList(YifuUser user){ public List<String> getDeptNoList(YifuUser user){
//todo 根据登录人获取其项目权限列表
List<String> deptList = new ArrayList<>(16); List<String> deptList = new ArrayList<>(16);
String id = user.getId(); try{
//周日琴12,徐燕13 R<TSettleDomainListVo> settleDomainList = archivesDaprUtil.getSettleDomainIdsByUserId(user.getId());
if (CommonConstants.TWELVE_STRING.equals(id)){ if(Common.isNotNull(settleDomainList) && settleDomainList.getCode() == CommonConstants.SUCCESS){
deptList.add("A0001"); deptList = settleDomainList.getData().getDeptIds();
deptList.add("皖M02002");
deptList.add("皖A12345678");
deptList.add("皖B29203");
deptList.add("皖AFA10M");
deptList.add("皖AFA11F");
deptList.add("皖M02023");
deptList.add("皖M02045");
} else if(CommonConstants.THIRTEEN_STRING.equals(id)){
deptList.add("皖A12345678");
deptList.add("皖B29203");
deptList.add("皖M02023");
deptList.add("皖M02002");
}else{
R<TSettleDomainListVo> tSettleDomainListVoR = archivesDaprUtil.selectAllSettleDomainSelectVos();
if (null != tSettleDomainListVoR && tSettleDomainListVoR.getCode() == CommonConstants.SUCCESS && Common.isNotNull(tSettleDomainListVoR.getData())) {
TSettleDomainListVo data = tSettleDomainListVoR.getData();
List<TSettleDomainSelectVo> listSelectVO = data.getListSelectVO();
for (TSettleDomainSelectVo tSettleDomainSelectVo : listSelectVO) {
if (Common.isNotNull(tSettleDomainSelectVo.getDepartNo())) {
deptList.add(tSettleDomainSelectVo.getDepartNo());
}
}
} }
}catch (Exception e){
log.error("查询项目信息出错:"+e);
} }
return deptList; return deptList;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment