专项附加扣除业务线bug修复
This commit is contained in:
parent
70732f38a9
commit
3274043397
|
|
@ -471,15 +471,20 @@ public class SpecialAddDeductionServiceImpl extends Service implements SpecialAd
|
|||
SpecialAddDeductionBiz SpecialAddDeductionBiz = new SpecialAddDeductionBiz();
|
||||
Long currentEmployeeId = (long) user.getUID();
|
||||
// 获取所有个税扣缴义务人
|
||||
Collection<TaxAgentManageRangeEmployeeDTO> taxAgentList =
|
||||
getTaxAgentService(user).listTaxAgentAndEmployeeTree(currentEmployeeId);
|
||||
// Collection<TaxAgentManageRangeEmployeeDTO> taxAgentList =
|
||||
// getTaxAgentService(user).listTaxAgentAndEmployeeTree(currentEmployeeId);
|
||||
|
||||
TaxAgentQueryParam param = TaxAgentQueryParam.builder().build();
|
||||
param.setFilterType(AuthFilterTypeEnum.ADMIN_DATA);
|
||||
Collection<TaxAgentPO> taxAgentList = getTaxAgentService(user).listAuth(param);
|
||||
|
||||
SpecialAddDeductionPO byId = SpecialAddDeductionBiz.getById(specialAddDeductionParam.getId());
|
||||
if (byId == null) {
|
||||
throw new SalaryRunTimeException("该数据不存在!");
|
||||
}
|
||||
//管理员可以编辑该扣缴义务人数据,其他人可以编辑本人数据
|
||||
boolean canEdit = byId.getEmployeeId().equals((long) user.getUID())
|
||||
|| taxAgentList.stream().anyMatch(t -> Objects.equals(t.getTaxAgentId(), byId.getTaxAgentId()));
|
||||
|| taxAgentList.stream().anyMatch(t -> Objects.equals(t.getId(), byId.getTaxAgentId()));
|
||||
if (!canEdit) {
|
||||
//没有编辑权限
|
||||
throw new SalaryRunTimeException("该个税扣缴义务人无权限编辑此数据!");
|
||||
|
|
|
|||
Loading…
Reference in New Issue