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
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()))){
param.setErrorMessage(InsurancesConstants.DEPT_NO_NOT_IN_USER_DEPT_LIST);
listResult.add(param);
......@@ -2865,8 +2870,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult.add(param);
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()))){
param.setErrorMessage(InsurancesConstants.DEPT_NO_NOT_IN_USER_DEPT_LIST);
listResult.add(param);
......@@ -3277,6 +3286,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue;
}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()))){
param.setErrorMessage(InsurancesConstants.OLD_DEPT_NO_NOT_IN_DEPT_LIST);
listResult.add(param);
......@@ -5657,6 +5671,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
errorList.add(param);
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()))){
param.setErrorMessage(InsurancesConstants.DEPT_NO_NOT_IN_DEPT_LIST);
errorList.add(param);
......@@ -5891,6 +5911,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
errorList.add(param);
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))){
param.setErrorMessage(InsurancesConstants.DEPT_NO_NOT_IN_USER_DEPT_LIST);
......@@ -6460,6 +6486,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
errorList.add(param);
continue;
}
//校验当前项目是否在权限范围内
if(CollectionUtils.isEmpty(deptNoList)){
param.setErrorMessage(InsurancesConstants.DEPT_NO_NOT_IN_USER_DEPT_LIST);
errorList.add(param);
continue;
}
//旧项目ID不在当前权限范围内
if(deptNoList.stream().noneMatch(u ->u.equals(oldDeptNo))){
param.setErrorMessage(InsurancesConstants.OLD_DEPT_NO_NOT_IN_DEPT_LIST);
......@@ -6815,35 +6847,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @return {@link List< String>}
*/
public List<String> getDeptNoList(YifuUser user){
//todo 根据登录人获取其项目权限列表
List<String> deptList = new ArrayList<>(16);
String id = user.getId();
//周日琴12,徐燕13
if (CommonConstants.TWELVE_STRING.equals(id)){
deptList.add("A0001");
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());
}
}
try{
R<TSettleDomainListVo> settleDomainList = archivesDaprUtil.getSettleDomainIdsByUserId(user.getId());
if(Common.isNotNull(settleDomainList) && settleDomainList.getCode() == CommonConstants.SUCCESS){
deptList = settleDomainList.getData().getDeptIds();
}
}catch (Exception e){
log.error("查询项目信息出错:"+e);
}
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