艾志优化
This commit is contained in:
parent
de1efcfd7f
commit
f15fdef375
|
|
@ -2,12 +2,12 @@ package com.engine.salary.service.impl;
|
|||
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.hrmelog.entity.dto.LoggerContext;
|
||||
import com.engine.salary.common.LocalDateRange;
|
||||
import com.engine.salary.common.YearMonthRange;
|
||||
import com.engine.salary.config.SalaryElogConfig;
|
||||
import com.engine.salary.constant.SalaryDefaultTenantConstant;
|
||||
import com.engine.salary.constant.SzyhApiConstant;
|
||||
import com.engine.hrmelog.entity.dto.LoggerContext;
|
||||
import com.engine.salary.entity.datacollection.AddUpSituation;
|
||||
import com.engine.salary.entity.employeedeclare.bo.EmployeeDeclareRequest;
|
||||
import com.engine.salary.entity.employeedeclare.po.EmployeeDeclarePO;
|
||||
|
|
@ -988,6 +988,29 @@ public class TaxDeclareRecordServiceImpl extends Service implements TaxDeclareRe
|
|||
Map<String, List<List<Object>>> map = new HashMap<>();
|
||||
List<TaxDeclarationPO> list = getTaxDeclarationService(user).listByTaxDeclareRecordId(id);
|
||||
list.stream().map(TaxDeclarationPO::getIncomeCategory).map(IncomeCategoryEnum::parseByValue).forEach(e -> e.parseGetDeclareTaxResultFeedbackResponse(map, declareTaxResultFeedbackResponse));
|
||||
// 艾志分权
|
||||
List<Long> taxAgentIds = getTaxAgentService(user).listAllTaxAgentsAsAdmin(Long.valueOf(user.getUID())).stream().map(TaxAgentPO::getId).collect(Collectors.toList());
|
||||
if (!taxAgentIds.contains(taxDeclareRecord.getTaxAgentId())) {
|
||||
Map<String, Object> authMap = getEmployeeDeclareService(user).empIdsByAzGssbAuth(user.getUID());
|
||||
List<Long> canManageEmpIds = (List<Long>)authMap.get("canManageEmpIds");
|
||||
// 获取这些人在人员信息报送中的证件号码
|
||||
List<EmployeeDeclarePO> employeeDeclareList = getEmployeeDeclareService(user).listByTaxCycleAndTaxAgentId(taxDeclareRecord.getTaxCycle(), taxDeclareRecord.getTaxAgentId());
|
||||
List<String> canManageCardNum = employeeDeclareList.stream().filter(declare -> canManageEmpIds.contains(declare.getEmployeeId())).map(EmployeeDeclarePO::getCardNum).collect(Collectors.toList());
|
||||
for (Map.Entry<String, List<List<Object>>> entry : map.entrySet()) {
|
||||
List<List<Object>> valueList = entry.getValue();
|
||||
List<List<Object>> newvalueList = new ArrayList<>();
|
||||
newvalueList.add(valueList.get(0));
|
||||
for (int i =1; i<valueList.size(); i++) {
|
||||
List<Object> value = valueList.get(i);
|
||||
String cardNum = Util.null2String(value.get(2));
|
||||
if (canManageCardNum.contains(cardNum)) {
|
||||
newvalueList.add(value);
|
||||
}
|
||||
}
|
||||
map.put(entry.getKey(), newvalueList);
|
||||
}
|
||||
}
|
||||
|
||||
return ExcelUtil.genWorkbookV2(map);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -135,6 +135,9 @@ public class EmployeeDeclareWrapper extends Service {
|
|||
Map<String, Object> authMap = getEmployeeDeclareService(user).empIdsByAzGssbAuth(user.getUID());
|
||||
List<Long> canManageEmpIds = (List<Long>)authMap.get("canManageEmpIds");
|
||||
boolean canOperate = (Boolean) authMap.get("canOperate");
|
||||
if (taxAgentIds.contains(queryParam.getTaxAgentId())) {
|
||||
canOperate = true;
|
||||
}
|
||||
employeeDeclarePOS = employeeDeclarePOS.stream().filter(po -> taxAgentIds.contains(po.getTaxAgentId()) || canManageEmpIds.contains(po.getEmployeeId())).collect(Collectors.toList());
|
||||
pageInfo.setTotal(employeeDeclarePOS.size());
|
||||
employeeDeclarePOS = SalaryPageUtil.subList(queryParam.getCurrent(), queryParam.getPageSize(), employeeDeclarePOS);
|
||||
|
|
|
|||
Loading…
Reference in New Issue