显示提醒人信息
This commit is contained in:
parent
7a06fc73f4
commit
8564f2e6d6
|
|
@ -8,7 +8,6 @@ import com.engine.core.impl.Service;
|
|||
import com.engine.salary.common.OptionDTO;
|
||||
import com.engine.salary.constant.SalaryDefaultTenantConstant;
|
||||
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
||||
import com.engine.salary.entity.taxagent.po.TaxAgentEmployeePO;
|
||||
import com.engine.salary.entity.taxapiflow.dto.TaxDeclarationApiFlowWarnReceiverFormDTO;
|
||||
import com.engine.salary.entity.taxapiflow.dto.TaxDeclarationApiFlowWarnReceiverListDTO;
|
||||
import com.engine.salary.entity.taxapiflow.param.CreateMessageRuleParam;
|
||||
|
|
@ -77,21 +76,22 @@ public class TaxDeclarationApiFlowWarnServiceImpl extends Service implements Tax
|
|||
|
||||
@Override
|
||||
public List<TaxDeclarationApiFlowWarnReceiverListDTO> getWarnReceiverList(Long warnConfigId) {
|
||||
List<TaxDeclarationApiFlowWarnReceiverPO> receiverPOList = getTaxDeclarationApiFlowWarnReceiverMapper().listSome(TaxDeclarationApiFlowWarnReceiverPO
|
||||
.builder()
|
||||
.warnConfigId(warnConfigId)
|
||||
.build());
|
||||
List<TaxDeclarationApiFlowWarnReceiverPO> receiverPOList = getTaxDeclarationApiFlowWarnReceiverMapper().listSome(TaxDeclarationApiFlowWarnReceiverPO.builder().warnConfigId(warnConfigId).build());
|
||||
|
||||
List<TaxAgentEmployeePO> salaryEmployees = getTaxAgentService(user).listEmployees();
|
||||
Map<Long, String> salaryEmployeeMap = SalaryEntityUtil.convert2Map(salaryEmployees, TaxAgentEmployeePO::getEmployeeId, TaxAgentEmployeePO::getUsername);
|
||||
List<Long> empIds = SalaryEntityUtil.properties(receiverPOList, TaxDeclarationApiFlowWarnReceiverPO::getEmployeeId, Collectors.toList());
|
||||
List<DataCollectionEmployee> empInfos = getSalaryEmployeeService(user).getEmployeeByIdsAll(empIds);
|
||||
Map<Long, DataCollectionEmployee> salaryEmployeeMap = SalaryEntityUtil.convert2Map(empInfos, DataCollectionEmployee::getEmployeeId);
|
||||
|
||||
return receiverPOList.stream().map(e -> TaxDeclarationApiFlowWarnReceiverListDTO.builder()
|
||||
.employeeName(salaryEmployeeMap.get(e.getEmployeeId()))
|
||||
.employeeId(e.getEmployeeId())
|
||||
.mobile(e.getMobile())
|
||||
.email(e.getEmail())
|
||||
.id(e.getId())
|
||||
.build()).collect(Collectors.toList());
|
||||
return receiverPOList.stream().map(e -> {
|
||||
DataCollectionEmployee employee = salaryEmployeeMap.get(e.getEmployeeId());
|
||||
return TaxDeclarationApiFlowWarnReceiverListDTO.builder()
|
||||
.employeeName(employee.getUsername())
|
||||
.employeeId(e.getEmployeeId())
|
||||
.mobile(employee.getMobile())
|
||||
.email(employee.getEmail())
|
||||
.id(e.getId())
|
||||
.build();
|
||||
}).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Reference in New Issue