Commit 7d67194b authored by 查济's avatar 查济

Merge branch 'feature-1.3-zhaji' into 'feature/insurance-1.3.0'

Feature 1.3 zhaji

See merge request !310
parents ce460b53 f43eef82
...@@ -2547,6 +2547,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2547,6 +2547,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);
...@@ -2865,8 +2870,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2865,8 +2870,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);
...@@ -3277,6 +3286,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3277,6 +3286,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);
...@@ -5657,6 +5671,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -5657,6 +5671,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);
...@@ -5891,6 +5911,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -5891,6 +5911,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);
...@@ -6460,6 +6486,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -6460,6 +6486,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);
...@@ -6815,35 +6847,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -6815,35 +6847,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