weaver-hrm-salary/src/com/engine/salary/service/impl/EmployeeDeclareServiceImpl....

707 lines
43 KiB
Java
Raw Normal View History

2023-08-08 09:21:14 +08:00
package com.engine.salary.service.impl;
import cn.hutool.core.map.MapUtil;
2023-08-08 09:21:14 +08:00
import com.engine.common.util.ServiceUtil;
import com.engine.core.impl.Service;
import com.engine.salary.common.LocalDateRange;
import com.engine.salary.common.taxdeclare.AsyncRequestIdDTO;
import com.engine.salary.constant.SalaryDefaultTenantConstant;
import com.engine.salary.constant.SzyhApiConstant;
2023-08-08 09:21:14 +08:00
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
import com.engine.salary.entity.employeedeclare.bo.EmployeeDeclareList;
import com.engine.salary.entity.employeedeclare.bo.EmployeeDeclareRefresh;
import com.engine.salary.entity.employeedeclare.bo.EmployeeDeclareRequest;
import com.engine.salary.entity.employeedeclare.dto.*;
2023-08-08 09:21:14 +08:00
import com.engine.salary.entity.employeedeclare.param.*;
import com.engine.salary.entity.employeedeclare.po.EmployeeDeclarePO;
import com.engine.salary.entity.employeedeclare.po.EmployeeDeclareRecordPO;
import com.engine.salary.entity.employeedeclare.response.DeclareEmployeeFeedbackResponse;
import com.engine.salary.entity.employeedeclare.response.DeclareEmployeeInfoResponse;
2023-08-08 09:21:14 +08:00
import com.engine.salary.entity.salaryarchive.dto.SalaryArchiveDataDTO;
import com.engine.salary.entity.salaryarchive.po.SalaryArchivePO;
import com.engine.salary.entity.taxagent.bo.TaxAgentTaxReturnBO;
2023-08-08 09:21:14 +08:00
import com.engine.salary.entity.taxagent.po.TaxAgentPO;
import com.engine.salary.entity.taxagent.po.TaxAgentTaxReturnPO;
import com.engine.salary.entity.taxapiflow.bo.TaxApiFlowBO;
import com.engine.salary.entity.taxapiflow.po.TaxDeclarationApiFlowRecordPO;
import com.engine.salary.entity.taxdeclaration.po.TaxDeclarationApiConfigPO;
2023-08-08 09:21:14 +08:00
import com.engine.salary.enums.SalaryCycleTypeEnum;
import com.engine.salary.enums.SalaryOnOffEnum;
import com.engine.salary.enums.employeedeclare.CardTypeEnum;
2023-08-08 09:21:14 +08:00
import com.engine.salary.enums.employeedeclare.DeclareStatusEnum;
import com.engine.salary.enums.employeedeclare.EmploymentStatusEnum;
import com.engine.salary.enums.employeedeclare.EmploymentTypeEnum;
2023-08-08 09:21:14 +08:00
import com.engine.salary.enums.salaryaccounting.EmployeeTypeEnum;
import com.engine.salary.enums.sicategory.DeleteTypeEnum;
import com.engine.salary.enums.taxagent.TaxAgentTaxReturnStatusEnum;
import com.engine.salary.enums.taxdeclaration.EnumDeclareApiBusinessType;
2023-08-08 09:21:14 +08:00
import com.engine.salary.exception.SalaryRunTimeException;
import com.engine.salary.mapper.employeedeclare.EmployeeDeclareMapper;
import com.engine.salary.service.*;
import com.engine.salary.util.*;
2023-08-08 09:21:14 +08:00
import com.engine.salary.util.db.MapperProxyFactory;
import com.engine.salary.util.page.PageInfo;
import com.engine.salary.util.page.SalaryPageUtil;
import com.engine.salary.util.valid.SalaryCardUtil;
2023-08-08 09:21:14 +08:00
import com.engine.salary.util.valid.ValidUtil;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Lists;
import dm.jdbc.util.IdGenerator;
2023-08-08 09:21:14 +08:00
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
2023-08-08 09:21:14 +08:00
import org.springframework.transaction.annotation.Transactional;
import weaver.general.Util;
2023-08-08 09:21:14 +08:00
import weaver.hrm.User;
import java.time.LocalDate;
2023-08-08 09:21:14 +08:00
import java.util.*;
import java.util.stream.Collectors;
/**
* @description: 人员报送人员
* @author: xiajun
* @modified By: xiajun
* @date: Created in 9/2/22 3:17 PM
* @version:v1.0
*/
@Slf4j
public class EmployeeDeclareServiceImpl extends Service implements EmployeeDeclareService {
private EmployeeDeclareMapper getEmployeeDeclareMapper() {
return MapperProxyFactory.getProxy(EmployeeDeclareMapper.class);
}
private TaxAgentService getTaxAgentService(User user) {
return ServiceUtil.getService(TaxAgentServiceImpl.class, user);
}
private SalaryEmployeeService getSalaryEmployeeService(User user) {
return ServiceUtil.getService(SalaryEmployeeServiceImpl.class, user);
}
private SalaryArchiveService getSalaryArchiveService(User user) {
return ServiceUtil.getService(SalaryArchiveServiceImpl.class, user);
}
private TaxDeclarationApiConfigService getTaxDeclarationApiConfigService(User user) {
return ServiceUtil.getService(TaxDeclarationApiConfigServiceImpl.class, user);
}
private TaxAgentTaxReturnService getTaxAgentTaxReturnService(User user) {
return ServiceUtil.getService(TaxAgentTaxReturnServiceImpl.class, user);
}
private EmployeeDeclareRecordService getEmployeeDeclareRecordService(User user) {
return ServiceUtil.getService(EmployeeDeclareRecordServiceImpl.class, user);
}
private TaxDeclarationApiBillingService getTaxDeclarationApiBillingService(User user) {
return ServiceUtil.getService(TaxDeclarationApiBillingServiceImpl.class, user);
}
2023-08-08 09:21:14 +08:00
@Override
public EmployeeDeclarePO getById(Long id) {
return getEmployeeDeclareMapper().getById(id);
}
@Override
public List<EmployeeDeclarePO> listByIds(Collection<Long> ids) {
if (CollectionUtils.isEmpty(ids)) {
2023-08-08 09:21:14 +08:00
return Collections.emptyList();
}
return getEmployeeDeclareMapper().listSome(EmployeeDeclarePO.builder().ids(ids).build());
}
@Override
2023-08-14 20:07:29 +08:00
public List<EmployeeDeclarePO> listByTaxCycleAndTaxAgentId(Date taxCycle, Long taxAgentId) {
2023-08-08 09:21:14 +08:00
return getEmployeeDeclareMapper().listSome(EmployeeDeclarePO.builder()
2023-08-14 20:07:29 +08:00
.taxCycle(taxCycle)
2023-08-08 09:21:14 +08:00
.taxAgentId(taxAgentId)
.build());
}
@Override
2023-08-14 20:07:29 +08:00
public List<EmployeeDeclarePO> listByTaxCycleAndTaxAgentIdAndEmployeeIds(Date taxCycle, Long taxAgentId, Collection<Long> employeeIds) {
2023-08-08 09:21:14 +08:00
if (CollectionUtils.isEmpty(employeeIds)) {
return Collections.emptyList();
}
return getEmployeeDeclareMapper().listSome(EmployeeDeclarePO.builder()
2023-08-14 20:07:29 +08:00
.taxCycle(taxCycle)
2023-08-08 09:21:14 +08:00
.taxAgentId(taxAgentId)
.employeeIds(employeeIds)
.build());
}
@Override
public List<EmployeeDeclarePO> listByParam(EmployeeDeclareListQueryParam queryParam) {
return getEmployeeDeclareMapper().listByParam(queryParam);
}
@Override
public List<EmployeeDeclarePO> list4AddByParam(EmployeeDeclareAddListQueryParam queryParam) {
2023-08-21 19:35:14 +08:00
queryParam.setPreTaxCycle(SalaryDateUtil.plusMonths(queryParam.getTaxCycle(), -1));
2023-08-08 09:21:14 +08:00
return getEmployeeDeclareMapper().list4AddByParam(queryParam);
}
@Override
public List<EmployeeDeclarePO> list4UpdateByParam(EmployeeDeclareListQueryParam queryParam) {
return getEmployeeDeclareMapper().list4UpdateByParam(queryParam);
}
@Override
public PageInfo<EmployeeDeclarePO> listPage4UpdateByParam(EmployeeDeclareListQueryParam queryParam) {
List<EmployeeDeclarePO> list = getEmployeeDeclareMapper().list4UpdateByParam(queryParam);
return SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(), list, EmployeeDeclarePO.class);
}
// @Override
// public List<EmployeeDeclarePO> list4FailByParam(EmployeeDeclareFailListQueryParam queryParam) {
// return new LambdaQueryChainWrapper<>(employeeDeclareMapper)
// .eq(EmployeeDeclarePO::getTenantKey)
2023-08-08 09:21:14 +08:00
// .eq(EmployeeDeclarePO::getDeleteType, DeleteTypeEnum.NOT_DELETED.getValue())
// .eq(EmployeeDeclarePO::getTaxAgentId, queryParam.getTaxAgentId())
// .eq(EmployeeDeclarePO::getTaxCycle, queryParam.getTaxCycle().toString())
// .eq(EmployeeDeclarePO::getDeclareStatus, DeclareStatusEnum.DECLARE_FAIL.getValue())
// .list();
// }
@Override
public PageInfo<EmployeeDeclarePO> listPage4FailByParam(EmployeeDeclareFailListQueryParam queryParam) {
ValidUtil.doValidator(queryParam);
List<EmployeeDeclarePO> list = getEmployeeDeclareMapper().listSome(EmployeeDeclarePO.builder()
.taxAgentId(queryParam.getTaxAgentId())
2023-08-14 20:07:29 +08:00
.taxCycle(queryParam.getTaxCycle())
2023-08-08 09:21:14 +08:00
.declareStatus(DeclareStatusEnum.DECLARE_FAIL.getValue())
.build());
PageInfo<EmployeeDeclarePO> page = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(),
list, EmployeeDeclarePO.class);
return page;
}
@Override
public void save(EmployeeDeclareSaveParam saveParam) {
Date now = new Date();
2023-08-21 19:35:14 +08:00
EmployeeDeclarePO employeeDeclare = new EmployeeDeclarePO();
employeeDeclare.setTaxAgentId(saveParam.getTaxAgentId());
employeeDeclare.setTaxCycle(saveParam.getTaxCycle());
employeeDeclare.setEmployeeName(saveParam.getEmployeeName());
employeeDeclare.setJobNum(saveParam.getJobNum());
employeeDeclare.setCardType(CardTypeEnum.RESIDENT_IDENTITY_CARDS.getValue());
employeeDeclare.setCardNum(saveParam.getCardNum());
employeeDeclare.setGender(SalaryCardUtil.judgeGender(saveParam.getCardNum()).getValue());
employeeDeclare.setBirthday(SalaryDateUtil.localDateToDate(SalaryCardUtil.judgeBirthday(saveParam.getCardNum())));
employeeDeclare.setEmploymentStatus(saveParam.getEmploymentStatus().getValue());
employeeDeclare.setMobile(saveParam.getMobile());
employeeDeclare.setEmploymentType(saveParam.getEmploymentType().getValue());
employeeDeclare.setEmploymentFirstYear("");
employeeDeclare.setEmploymentDate(SalaryDateUtil.localDateToDate(saveParam.getEmploymentDate()));
employeeDeclare.setDismissDate(SalaryDateUtil.localDateToDate(saveParam.getDismissDate()));
employeeDeclare.setDisability(saveParam.getDisability().getValue());
employeeDeclare.setDisabilityCardNo(saveParam.getDisabilityCardNo());
employeeDeclare.setLonelyOld(saveParam.getLonelyOld().getValue());
employeeDeclare.setMartyrDependents(saveParam.getMartyrDependents().getValue());
employeeDeclare.setMartyrDependentsCardNo(saveParam.getMartyrDependentsCardNo());
employeeDeclare.setDeductExpenses(saveParam.getDeductExpenses().getValue());
employeeDeclare.setSuccessfullyDeclared(0);
employeeDeclare.setNewEmployeeInfo(0);
employeeDeclare.setDeclareStatus(DeclareStatusEnum.NOT_DECLARE.getValue());
employeeDeclare.setDeclareErrorMsg("");
if (Objects.isNull(saveParam.getId())) {
2023-08-21 19:35:14 +08:00
employeeDeclare.setId(IdGenerator.generate());
employeeDeclare.setEmployeeId(saveParam.getEmployeeId());
employeeDeclare.setEmployeeType(saveParam.getEmployeeType().getValue());
employeeDeclare.setTenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY);
employeeDeclare.setCreator((long) user.getUID());
employeeDeclare.setDeleteType(DeleteTypeEnum.NOT_DELETED.getValue());
employeeDeclare.setCreateTime(now);
employeeDeclare.setUpdateTime(now);
getEmployeeDeclareMapper().insertIgnoreNull(employeeDeclare);
// 记录日志
2023-08-08 09:21:14 +08:00
// LoggerContext<EmployeeDeclarePO> loggerContext = new LoggerContext<>();
// loggerContext.setTargetId(Util.null2String(saveParam.getTaxAgentId()));
// loggerContext.setTargetName(employeeDeclare.getEmployeeName());
// loggerContext.setOperateType(OperateTypeEnum.ADD.getValue());
// loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(156441, "新增报送人员"));
// loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(156441, "新增报送人员:") + employeeDeclare.getEmployeeName());
// loggerContext.setNewValues(employeeDeclare);
// employeeDeclareLoggerTemplate.write(loggerContext);
} else {
EmployeeDeclarePO originEmployeeDeclare = getById(saveParam.getId());
if (Objects.isNull(originEmployeeDeclare)) {
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(156442, "人员不存在或已被删除"));
}
if (Objects.equals(originEmployeeDeclare.getSuccessfullyDeclared(), 1)
&& !Objects.equals(originEmployeeDeclare.getEmployeeName(), employeeDeclare.getEmployeeName())
&& !Objects.equals(originEmployeeDeclare.getCardNum(), employeeDeclare.getCardNum())) {
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(156443, "成功报送过的人员,姓名和证件号码只能修改其一,同时需要修改的请前往办税服务厅"));
}
2023-08-21 19:35:14 +08:00
employeeDeclare.setId(originEmployeeDeclare.getId());
employeeDeclare.setEmployeeId(originEmployeeDeclare.getEmployeeId());
employeeDeclare.setEmployeeType(originEmployeeDeclare.getEmployeeType());
employeeDeclare.setSuccessfullyDeclared(originEmployeeDeclare.getSuccessfullyDeclared());
employeeDeclare.setUpdateTime(now);
// 判断本次编辑是否有修改人员信息
if (!StringUtils.equals(employeeDeclare.toCompareString(), originEmployeeDeclare.toCompareString())) {
employeeDeclare.setNewEmployeeInfo(1);
}
getEmployeeDeclareMapper().updateIgnoreNull(employeeDeclare);
// 记录日志
2023-08-08 09:21:14 +08:00
// LoggerContext<EmployeeDeclarePO> loggerContext = new LoggerContext<>();
// loggerContext.setTargetId(Util.null2String(saveParam.getTaxAgentId()));
// loggerContext.setTargetName(employeeDeclare.getEmployeeName());
// loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue());
// loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(156444, "编辑报送人员"));
// loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(156444, "编辑报送人员:") + employeeDeclare.getEmployeeName());
// loggerContext.setOldValues(originEmployeeDeclare);
// loggerContext.setNewValues(employeeDeclare);
// employeeDeclareLoggerTemplate.write(loggerContext);
}
}
@Override
public void batchUpdate(EmployeeDeclareBatchUpdateParam batchUpdateParam) {
// 查询报送人员
List<EmployeeDeclarePO> employeeDeclares;
if (CollectionUtils.isNotEmpty(batchUpdateParam.getIds())) {
employeeDeclares = listByIds(batchUpdateParam.getIds());
} else {
employeeDeclares = listByParam(batchUpdateParam);
}
// 人员为空时,不允许批量编辑
if (CollectionUtils.isEmpty(employeeDeclares)) {
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(182693, "当前人员列表为空,请选择要批量编辑的人员"));
}
Date now = new Date();
// 校验参数
if (Objects.equals(batchUpdateParam.getBatchUpdateItem(), "employmentStatus")) {
EmploymentStatusEnum employmentStatusEnum = null;
for (EmploymentStatusEnum value : EmploymentStatusEnum.values()) {
if (Objects.equals(value.name(), batchUpdateParam.getItemValue())) {
employmentStatusEnum = value;
}
}
if (employmentStatusEnum == null) {
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(84026, "参数错误"));
}
for (EmployeeDeclarePO employeeDeclare : employeeDeclares) {
if (!Objects.equals(employeeDeclare.getEmploymentStatus(), employmentStatusEnum.getValue())) {
employeeDeclare.setEmploymentStatus(employmentStatusEnum.getValue());
employeeDeclare.setNewEmployeeInfo(1);
employeeDeclare.setDeclareStatus(DeclareStatusEnum.NOT_DECLARE.getValue());
employeeDeclare.setDeclareErrorMsg("");
employeeDeclare.setUpdateTime(now);
}
}
} else if (Objects.equals(batchUpdateParam.getBatchUpdateItem(), "employmentType")) {
EmploymentTypeEnum employmentTypeEnum = null;
for (EmploymentTypeEnum value : EmploymentTypeEnum.values()) {
if (Objects.equals(value.name(), batchUpdateParam.getItemValue())) {
employmentTypeEnum = value;
}
}
if (employmentTypeEnum == null) {
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(84026, "参数错误"));
}
for (EmployeeDeclarePO employeeDeclare : employeeDeclares) {
if (!Objects.equals(employeeDeclare.getEmploymentType(), employmentTypeEnum.getValue())) {
employeeDeclare.setEmploymentType(employmentTypeEnum.getValue());
employeeDeclare.setNewEmployeeInfo(1);
employeeDeclare.setDeclareStatus(DeclareStatusEnum.NOT_DECLARE.getValue());
employeeDeclare.setDeclareErrorMsg("");
employeeDeclare.setUpdateTime(now);
}
}
} else if (Objects.equals(batchUpdateParam.getBatchUpdateItem(), "employmentDate")) {
if (!SalaryDateUtil.checkDay(batchUpdateParam.getItemValue())) {
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(84026, "参数错误"));
}
Date employmentDate = SalaryDateUtil.localDateToDate(LocalDate.parse(batchUpdateParam.getItemValue()));
for (EmployeeDeclarePO employeeDeclare : employeeDeclares) {
if (!Objects.equals(employeeDeclare.getEmploymentDate(), employmentDate)) {
employeeDeclare.setEmploymentDate(employmentDate);
employeeDeclare.setNewEmployeeInfo(1);
employeeDeclare.setDeclareStatus(DeclareStatusEnum.NOT_DECLARE.getValue());
employeeDeclare.setDeclareErrorMsg("");
employeeDeclare.setUpdateTime(now);
}
}
} else if (Objects.equals(batchUpdateParam.getBatchUpdateItem(), "dismissDate")) {
if (!SalaryDateUtil.checkDay(batchUpdateParam.getItemValue())) {
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(84026, "参数错误"));
}
Date dismissDate = SalaryDateUtil.localDateToDate(LocalDate.parse(batchUpdateParam.getItemValue()));
for (EmployeeDeclarePO employeeDeclare : employeeDeclares) {
if (!Objects.equals(employeeDeclare.getDismissDate(), dismissDate)) {
employeeDeclare.setDismissDate(dismissDate);
employeeDeclare.setNewEmployeeInfo(1);
employeeDeclare.setDeclareStatus(DeclareStatusEnum.NOT_DECLARE.getValue());
employeeDeclare.setDeclareErrorMsg("");
employeeDeclare.setUpdateTime(now);
}
}
} else if (Objects.equals(batchUpdateParam.getBatchUpdateItem(), "deductExpenses")) {
SalaryOnOffEnum salaryOnOffEnum = null;
for (SalaryOnOffEnum value : SalaryOnOffEnum.values()) {
if (Objects.equals(value.name(), batchUpdateParam.getItemValue())) {
salaryOnOffEnum = value;
}
}
if (salaryOnOffEnum == null) {
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(84026, "参数错误"));
}
for (EmployeeDeclarePO employeeDeclare : employeeDeclares) {
if (!Objects.equals(employeeDeclare.getDeductExpenses(), salaryOnOffEnum.getValue())) {
employeeDeclare.setDeductExpenses(salaryOnOffEnum.getValue());
employeeDeclare.setNewEmployeeInfo(1);
employeeDeclare.setDeclareStatus(DeclareStatusEnum.NOT_DECLARE.getValue());
employeeDeclare.setDeclareErrorMsg("");
employeeDeclare.setUpdateTime(now);
}
}
}
employeeDeclares.forEach(getEmployeeDeclareMapper()::updateIgnoreNull);
2023-08-08 09:21:14 +08:00
// updateBatchById(employeeDeclares);
}
2023-08-08 09:21:14 +08:00
@Override
public void deleteByIds(Collection<Long> ids) {
List<EmployeeDeclarePO> employeeDeclares = listByIds(ids);
if (CollectionUtils.isEmpty(employeeDeclares)) {
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(156466, "参数错误,人员不存在或已被删除"));
}
boolean declareSuccess = employeeDeclares.stream().anyMatch(e -> Objects.equals(e.getSuccessfullyDeclared(), 1));
if (declareSuccess) {
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(156467, "报送成功过的人员不允许删除"));
}
getEmployeeDeclareMapper().deleteByIds(ids, new Date());
// 记录日志
// for (EmployeeDeclarePO employeeDeclare : employeeDeclares) {
// LoggerContext<EmployeeDeclarePO> loggerContext = new LoggerContext<>();
// loggerContext.setTargetId(Util.null2String(employeeDeclare.getTaxAgentId()));
// loggerContext.setTargetName(employeeDeclare.getEmployeeName());
// loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue());
// loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(156445, "删除报送人员"));
// loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(156445, "删除报送人员:") + employeeDeclare.getEmployeeName());
// loggerContext.setNewValues(employeeDeclare);
// employeeDeclareLoggerTemplate.write(loggerContext);
// }
}
@Override
public List<EmployeeDeclareListDTO> convert(List<EmployeeDeclarePO> employeeDeclares) {
if (CollectionUtils.isEmpty(employeeDeclares)) {
return Collections.emptyList();
}
// 查询个税扣缴义务人
Set<Long> taxAgentIds = SalaryEntityUtil.properties(employeeDeclares, EmployeeDeclarePO::getTaxAgentId);
List<TaxAgentPO> taxAgents = getTaxAgentService(user).listByIds(taxAgentIds);
List<EmployeeDeclareListDTO> dtoList = EmployeeDeclareList.convert(employeeDeclares, taxAgents);
// 人员id集合
List<Long> employeeIds = employeeDeclares.stream().map(EmployeeDeclarePO::getEmployeeId).distinct().collect(Collectors.toList());
// 获取人员部门、分部详细信息
Map<String, DataCollectionEmployee> employeeInfoMap = SalaryEntityUtil.convert2Map(getSalaryEmployeeService(user).getEmployeeByIdsAll(employeeIds), emp -> emp.getEmployeeId() + "-" + emp.isExtEmp());
// 补充分部,部门
dtoList.forEach(po -> {
boolean isExtEmp = EmployeeTypeEnum.EXT_EMPLOYEE.getValue().compareTo(po.getEmployeeType().getValue()) == 0;
DataCollectionEmployee employee = employeeInfoMap.get(po.getEmployeeId() + "-" + isExtEmp);
if (ObjectUtils.isNotEmpty(employee)) {
2023-08-08 09:21:14 +08:00
po.setSubCompanyName(Optional.ofNullable(employee.getSubcompanyName()).orElse(""));
po.setDepartmentName(Optional.ofNullable(employee.getDepartmentName()).orElse(""));
}
});
return dtoList;
}
@Override
public List<EmployeeDeclareFailListDTO> convert2FailListDTO(List<EmployeeDeclarePO> employeeDeclares) {
if (CollectionUtils.isEmpty(employeeDeclares)) {
return Collections.emptyList();
}
// 查询人员信息
List<Long> employeeIds = SalaryEntityUtil.properties(employeeDeclares, EmployeeDeclarePO::getEmployeeId, Collectors.toList());
Map<String, DataCollectionEmployee> employeeInfoMap = SalaryEntityUtil.convert2Map(getSalaryEmployeeService(user).getEmployeeByIdsAll(employeeIds), emp -> emp.getEmployeeId() + "-" + emp.isExtEmp());
return EmployeeDeclareList.convert2FailListDTO(employeeDeclares, employeeInfoMap);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void refresh(EmployeeDeclareRefreshParam refreshParam, Long employeeId) {
// 查询本月已有的需要报送的人员
List<EmployeeDeclarePO> employeeDeclares = listByTaxCycleAndTaxAgentId(refreshParam.getTaxCycle(), refreshParam.getTaxAgentId());
// 查询上月已有的需要报送的人员(只需要正常的)
2023-08-14 20:07:29 +08:00
List<EmployeeDeclarePO> preTaxCycleEmployeeDeclares = listByTaxCycleAndTaxAgentId(SalaryDateUtil.plusMonths(refreshParam.getTaxCycle(), -1), refreshParam.getTaxAgentId())
2023-08-08 09:21:14 +08:00
.stream()
.filter(e -> Objects.equals(e.getEmploymentStatus(), EmploymentStatusEnum.NORMAL.getValue())
&& Objects.equals(e.getDeclareStatus(), DeclareStatusEnum.DECLARE_SUCCESS.getValue()))
.collect(Collectors.toList());
// 查询个税扣缴义务人
TaxAgentPO taxAgent = getTaxAgentService(user).getById(refreshParam.getTaxAgentId());
// 根据税款所属期计算出薪资周期
2023-08-14 20:07:29 +08:00
Date salaryCycle;
Date taxCycle = refreshParam.getTaxCycle();
2023-08-08 09:21:14 +08:00
// TODO先临时写死本月需先完成个税扣缴义务人的改造
// SalaryCycleTypeEnum salaryCycleTypeEnum = SalaryEnumUtil.enumMatchByValue(taxAgent.getTaxCycleType(), SalaryCycleTypeEnum.class);
SalaryCycleTypeEnum salaryCycleTypeEnum = SalaryCycleTypeEnum.THIS_MONTH;
if (salaryCycleTypeEnum == SalaryCycleTypeEnum.BEFORE_LAST_MONTH) {
2023-08-14 20:07:29 +08:00
salaryCycle = SalaryDateUtil.plusMonths(taxCycle, 2);
2023-08-08 09:21:14 +08:00
} else if (salaryCycleTypeEnum == SalaryCycleTypeEnum.LAST_MONTH) {
2023-08-14 20:07:29 +08:00
salaryCycle = SalaryDateUtil.plusMonths(taxCycle, 1);
2023-08-08 09:21:14 +08:00
} else if (salaryCycleTypeEnum == SalaryCycleTypeEnum.NEXT_MONTH) {
2023-08-14 20:07:29 +08:00
salaryCycle = SalaryDateUtil.plusMonths(taxCycle, -1);
2023-08-08 09:21:14 +08:00
} else {
salaryCycle = taxCycle;
}
// 查询薪资档案的发薪人员
2023-08-14 20:07:29 +08:00
LocalDateRange salaryCycleRange = LocalDateRange.builder().fromDate(salaryCycle).endDate(SalaryDateUtil.localDateToDate(SalaryDateUtil.localDate2YearMonth(salaryCycle).atEndOfMonth())).build();
2023-08-08 09:21:14 +08:00
List<SalaryArchiveDataDTO> salaryArchiveDataDTOS = getSalaryArchiveService(user).getSalaryArchiveTaxAgentData(salaryCycleRange, Collections.emptyList(), refreshParam.getTaxAgentId());
List<Long> employeeIds = salaryArchiveDataDTOS.stream().map(SalaryArchiveDataDTO::getEmployeeId).collect(Collectors.toList());
List<SalaryArchivePO> salaryArchivePOS = getSalaryArchiveService(user).listSome(SalaryArchivePO.builder().taxAgentId(refreshParam.getTaxAgentId()).employeeIds(employeeIds).build());
// 本月增加了哪些人员
Set<Long> orgEmployeeIds = ((List<EmployeeDeclarePO>) CollectionUtils.union(preTaxCycleEmployeeDeclares, employeeDeclares))
2023-08-08 09:21:14 +08:00
.stream()
.filter(e -> Objects.equals(e.getEmployeeType(), EmployeeTypeEnum.ORGANIZATION.getValue()))
.map(EmployeeDeclarePO::getEmployeeId)
.collect(Collectors.toSet());
Set<Long> newOrgEmployeeIds = salaryArchiveDataDTOS.stream()
.map(SalaryArchiveDataDTO::getEmployeeId)
.filter(e -> !orgEmployeeIds.contains(e))
.collect(Collectors.toSet());
// 查询新增加的人员信息
List<DataCollectionEmployee> employeeInfos = getSalaryEmployeeService(user).getEmployeeByIdsAll(new ArrayList<>(newOrgEmployeeIds));
// List<SimpleUserInfo> newSimpleUserInfos = salaryEmployeeService.listByEmployeeIds(newOrgEmployeeIds);
2023-08-08 09:21:14 +08:00
// List<HrmEmployeeComInfo> newHrmEmployeeComInfos = comInfoCache.getCacheList(HrmEmployeeComInfo.class, Lists.newArrayList(newOrgEmployeeIds));
// 查询本月增加了哪些非系统人员
// List<ExtEmpPO> extEmployees = extEmployeeService.listBySalaryCycleAndTaxAgentId(salaryCycleRange, refreshParam.getTaxAgentId());
2023-08-08 09:21:14 +08:00
// Set<Long> extEmployeeIds = employeeDeclares.stream()
// .filter(e -> Objects.equals(e.getEmployeeType(), EmployeeTypeEnum.EXT_EMPLOYEE.getValue()))
// .map(EmployeeDeclarePO::getEmployeeId)
// .collect(Collectors.toSet());
// List<ExtEmpPO> newExtEmployees = extEmployees.stream()
2023-08-08 09:21:14 +08:00
// .filter(e -> !extEmployeeIds.contains(e.getId()))
// .collect(Collectors.toList());
// 本次新增的需要报送的人员
EmployeeDeclareRefreshDTO dto = new EmployeeDeclareRefreshDTO()
.setTaxAgentId(taxAgent.getId())
.setTaxCycle(taxCycle)
.setEmployeeDeclares(employeeDeclares)
.setPreTaxCycleEmployeeDeclare(preTaxCycleEmployeeDeclares)
.setSalaryArchives(salaryArchivePOS)
// .setEmployeeInfos(employeeInfos)
.setHrmEmployeeComInfos(employeeInfos);
2023-08-08 09:21:14 +08:00
// .setSimpleUserInfos(newSimpleUserInfos)
// .setExtEmployees(newExtEmployees)
EmployeeDeclareRefresh.Result result = EmployeeDeclareRefresh.refresh(dto, employeeId);
2023-08-18 09:27:16 +08:00
// 保存新增的人员
if (CollectionUtils.isNotEmpty(result.getNewEmployeeDeclares())) {
result.getNewEmployeeDeclares().forEach(getEmployeeDeclareMapper()::insertIgnoreNull);
// getEmployeeDeclareMapper().batchInsert((result.getNewEmployeeDeclares()));
}
// 更新已有人员
if (CollectionUtils.isNotEmpty(result.getEmployeeDeclares())) {
result.getEmployeeDeclares().forEach(getEmployeeDeclareMapper()::updateIgnoreNull);
2023-08-08 09:21:14 +08:00
// updateBatchById(result.getEmployeeDeclares());
2023-08-18 09:27:16 +08:00
}
2023-08-08 09:21:14 +08:00
// // 记录日志
// LoggerContext<EmployeeDeclarePO> loggerContext = new LoggerContext<>();
// loggerContext.setTargetId(refreshParam.getTaxAgentId() + "-" + refreshParam.getTaxCycle().toString());
// loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel(156468, "个税扣缴义务人:「{0}」税款所属期:「{1}」").replace("{0}", taxAgent.getName()).replace("{1}", refreshParam.getTaxCycle().toString()));
2023-08-08 09:21:14 +08:00
// loggerContext.setOperator(Util.null2String(employeeId));
// loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue());
// loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(156447, "刷新数据"));
// loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(156447, "刷新数据"));
2023-08-08 09:21:14 +08:00
// employeeDeclareLoggerTemplate.write(loggerContext);
}
@Override
public EmployeeDeclareInfoDTO getDeclareInfo(EmployeeDeclareParam employeeDeclareParam) {
// 查询本月已有的需要报送的人员
List<EmployeeDeclarePO> employeeDeclares = listByTaxCycleAndTaxAgentId(employeeDeclareParam.getTaxCycle(), employeeDeclareParam.getTaxAgentId());
// 本月是否有修改过人员信息
boolean updateEmployeeInfo = employeeDeclares.stream().anyMatch(e -> Objects.equals(e.getNewEmployeeInfo(), 1) && Objects.equals(e.getDeclareStatus(), DeclareStatusEnum.NOT_DECLARE.getValue()));
// 本月报送失败的人数
Integer declareFailSize = (int) employeeDeclares.stream().filter(e -> Objects.equals(e.getDeclareStatus(), DeclareStatusEnum.DECLARE_FAIL.getValue())).count();
// 本月未报送的人数
Integer notDeclareSize = (int) employeeDeclares.stream().filter(e -> Objects.equals(e.getDeclareStatus(), DeclareStatusEnum.NOT_DECLARE.getValue())).count();
// 本月报送成功的人数
Integer declareSuccessSize = (int) employeeDeclares.stream().filter(e -> Objects.equals(e.getDeclareStatus(), DeclareStatusEnum.DECLARE_SUCCESS.getValue())).count();
return new EmployeeDeclareInfoDTO()
.setShowUpdate(updateEmployeeInfo)
.setDeclareFailSize(declareFailSize)
.setNotDeclareSize(notDeclareSize)
.setDeclareSuccessSize(declareSuccessSize);
}
@Override
public void declare(EmployeeDeclareParam param) {
// 获取api配置信息
TaxDeclarationApiConfigPO apiConfig = getTaxDeclarationApiConfigService(user).getConfig(true);
// 查询个税扣缴义务人
TaxAgentPO taxAgent = getTaxAgentService(user).getById(param.getTaxAgentId());
// 查询个税扣缴义务人关联的企业信息
TaxAgentTaxReturnPO taxAgentTaxReturn = getTaxAgentTaxReturnService(user).getByTaxAgentId(param.getTaxAgentId());
if (Objects.isNull(taxAgentTaxReturn) || !Objects.equals(taxAgentTaxReturn.getCheckStatus(), TaxAgentTaxReturnStatusEnum.SUCCESS.getValue())) {
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(156469, "个税扣缴义务人的报税信息验证未通过,请先维护好个税扣缴义务人的报税信息"));
}
// 查询需要报送的人员
List<EmployeeDeclarePO> employeeDeclares = listByTaxCycleAndTaxAgentId(param.getTaxCycle(), param.getTaxAgentId());
if (CollectionUtils.isEmpty(employeeDeclares)) {
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(156470, "当前报送人员列表暂无数据"));
}
EmployeeDeclareRecordPO employeeDeclareRecord = getEmployeeDeclareRecordService(user).getByTaxCycleAndTaxAgentId(param.getTaxCycle(), param.getTaxAgentId());
if (employeeDeclareRecord != null && StringUtils.isNotEmpty(employeeDeclareRecord.getRequestId())) {
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(156471, "报送中,稍后请点击【获取报送结果】更新报送状态"));
}
// 人员列表
List<Map<String, Object>> employeeInfoMapList = EmployeeDeclareRequest.convert2RequestParam(employeeDeclares);
// 企业信息
Map<String, Object> requestParam = TaxAgentTaxReturnBO.convert2RequestMap(taxAgent, taxAgentTaxReturn);
// 税款所属期
2023-08-20 14:03:43 +08:00
requestParam.put("skssq", SalaryDateUtil.getFormatYearMonth(param.getTaxCycle()).replace("-", ""));
// 人员列表
requestParam.put("rylb", employeeInfoMapList);
String reqJson = JsonUtil.toJsonString(requestParam);
String url = apiConfig.getHost() + SzyhApiConstant.DECLARE_EMPLOYEE_INFO;
Map<String, String> params = new HashMap<>(1);
Map<String, String> header = SingnatureData.initHeader(params, apiConfig.getAppKey(), apiConfig.getAppSecret());
String res = HttpUtil.doPost(url, header, reqJson, HttpUtil.JSON_TYPE);
DeclareEmployeeInfoResponse declareEmployeeInfoResponse = JsonUtil.parseObject(res, DeclareEmployeeInfoResponse.class);
if (Objects.isNull(declareEmployeeInfoResponse) || Objects.isNull(declareEmployeeInfoResponse.getHead())) {
log.error("服务异常:" + res);
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(156449, "服务异常"));
}
if (!Objects.equals(declareEmployeeInfoResponse.getHead().getCode(), SzyhApiConstant.SUCCESS_CODE)) {
throw new SalaryRunTimeException(declareEmployeeInfoResponse.getHead().getMsg());
}
// 删除原来的人员报送记录
getEmployeeDeclareRecordService(user).deleteByTaxCycleAndTaxAgentId(param.getTaxCycle(), param.getTaxAgentId());
// 保存新的人员报送记录
Date now = new Date();
AsyncRequestIdDTO asyncRequestIdDTO = declareEmployeeInfoResponse.getBody();
employeeDeclareRecord = new EmployeeDeclareRecordPO()
.setId(IdGenerator.generate())
.setTaxAgentId(param.getTaxAgentId())
.setTaxCycle(param.getTaxCycle())
.setRequestId(asyncRequestIdDTO.getRequestId())
.setTenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY)
.setCreator((long) user.getUID())
.setDeleteType(DeleteTypeEnum.NOT_DELETED.getValue())
.setCreateTime(now)
.setUpdateTime(now);
getEmployeeDeclareRecordService(user).save(employeeDeclareRecord);
// 记录日志
2023-08-08 09:21:14 +08:00
// LoggerContext<EmployeeDeclarePO> loggerContext = new LoggerContext<>();
// loggerContext.setTargetId(param.getTaxAgentId() + "-" + param.getTaxCycle().toString());
// loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel(156468, "个税扣缴义务人:「{0}」税款所属期:「{1}」").replace("{0}", taxAgent.getName()).replace("{1}", param.getTaxCycle().toString()));
2023-08-08 09:21:14 +08:00
// loggerContext.setOperator(Util.null2String(employeeId));
// loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue());
// loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(156450, "全部报送"));
// loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(156450, "全部报送"));
2023-08-08 09:21:14 +08:00
// employeeDeclareLoggerTemplate.write(loggerContext);
}
@Override
public void getDeclareFeedback(EmployeeDeclareParam param, EmployeeDeclareRateDTO employeeDeclareRate) {
// 获取api配置信息
TaxDeclarationApiConfigPO apiConfig = getTaxDeclarationApiConfigService(user).getConfig(true);
// 查询个税扣缴义务人
TaxAgentPO taxAgent = getTaxAgentService(user).getById(param.getTaxAgentId());
// 查询人员报送记录
EmployeeDeclareRecordPO employeeDeclareRecord = getEmployeeDeclareRecordService(user).getByTaxCycleAndTaxAgentId(param.getTaxCycle(), param.getTaxAgentId());
if (Objects.isNull(employeeDeclareRecord)) {
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(156451, "请先报送后再获取报送结果"));
}
if (StringUtils.isEmpty(employeeDeclareRecord.getRequestId())) {
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(156451, "请先报送后再获取报送结果"));
}
String url = apiConfig.getHost() + SzyhApiConstant.DECLARE_EMPLOYEE_INFO_FEEDBACK;
ImmutableMap<String, String> requestParam = ImmutableMap.of("requestId", employeeDeclareRecord.getRequestId());
Map<String, String> header = SingnatureData.initHeader(Collections.emptyMap(), apiConfig.getAppKey(), apiConfig.getAppSecret());
String res = HttpUtil.getRequest(url, header, requestParam);
DeclareEmployeeFeedbackResponse declareEmployeeFeedbackResponse = JsonUtil.parseObject(res, DeclareEmployeeFeedbackResponse.class);
if (Objects.isNull(declareEmployeeFeedbackResponse) || Objects.isNull(declareEmployeeFeedbackResponse.getHead())) {
log.error("服务异常:" + res);
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(156449, "服务异常"));
}
if (!Objects.equals(declareEmployeeFeedbackResponse.getHead().getCode(), SzyhApiConstant.SUCCESS_CODE)) {
throw new SalaryRunTimeException(declareEmployeeFeedbackResponse.getHead().getMsg());
}
DeclareEmployeeFeedbackResponse.DeclareEmployeeFeedbackResponseBody declareEmployeeFeedbackResponseBody = declareEmployeeFeedbackResponse.getBody();
Map<String, Map<String, Object>> employeeFeedbackMap = SalaryEntityUtil.convert2Map(declareEmployeeFeedbackResponseBody.getBsjg(), e -> e.getOrDefault("xm", "")
+ "-" + e.getOrDefault("zzlx", "")
+ "-" + e.getOrDefault("zzhm", ""));
// 流量使用情况
2023-08-14 20:07:29 +08:00
TaxDeclarationApiBillingServiceImpl.ApiFlowUpdateWrapper apiFlowUpdateWrapper = new TaxDeclarationApiBillingServiceImpl.ApiFlowUpdateWrapper(param.getTaxCycle(), apiConfig, EnumDeclareApiBusinessType.EMPLOYEE_DECLARATION);
// 查询申报的人员列表
Date now = new Date();
List<EmployeeDeclarePO> needUpdateEmployeeDeclares = Lists.newArrayList();
List<EmployeeDeclarePO> employeeDeclares = listByTaxCycleAndTaxAgentId(param.getTaxCycle(), param.getTaxAgentId());
for (EmployeeDeclarePO employeeDeclare : employeeDeclares) {
CardTypeEnum cardTypeEnum = SalaryEnumUtil.enumMatchByValue(employeeDeclare.getCardType(), CardTypeEnum.class);
String key = employeeDeclare.getEmployeeName()
+ "-" + (cardTypeEnum == null ? CardTypeEnum.RESIDENT_IDENTITY_CARDS.getDefaultLabel() : cardTypeEnum.getDefaultLabel())
+ "-" + employeeDeclare.getCardNum();
Map<String, Object> employeeInfoMap = employeeFeedbackMap.get(key);
if (MapUtil.isEmpty(employeeInfoMap)) {
continue;
}
// 报送状态
employeeDeclare.setDeclareStatus(SalaryEntityUtil.getIntValue(employeeInfoMap.get("sbzt"), DeclareStatusEnum.NOT_DECLARE.getValue()));
// 失败原因
employeeDeclare.setDeclareErrorMsg(SalaryEntityUtil.null2String(employeeInfoMap.get("sbyy")));
// 验证状态、银行卡验证状态
// 是否报送成功了
if (Objects.equals(employeeDeclare.getDeclareStatus(), DeclareStatusEnum.DECLARE_SUCCESS.getValue())) {
employeeDeclare.setSuccessfullyDeclared(1);
}
employeeDeclare.setUpdateTime(now);
needUpdateEmployeeDeclares.add(employeeDeclare);
// 流量使用记录
TaxDeclarationApiFlowRecordPO flowDetailPO = TaxApiFlowBO.buildTaxDeclarationApiFlowRecordPO(apiFlowUpdateWrapper, param.getTaxAgentId(), employeeDeclare.getEmployeeId());
flowDetailPO.setResultStatus(DeclareStatusEnum.DECLARE_SUCCESS.getValue().equals(employeeDeclare.getDeclareStatus()) ? TaxAgentTaxReturnStatusEnum.SUCCESS.getValue() : TaxAgentTaxReturnStatusEnum.FAIL.getValue());
apiFlowUpdateWrapper.getApiFlowDetailPOList().add(flowDetailPO);
}
// 更新员工的报送状态
if (CollectionUtils.isNotEmpty(needUpdateEmployeeDeclares)) {
//todo
needUpdateEmployeeDeclares.forEach(getEmployeeDeclareMapper()::updateIgnoreNull);
2023-08-08 09:21:14 +08:00
// updateBatchById(needUpdateEmployeeDeclares);
}
// 删除原来的人员报送记录
getEmployeeDeclareRecordService(user).deleteByTaxCycleAndTaxAgentId(param.getTaxCycle(), param.getTaxAgentId());
// 记录日志
2023-08-08 09:21:14 +08:00
// LoggerContext<EmployeeDeclarePO> loggerContext = new LoggerContext<>();
// loggerContext.setTargetId(param.getTaxAgentId() + "-" + param.getTaxCycle().toString());
// loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel(156468, "个税扣缴义务人:「{0}」税款所属期:「{1}」").replace("{0}", taxAgent.getName()).replace("{1}", param.getTaxCycle().toString()));
2023-08-08 09:21:14 +08:00
// loggerContext.setOperator(Util.null2String(employeeId));
// loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue());
// loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(156452, "获取结果反馈"));
// loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(156452, "获取结果反馈"));
2023-08-08 09:21:14 +08:00
// employeeDeclareLoggerTemplate.write(loggerContext);
// 更新流量统计
//todo
getTaxDeclarationApiBillingService(user).updateApiFlowInfo(apiFlowUpdateWrapper);
// 报送失败的
int declareFailSize = (int) needUpdateEmployeeDeclares.stream()
.filter(e -> Objects.equals(e.getDeclareStatus(), DeclareStatusEnum.DECLARE_FAIL.getValue()))
.count();
employeeDeclareRate.setFinish(true);
if (declareFailSize > 0) {
employeeDeclareRate.setMsg(SalaryI18nUtil.getI18nLabel(156472, "报送成功{0}条,报送失败{1}条")
.replace("{0}", Util.null2String(needUpdateEmployeeDeclares.size() - declareFailSize))
.replace("{1}", Util.null2String(declareFailSize)));
} else {
employeeDeclareRate.setMsg(SalaryI18nUtil.getI18nLabel(187388, "报送成功{0}条").replace("{0}", Util.null2String(needUpdateEmployeeDeclares.size())));
}
}
2023-08-08 09:21:14 +08:00
}