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