2023-08-10 09:33:04 +08:00
|
|
|
|
package com.engine.salary.wrapper;
|
|
|
|
|
|
|
2023-08-14 21:03:40 +08:00
|
|
|
|
import com.engine.common.util.ServiceUtil;
|
2023-08-10 09:33:04 +08:00
|
|
|
|
import com.engine.core.impl.Service;
|
2023-08-11 14:20:14 +08:00
|
|
|
|
import com.engine.salary.cache.SalaryCacheKey;
|
|
|
|
|
|
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
2023-12-14 17:55:48 +08:00
|
|
|
|
import com.engine.salary.entity.employeedeclare.param.EmployeeDeclareListQueryParam;
|
|
|
|
|
|
import com.engine.salary.entity.employeedeclare.po.EmployeeDeclarePO;
|
2023-08-11 14:20:14 +08:00
|
|
|
|
import com.engine.salary.entity.taxagent.po.TaxAgentPO;
|
2023-12-14 17:55:48 +08:00
|
|
|
|
import com.engine.salary.entity.taxdeclaration.bo.TaxDeclarationDetailBO;
|
2023-08-11 14:20:14 +08:00
|
|
|
|
import com.engine.salary.entity.taxdeclaration.dto.*;
|
2023-12-14 10:35:10 +08:00
|
|
|
|
import com.engine.salary.entity.taxdeclaration.param.*;
|
2023-08-11 14:20:14 +08:00
|
|
|
|
import com.engine.salary.entity.taxdeclaration.po.*;
|
2023-12-14 17:55:48 +08:00
|
|
|
|
import com.engine.salary.enums.employeedeclare.CardTypeEnum;
|
|
|
|
|
|
import com.engine.salary.enums.employeedeclare.DeclareStatusEnum;
|
|
|
|
|
|
import com.engine.salary.enums.employeedeclare.EmploymentStatusEnum;
|
2023-08-11 14:20:14 +08:00
|
|
|
|
import com.engine.salary.enums.salarysob.IncomeCategoryEnum;
|
|
|
|
|
|
import com.engine.salary.enums.taxdeclaration.TaxDeclareStatusEnum;
|
|
|
|
|
|
import com.engine.salary.enums.taxdeclaration.TaxDeclareTypeEnum;
|
|
|
|
|
|
import com.engine.salary.exception.SalaryRunTimeException;
|
|
|
|
|
|
import com.engine.salary.service.*;
|
2023-08-14 21:03:40 +08:00
|
|
|
|
import com.engine.salary.service.impl.*;
|
2023-08-11 14:20:14 +08:00
|
|
|
|
import com.engine.salary.util.SalaryDateUtil;
|
|
|
|
|
|
import com.engine.salary.util.SalaryEntityUtil;
|
|
|
|
|
|
import com.engine.salary.util.SalaryEnumUtil;
|
|
|
|
|
|
import com.engine.salary.util.SalaryI18nUtil;
|
|
|
|
|
|
import com.engine.salary.util.page.PageInfo;
|
|
|
|
|
|
import com.engine.salary.util.page.SalaryPageUtil;
|
|
|
|
|
|
import com.weaver.util.threadPool.ThreadPoolUtil;
|
|
|
|
|
|
import com.weaver.util.threadPool.constant.ModulePoolEnum;
|
|
|
|
|
|
import com.weaver.util.threadPool.entity.LocalRunnable;
|
|
|
|
|
|
import dm.jdbc.util.IdGenerator;
|
2023-08-10 09:33:04 +08:00
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
|
|
|
|
import org.apache.commons.compress.utils.Lists;
|
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
|
import org.apache.commons.lang3.math.NumberUtils;
|
2023-08-23 18:13:31 +08:00
|
|
|
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
2023-08-11 14:20:14 +08:00
|
|
|
|
import weaver.general.Util;
|
2023-08-14 21:03:40 +08:00
|
|
|
|
import weaver.hrm.User;
|
2023-08-10 09:33:04 +08:00
|
|
|
|
|
|
|
|
|
|
import java.util.*;
|
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2023-08-23 16:49:45 +08:00
|
|
|
|
* 个税申报
|
|
|
|
|
|
* <p>Copyright: Copyright (c) 2023</p>
|
|
|
|
|
|
* <p>Company: 泛微软件</p>
|
|
|
|
|
|
*
|
|
|
|
|
|
* @author qiantao
|
|
|
|
|
|
* @version 1.0
|
|
|
|
|
|
**/
|
2023-08-10 09:33:04 +08:00
|
|
|
|
@Slf4j
|
|
|
|
|
|
public class TaxDeclareRecordWrapper extends Service {
|
|
|
|
|
|
|
2023-08-11 14:20:14 +08:00
|
|
|
|
|
2023-08-14 21:03:40 +08:00
|
|
|
|
private TaxDeclareRecordService getTaxDeclareRecordService(User user) {
|
|
|
|
|
|
return ServiceUtil.getService(TaxDeclareRecordServiceImpl.class, user);
|
|
|
|
|
|
}
|
2023-08-20 14:03:43 +08:00
|
|
|
|
|
2023-08-14 21:03:40 +08:00
|
|
|
|
private TaxAgentService getTaxAgentService(User user) {
|
|
|
|
|
|
return ServiceUtil.getService(TaxAgentServiceImpl.class, user);
|
|
|
|
|
|
}
|
2023-08-20 14:03:43 +08:00
|
|
|
|
|
2023-08-14 21:03:40 +08:00
|
|
|
|
private SalaryEmployeeService getSalaryEmployeeService(User user) {
|
|
|
|
|
|
return ServiceUtil.getService(SalaryEmployeeServiceImpl.class, user);
|
|
|
|
|
|
}
|
2023-08-20 14:03:43 +08:00
|
|
|
|
|
2023-08-14 21:03:40 +08:00
|
|
|
|
private SalaryCacheService getSalaryCacheService(User user) {
|
|
|
|
|
|
return ServiceUtil.getService(SalaryCacheServiceImpl.class, user);
|
|
|
|
|
|
}
|
2023-08-20 14:03:43 +08:00
|
|
|
|
|
2023-08-14 21:03:40 +08:00
|
|
|
|
private TaxDeclarationService getTaxDeclarationService(User user) {
|
|
|
|
|
|
return ServiceUtil.getService(TaxDeclarationServiceImpl.class, user);
|
|
|
|
|
|
}
|
2023-08-20 14:03:43 +08:00
|
|
|
|
|
2023-08-14 21:03:40 +08:00
|
|
|
|
private TaxDeclarationValueService getTaxDeclarationValueService(User user) {
|
|
|
|
|
|
return ServiceUtil.getService(TaxDeclarationValueServiceImpl.class, user);
|
|
|
|
|
|
}
|
2023-08-20 14:03:43 +08:00
|
|
|
|
|
2023-08-14 21:03:40 +08:00
|
|
|
|
private TaxDeclarationExcelService getTaxDeclarationExcelService(User user) {
|
|
|
|
|
|
return ServiceUtil.getService(TaxDeclarationExcelServiceImpl.class, user);
|
|
|
|
|
|
}
|
2023-08-20 14:03:43 +08:00
|
|
|
|
|
2023-08-14 21:03:40 +08:00
|
|
|
|
private TaxDeclareEmployeeService getTaxDeclareEmployeeService(User user) {
|
|
|
|
|
|
return ServiceUtil.getService(TaxDeclareEmployeeServiceImpl.class, user);
|
|
|
|
|
|
}
|
2023-08-20 14:03:43 +08:00
|
|
|
|
|
2023-08-14 21:03:40 +08:00
|
|
|
|
private TaxDeclareFailService getTaxDeclareFailService(User user) {
|
|
|
|
|
|
return ServiceUtil.getService(TaxDeclareFailServiceImpl.class, user);
|
|
|
|
|
|
}
|
2023-08-20 14:03:43 +08:00
|
|
|
|
|
2023-12-14 10:35:10 +08:00
|
|
|
|
private TaxReportColumnService getTaxReportColumnService(User user) {
|
|
|
|
|
|
return ServiceUtil.getService(TaxReportColumnServiceImpl.class, user);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2023-12-14 17:55:48 +08:00
|
|
|
|
private EmployeeDeclareService getEmployeeDeclareService(User user) {
|
|
|
|
|
|
return ServiceUtil.getService(EmployeeDeclareServiceImpl.class, user);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2023-12-14 10:35:10 +08:00
|
|
|
|
|
2023-08-10 09:33:04 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 个税申报记录列表
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param queryParam
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
2023-08-11 14:20:14 +08:00
|
|
|
|
public PageInfo<TaxDeclareRecordListDTO> listPage(TaxDeclarationListQueryParam queryParam) {
|
2023-08-14 21:03:40 +08:00
|
|
|
|
PageInfo<TaxDeclareRecordPO> page = getTaxDeclareRecordService(user).listPageByParam(queryParam);
|
2023-08-11 14:20:14 +08:00
|
|
|
|
List<TaxDeclareRecordPO> list = page.getList();
|
|
|
|
|
|
|
|
|
|
|
|
PageInfo<TaxDeclareRecordListDTO> dtoPage = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(), TaxDeclareRecordListDTO.class);
|
2023-08-17 19:04:20 +08:00
|
|
|
|
dtoPage.setTotal(page.getTotal());
|
2023-08-11 14:20:14 +08:00
|
|
|
|
if (CollectionUtils.isNotEmpty(list)) {
|
2023-08-10 09:33:04 +08:00
|
|
|
|
// 查询个税扣缴义务人
|
2023-08-11 14:20:14 +08:00
|
|
|
|
Set<Long> taxAgentIds = SalaryEntityUtil.properties(list, TaxDeclareRecordPO::getTaxAgentId);
|
2023-08-14 21:03:40 +08:00
|
|
|
|
List<TaxAgentPO> taxAgents = getTaxAgentService(user).listByIds(taxAgentIds);
|
2023-08-10 09:33:04 +08:00
|
|
|
|
// 查询人员姓名
|
2023-08-11 14:20:14 +08:00
|
|
|
|
List<Long> employeeIds = SalaryEntityUtil.properties(list, TaxDeclareRecordPO::getCreator, Collectors.toList());
|
2023-08-14 21:03:40 +08:00
|
|
|
|
List<DataCollectionEmployee> simpleEmployees = getSalaryEmployeeService(user).getEmployeeByIds(employeeIds);
|
2023-08-10 09:33:04 +08:00
|
|
|
|
|
|
|
|
|
|
List<TaxDeclareRecordListDTO> dtoList = Lists.newArrayList();
|
|
|
|
|
|
Map<Long, String> taxAgentNameMap = SalaryEntityUtil.convert2Map(taxAgents, TaxAgentPO::getId, TaxAgentPO::getName);
|
2023-08-11 14:20:14 +08:00
|
|
|
|
Map<Long, String> simpleEmployeeNameMap = SalaryEntityUtil.convert2Map(simpleEmployees, DataCollectionEmployee::getEmployeeId, DataCollectionEmployee::getUsername);
|
|
|
|
|
|
for (TaxDeclareRecordPO taxDeclareRecord : list) {
|
2023-08-10 09:33:04 +08:00
|
|
|
|
TaxDeclareTypeEnum taxDeclareTypeEnum = SalaryEnumUtil.enumMatchByValue(taxDeclareRecord.getTaxDeclareType(), TaxDeclareTypeEnum.class);
|
|
|
|
|
|
TaxDeclareStatusEnum taxDeclareStatusEnum = SalaryEnumUtil.enumMatchByValue(taxDeclareRecord.getTaxDeclareStatus(), TaxDeclareStatusEnum.class);
|
|
|
|
|
|
TaxDeclareRecordListDTO taxDeclareRecordListDTO = new TaxDeclareRecordListDTO()
|
|
|
|
|
|
.setId(taxDeclareRecord.getId())
|
|
|
|
|
|
.setTaxAgentId(taxDeclareRecord.getTaxAgentId())
|
|
|
|
|
|
.setTaxAgentName(taxAgentNameMap.get(taxDeclareRecord.getTaxAgentId()))
|
|
|
|
|
|
.setSalaryMonth(taxDeclareRecord.getSalaryMonth())
|
|
|
|
|
|
.setTaxCycle(taxDeclareRecord.getTaxCycle())
|
|
|
|
|
|
.setTaxDeclareType(taxDeclareTypeEnum)
|
|
|
|
|
|
.setTaxDeclareTypeDesc(taxDeclareTypeEnum == null ? "" : SalaryI18nUtil.getI18nLabel(taxDeclareTypeEnum.getLabelId(), taxDeclareTypeEnum.getDefaultLabel()))
|
|
|
|
|
|
.setTaxDeclareStatus(taxDeclareStatusEnum)
|
|
|
|
|
|
.setTaxDeclareStatusDesc(taxDeclareStatusEnum == null ? "" : SalaryI18nUtil.getI18nLabel(taxDeclareStatusEnum.getLabelId(), taxDeclareStatusEnum.getDefaultLabel()))
|
|
|
|
|
|
.setTaxPaidAmount(SalaryEntityUtil.thousandthConvert(taxDeclareRecord.getTaxPaidAmount()))
|
|
|
|
|
|
.setOperateEmployeeId(taxDeclareRecord.getCreator())
|
|
|
|
|
|
.setOperateEmployeeName(simpleEmployeeNameMap.get(taxDeclareRecord.getCreator()))
|
|
|
|
|
|
.setOperateTime(SalaryDateUtil.getFormatLocalDateTime(taxDeclareRecord.getCreateTime()))
|
|
|
|
|
|
.setDescription(taxDeclareRecord.getRemark())
|
|
|
|
|
|
.setDisplayIcon(Objects.equals(taxDeclareRecord.getDisplayUpdateIcon(), 1));
|
|
|
|
|
|
dtoList.add(taxDeclareRecordListDTO);
|
|
|
|
|
|
}
|
2023-08-11 14:20:14 +08:00
|
|
|
|
dtoPage.setList(dtoList);
|
2023-08-10 09:33:04 +08:00
|
|
|
|
}
|
2023-08-11 14:20:14 +08:00
|
|
|
|
return dtoPage;
|
2023-08-10 09:33:04 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 个税申报表明细列表
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param queryParam 列表查询条件
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
2023-08-11 14:20:14 +08:00
|
|
|
|
public PageInfo listValuePage(TaxDeclarationValueListQueryParam queryParam) {
|
2023-08-10 09:33:04 +08:00
|
|
|
|
// 查询个税申报表
|
2023-08-14 21:03:40 +08:00
|
|
|
|
TaxDeclarationPO taxDeclaration = getTaxDeclarationService(user).getById(queryParam.getTaxDeclarationId());
|
2023-08-10 09:33:04 +08:00
|
|
|
|
// 判断是否有权限查看
|
2023-08-14 21:03:40 +08:00
|
|
|
|
boolean canSee = getTaxDeclareRecordService(user).checkByAuthority(taxDeclaration);
|
2023-08-10 09:33:04 +08:00
|
|
|
|
if (!canSee) {
|
|
|
|
|
|
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(156515, "对不起,您暂时没有权限查看"));
|
|
|
|
|
|
}
|
|
|
|
|
|
// 查询个税申报表详情
|
2023-08-20 14:03:43 +08:00
|
|
|
|
PageInfo<TaxDeclarationValuePO> page = getTaxDeclarationValueService(user).listPageByTaxDeclarationIds(queryParam, Collections.singleton(queryParam.getTaxDeclarationId()));
|
2023-08-14 21:03:40 +08:00
|
|
|
|
TaxDeclarationValueListDTO taxDeclarationValueListDTO = getTaxDeclarationValueService(user).convert2List(taxDeclaration, page.getList());
|
2023-08-21 10:30:13 +08:00
|
|
|
|
PageInfo<Map<String, Object>> dtoPage = new PageInfo<>(
|
|
|
|
|
|
page.getPageNum(),
|
|
|
|
|
|
page.getPageSize(),
|
|
|
|
|
|
page.getTotal(),
|
|
|
|
|
|
SalaryPageUtil.convertList(taxDeclarationValueListDTO.getColumns()),
|
|
|
|
|
|
taxDeclarationValueListDTO.getData());
|
2023-08-11 14:20:14 +08:00
|
|
|
|
return dtoPage;
|
2023-08-10 09:33:04 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 未报送的人员列表
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param queryParam
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
2023-08-11 14:20:14 +08:00
|
|
|
|
public PageInfo<AbnormalEmployeeListDTO> listEmployeePage4NotDeclare(AbnormalEmployeeListQueryParam queryParam) {
|
|
|
|
|
|
return listEmployeePage("NotDeclare", queryParam);
|
2023-08-10 09:33:04 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 没有申报数据的人员列表
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param queryParam
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
2023-08-11 14:20:14 +08:00
|
|
|
|
public PageInfo<AbnormalEmployeeListDTO> listEmployeePage4NoValue(AbnormalEmployeeListQueryParam queryParam) {
|
|
|
|
|
|
return listEmployeePage("NoValue", queryParam);
|
2023-08-10 09:33:04 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 申报失败的人员列表
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param queryParam
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
2023-08-11 14:20:14 +08:00
|
|
|
|
public PageInfo<FailEmployeeListDTO> listEmployeePage4Fail(AbnormalEmployeeListQueryParam queryParam) {
|
2023-08-10 09:33:04 +08:00
|
|
|
|
// 查询个税申报记录
|
2023-08-14 21:03:40 +08:00
|
|
|
|
TaxDeclareRecordPO taxDeclareRecord = getTaxDeclareRecordService(user).getById(queryParam.getTaxDeclareRecordId());
|
2023-08-10 09:33:04 +08:00
|
|
|
|
// 查询申报失败的数据
|
2023-08-14 21:03:40 +08:00
|
|
|
|
List<TaxDeclareFailPO> taxDeclareFailPOPageInfo = getTaxDeclareFailService(user).listPageByTaxDeclareRecordIds(Collections.singleton(taxDeclareRecord.getId()));
|
2023-08-10 09:33:04 +08:00
|
|
|
|
// 转换成dto
|
2023-08-20 14:03:43 +08:00
|
|
|
|
List<FailEmployeeListDTO> failEmployeeListDTOS = getTaxDeclareFailService(user).convert2FailEmployeeList(taxDeclareRecord, taxDeclareFailPOPageInfo);
|
2023-08-21 10:30:13 +08:00
|
|
|
|
PageInfo<FailEmployeeListDTO> dtoPage = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(), failEmployeeListDTOS, FailEmployeeListDTO.class);
|
2023-08-10 09:33:04 +08:00
|
|
|
|
// 转成前端所需的格式
|
2023-08-11 14:20:14 +08:00
|
|
|
|
return dtoPage;
|
2023-08-10 09:33:04 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2023-08-11 14:20:14 +08:00
|
|
|
|
private PageInfo<AbnormalEmployeeListDTO> listEmployeePage(String key, AbnormalEmployeeListQueryParam queryParam) {
|
2023-08-10 09:33:04 +08:00
|
|
|
|
// 查询个税申报记录
|
2023-08-14 21:03:40 +08:00
|
|
|
|
TaxDeclareRecordPO taxDeclareRecord = getTaxDeclareRecordService(user).getById(queryParam.getTaxDeclareRecordId());
|
2023-08-10 09:33:04 +08:00
|
|
|
|
queryParam.setTaxAgentId(taxDeclareRecord.getTaxAgentId());
|
|
|
|
|
|
queryParam.setTaxCycle(taxDeclareRecord.getTaxCycle());
|
|
|
|
|
|
if (StringUtils.isEmpty(queryParam.getKeyword())) {
|
|
|
|
|
|
// 查询个税申报记录的人员
|
2023-08-11 14:20:14 +08:00
|
|
|
|
PageInfo<TaxDeclareEmployeePO> page = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(), TaxDeclareEmployeePO.class);
|
2023-08-10 09:33:04 +08:00
|
|
|
|
if (StringUtils.equals("NotDeclare", key)) {
|
2023-08-14 21:03:40 +08:00
|
|
|
|
page = getTaxDeclareEmployeeService(user).listPage4NotDeclareByParam(queryParam);
|
2023-08-10 09:33:04 +08:00
|
|
|
|
} else if (StringUtils.equals("NoValue", key)) {
|
2023-08-14 21:03:40 +08:00
|
|
|
|
page = getTaxDeclareEmployeeService(user).listPage4NoValueByParam(queryParam);
|
2023-08-10 09:33:04 +08:00
|
|
|
|
}
|
2023-08-11 14:20:14 +08:00
|
|
|
|
PageInfo<AbnormalEmployeeListDTO> dtoPage = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(), AbnormalEmployeeListDTO.class);
|
2023-08-14 21:03:40 +08:00
|
|
|
|
dtoPage.setList(getTaxDeclareEmployeeService(user).convert2AbnormalEmployeeList(taxDeclareRecord, page.getList()));
|
2023-08-20 14:03:43 +08:00
|
|
|
|
dtoPage.setTotal(page.getTotal());
|
2023-08-11 14:20:14 +08:00
|
|
|
|
return dtoPage;
|
2023-08-10 09:33:04 +08:00
|
|
|
|
} else {
|
|
|
|
|
|
// 查询条件中包含"keyword"时,不好通过SQL分页,所以在内存中分页
|
|
|
|
|
|
List<TaxDeclareEmployeePO> taxDeclareEmployees = Collections.emptyList();
|
|
|
|
|
|
if (StringUtils.equals("NotDeclare", key)) {
|
2023-08-14 21:03:40 +08:00
|
|
|
|
taxDeclareEmployees = getTaxDeclareEmployeeService(user).list4NotDeclareByParam(queryParam);
|
2023-08-10 09:33:04 +08:00
|
|
|
|
} else if (StringUtils.equals("NoValue", key)) {
|
2023-08-14 21:03:40 +08:00
|
|
|
|
taxDeclareEmployees = getTaxDeclareEmployeeService(user).list4NoValueByParam(queryParam);
|
2023-08-10 09:33:04 +08:00
|
|
|
|
}
|
2023-08-14 21:03:40 +08:00
|
|
|
|
List<AbnormalEmployeeListDTO> dtos = getTaxDeclareEmployeeService(user).convert2AbnormalEmployeeList(taxDeclareRecord, taxDeclareEmployees)
|
2023-08-10 09:33:04 +08:00
|
|
|
|
.stream()
|
|
|
|
|
|
.filter(e -> StringUtils.contains(e.getEmployeeName(), queryParam.getKeyword())
|
|
|
|
|
|
|| StringUtils.contains(e.getJobNum(), queryParam.getKeyword())
|
|
|
|
|
|
|| StringUtils.contains(e.getCardNum(), queryParam.getKeyword()))
|
|
|
|
|
|
.collect(Collectors.toList());
|
2023-08-11 14:20:14 +08:00
|
|
|
|
PageInfo<AbnormalEmployeeListDTO> dtoPage = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(), dtos, AbnormalEmployeeListDTO.class);
|
|
|
|
|
|
return dtoPage;
|
2023-08-10 09:33:04 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2023-08-14 20:29:19 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 获取个税申报记录的表单
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param id
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
public Map getForm(Long id) {
|
2023-08-11 14:20:14 +08:00
|
|
|
|
// TaxDeclareRecordFormDTO formDTO = new TaxDeclareRecordFormDTO();
|
|
|
|
|
|
// formDTO.setTaxAgentRange(TaxAgentRangeEnum.SELECT_TAX_AGENT);
|
|
|
|
|
|
// // 判断当前是否开启了分权
|
2023-08-14 21:03:40 +08:00
|
|
|
|
// Boolean openDevolution = getTaxAgentService(user).isOpenDevolution();
|
|
|
|
|
|
// Boolean isChief = getTaxAgentService(user).isChief((long)user.getUID());
|
2023-08-11 14:20:14 +08:00
|
|
|
|
// // 转换成前端所需的数据格式
|
|
|
|
|
|
// WeaForm weaForm = SalaryFormatUtil.<TaxDeclareRecordFormDTO>getInstance().buildForm(TaxDeclareRecordFormDTO.class, formDTO);
|
|
|
|
|
|
// weaForm.getItems().forEach((k, v) -> {
|
|
|
|
|
|
// if (StringUtils.equals("salaryMonth", k)) {
|
|
|
|
|
|
// Map<String, Object> otherParams = new HashMap<>();
|
|
|
|
|
|
// otherParams.put("type", "month");
|
|
|
|
|
|
// v.setOtherParams(otherParams);
|
|
|
|
|
|
// }
|
|
|
|
|
|
// // 未开启分权,没有"作为管理员的个税扣缴义务人"
|
|
|
|
|
|
// if (!openDevolution && StringUtils.equals("taxAgentRange", k)) {
|
|
|
|
|
|
// v.getOptions().remove(1);
|
|
|
|
|
|
// }
|
|
|
|
|
|
// // 开启分权,但不是总管理员,没有"所有个税扣缴义务人"
|
|
|
|
|
|
// if (openDevolution && !isChief && StringUtils.equals("taxAgentRange", k)) {
|
|
|
|
|
|
// v.getOptions().remove(0);
|
|
|
|
|
|
// }
|
|
|
|
|
|
// });
|
2023-08-14 20:29:19 +08:00
|
|
|
|
return new HashMap();
|
|
|
|
|
|
}
|
2023-08-10 09:33:04 +08:00
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 获取个税申报记录下的个税申报表TAB
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param id
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
2023-08-14 20:07:29 +08:00
|
|
|
|
public List<TaxDeclarationTabDTO> getTaxDeclarationTab(Long id) {
|
2023-08-10 09:33:04 +08:00
|
|
|
|
// 查询个税申报记录
|
2023-08-14 21:03:40 +08:00
|
|
|
|
TaxDeclareRecordPO taxDeclareRecord = getTaxDeclareRecordService(user).getById(id);
|
2023-08-10 09:33:04 +08:00
|
|
|
|
// 查询个税申报记录下的个税申报表
|
2023-08-14 21:03:40 +08:00
|
|
|
|
List<TaxDeclarationPO> taxDeclarations = getTaxDeclarationService(user).listByTaxCycleAndTaxAgentIds(SalaryDateUtil.localDate2YearMonth(taxDeclareRecord.getTaxCycle()),
|
2023-08-11 14:20:14 +08:00
|
|
|
|
Collections.singleton(taxDeclareRecord.getTaxAgentId()));
|
2023-08-20 14:03:43 +08:00
|
|
|
|
// taxDeclarations = taxDeclarations.stream()
|
|
|
|
|
|
// .filter(e -> Objects.equals(e.getControlView(), 0) || Objects.equals(e.getCreator(), (long)user.getUID()))
|
|
|
|
|
|
// .collect(Collectors.toList());
|
2023-08-10 09:33:04 +08:00
|
|
|
|
Map<Integer, TaxDeclarationPO> taxDeclarationMap = SalaryEntityUtil.convert2Map(taxDeclarations, TaxDeclarationPO::getIncomeCategory);
|
|
|
|
|
|
List<TaxDeclarationTabDTO> tabs = Lists.newArrayList();
|
|
|
|
|
|
for (IncomeCategoryEnum incomeCategoryEnum : IncomeCategoryEnum.values()) {
|
|
|
|
|
|
TaxDeclarationPO taxDeclaration = taxDeclarationMap.get(incomeCategoryEnum.getValue());
|
|
|
|
|
|
if (taxDeclaration != null) {
|
|
|
|
|
|
TaxDeclarationTabDTO taxDeclarationTabDTO = new TaxDeclarationTabDTO()
|
|
|
|
|
|
.setTabName(SalaryI18nUtil.getI18nLabel(incomeCategoryEnum.getLabelId(), incomeCategoryEnum.getDefaultLabel()))
|
|
|
|
|
|
.setIncomeCategory(incomeCategoryEnum)
|
|
|
|
|
|
.setTaxDeclarationId(taxDeclaration.getId());
|
|
|
|
|
|
tabs.add(taxDeclarationTabDTO);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
return tabs;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2023-12-29 17:24:52 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 新增申报表
|
2024-01-09 10:53:59 +08:00
|
|
|
|
*
|
2023-12-29 17:24:52 +08:00
|
|
|
|
* @param param
|
|
|
|
|
|
*/
|
|
|
|
|
|
public void addTaxDeclaration(TaxDeclarationAddParam param) {
|
|
|
|
|
|
getTaxDeclarationService(user).addTaxDeclaration(param);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void deleteTaxDeclaration(TaxDeclarationDeleteParam param) {
|
|
|
|
|
|
getTaxDeclarationService(user).deleteTaxDeclaration(param);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2023-08-10 09:33:04 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 查询个税申报表的基本信息
|
|
|
|
|
|
*
|
2023-08-20 14:03:43 +08:00
|
|
|
|
* @param id 个税申报表id
|
2023-08-10 09:33:04 +08:00
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
2023-08-11 14:20:14 +08:00
|
|
|
|
public TaxDeclarationInfoDTO getTaxDeclarationInfoById(Long id) {
|
2023-08-10 09:33:04 +08:00
|
|
|
|
// 查询个税申报表
|
2023-08-14 21:03:40 +08:00
|
|
|
|
TaxDeclareRecordPO taxDeclareRecord = getTaxDeclareRecordService(user).getById(id);
|
2023-08-10 09:33:04 +08:00
|
|
|
|
if (Objects.isNull(taxDeclareRecord)) {
|
|
|
|
|
|
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(98877, "个税申报表不存在或已删除"));
|
|
|
|
|
|
}
|
|
|
|
|
|
AbnormalEmployeeListQueryParam queryParam = new AbnormalEmployeeListQueryParam()
|
|
|
|
|
|
.setTaxDeclareRecordId(taxDeclareRecord.getId())
|
|
|
|
|
|
.setTaxAgentId(taxDeclareRecord.getTaxAgentId())
|
|
|
|
|
|
.setTaxCycle(taxDeclareRecord.getTaxCycle());
|
|
|
|
|
|
// 查询是否存在有未报送的人
|
2023-08-14 21:03:40 +08:00
|
|
|
|
List<TaxDeclareEmployeePO> notDeclareTaxDeclareEmployees = getTaxDeclareEmployeeService(user).list4NotDeclareByParam(queryParam);
|
2023-08-10 09:33:04 +08:00
|
|
|
|
// 查询是否存在没有申报数据的人
|
2023-08-14 21:03:40 +08:00
|
|
|
|
List<TaxDeclareEmployeePO> noValueTaxDeclareEmployees = getTaxDeclareEmployeeService(user).list4NoValueByParam(queryParam);
|
2023-08-10 09:33:04 +08:00
|
|
|
|
// 查询是否存在申报失败的人
|
2023-08-14 21:03:40 +08:00
|
|
|
|
List<TaxDeclareFailPO> taxDeclareFails = getTaxDeclareFailService(user).listByTaxDeclareRecordIds(Collections.singleton(taxDeclareRecord.getId()));
|
2023-08-10 09:33:04 +08:00
|
|
|
|
// 查询个税扣缴义务人
|
2023-08-14 21:03:40 +08:00
|
|
|
|
TaxAgentPO taxAgentPO = getTaxAgentService(user).getById(taxDeclareRecord.getTaxAgentId());
|
2023-08-10 09:33:04 +08:00
|
|
|
|
TaxDeclareTypeEnum taxDeclareTypeEnum = SalaryEnumUtil.enumMatchByValue(taxDeclareRecord.getTaxDeclareType(), TaxDeclareTypeEnum.class);
|
|
|
|
|
|
TaxDeclareStatusEnum taxDeclareStatusEnum = SalaryEnumUtil.enumMatchByValue(taxDeclareRecord.getTaxDeclareStatus(), TaxDeclareStatusEnum.class);
|
2023-08-11 14:20:14 +08:00
|
|
|
|
return TaxDeclarationInfoDTO.builder()
|
|
|
|
|
|
.salaryMonth(taxDeclareRecord.getSalaryMonth())
|
|
|
|
|
|
.taxCycle(taxDeclareRecord.getTaxCycle())
|
|
|
|
|
|
.taxAgentId(taxDeclareRecord.getTaxAgentId())
|
|
|
|
|
|
.taxAgentName(Optional.ofNullable(taxAgentPO).map(TaxAgentPO::getName).orElse(""))
|
|
|
|
|
|
.declareType(taxDeclareTypeEnum)
|
|
|
|
|
|
.declareTypeDesc(taxDeclareTypeEnum == null ? "" : SalaryI18nUtil.getI18nLabel(taxDeclareTypeEnum.getLabelId(), taxDeclareTypeEnum.getDefaultLabel()))
|
|
|
|
|
|
.declareStatus(taxDeclareStatusEnum)
|
|
|
|
|
|
.declareStatusDesc(taxDeclareStatusEnum == null ? "" : SalaryI18nUtil.getI18nLabel(taxDeclareStatusEnum.getLabelId(), taxDeclareStatusEnum.getDefaultLabel()))
|
|
|
|
|
|
.declareErrorMsg(taxDeclareRecord.getTaxDeclareErrorMsg())
|
|
|
|
|
|
.displayIcon(Objects.equals(taxDeclareRecord.getDisplayUpdateIcon(), 1))
|
|
|
|
|
|
.declareFailSize(taxDeclareFails.size())
|
|
|
|
|
|
.abnormalSize(notDeclareTaxDeclareEmployees.size() + noValueTaxDeclareEmployees.size())
|
|
|
|
|
|
.taxPaidAmount(SalaryEntityUtil.thousandthConvert(taxDeclareRecord.getTaxPaidAmount()))
|
|
|
|
|
|
.build();
|
2023-08-10 09:33:04 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 保存
|
|
|
|
|
|
*
|
2023-08-11 14:20:14 +08:00
|
|
|
|
* @param saveParam 保存参数
|
2023-08-10 09:33:04 +08:00
|
|
|
|
*/
|
2023-08-11 14:20:14 +08:00
|
|
|
|
public String save(TaxDeclarationSaveParam saveParam) {
|
2023-08-10 09:33:04 +08:00
|
|
|
|
TaxDeclarationRateDTO taxDeclarationRate = new TaxDeclarationRateDTO().setStatus(true)
|
|
|
|
|
|
.setIndex(Util.null2String(IdGenerator.generate()))
|
2023-08-11 14:20:14 +08:00
|
|
|
|
.setMsg(SalaryI18nUtil.getI18nLabel(95836, "生成申报表"));
|
2023-08-14 21:03:40 +08:00
|
|
|
|
getSalaryCacheService(user).set(SalaryCacheKey.TAX_DECLARATION + taxDeclarationRate.getIndex(), taxDeclarationRate);
|
2023-08-10 09:33:04 +08:00
|
|
|
|
LocalRunnable localRunnable = new LocalRunnable() {
|
|
|
|
|
|
@Override
|
|
|
|
|
|
public void execute() {
|
|
|
|
|
|
try {
|
2023-08-14 21:03:40 +08:00
|
|
|
|
getTaxDeclareRecordService(user).save(saveParam);
|
2023-08-10 09:33:04 +08:00
|
|
|
|
taxDeclarationRate.setStatus(true).setFinish(true);
|
|
|
|
|
|
} catch (SalaryRunTimeException e) {
|
|
|
|
|
|
taxDeclarationRate.setStatus(false).setFinish(true).setMsg(e.getMessage());
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
|
log.error("个税申报表生成报错:{}", e.getMessage(), e);
|
2023-08-11 14:20:14 +08:00
|
|
|
|
taxDeclarationRate.setStatus(false).setFinish(true).setMsg(SalaryI18nUtil.getI18nLabel(187276, "个税申报表生成报错:") + e.getMessage());
|
2023-08-10 09:33:04 +08:00
|
|
|
|
} finally {
|
2023-08-14 21:03:40 +08:00
|
|
|
|
getSalaryCacheService(user).set(SalaryCacheKey.TAX_DECLARATION + taxDeclarationRate.getIndex(), taxDeclarationRate);
|
2023-08-10 09:33:04 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
};
|
|
|
|
|
|
ThreadPoolUtil.fixedPoolExecute(ModulePoolEnum.OTHER, "saveTaxDeclaration", localRunnable);
|
|
|
|
|
|
return taxDeclarationRate.getIndex();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 更新个税申报表的待刷新数据的标识
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param id
|
|
|
|
|
|
*/
|
2023-08-11 14:20:14 +08:00
|
|
|
|
public void updateIcon(Long id) {
|
2023-08-14 21:03:40 +08:00
|
|
|
|
getTaxDeclareRecordService(user).updateIcon(id, NumberUtils.INTEGER_ZERO);
|
2023-08-10 09:33:04 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 删除个税申报表
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param ids
|
|
|
|
|
|
*/
|
2023-08-11 14:20:14 +08:00
|
|
|
|
public void delete(Collection<Long> ids) {
|
2023-08-14 21:03:40 +08:00
|
|
|
|
getTaxDeclareRecordService(user).deleteByIds(ids);
|
2023-08-10 09:33:04 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 获取个税申报表是否已经生成
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param index
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
2023-08-11 14:20:14 +08:00
|
|
|
|
public TaxDeclarationRateDTO getRate(String index) {
|
2023-08-14 21:03:40 +08:00
|
|
|
|
return getSalaryCacheService(user).get(SalaryCacheKey.TAX_DECLARATION + index);
|
2023-08-10 09:33:04 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 申报
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param id
|
|
|
|
|
|
*/
|
2023-08-11 14:20:14 +08:00
|
|
|
|
public String declare(Long id) {
|
2023-08-10 09:33:04 +08:00
|
|
|
|
checkBefore(id);
|
|
|
|
|
|
TaxDeclarationRateDTO taxDeclarationRate = new TaxDeclarationRateDTO().setStatus(true).setIndex(Util.null2String(id))
|
2023-08-11 14:20:14 +08:00
|
|
|
|
.setMsg(SalaryI18nUtil.getI18nLabel(156454, "在线申报"));
|
2023-08-14 21:03:40 +08:00
|
|
|
|
getSalaryCacheService(user).set(SalaryCacheKey.TAX_DECLARATION + taxDeclarationRate.getIndex(), taxDeclarationRate);
|
2023-08-10 09:33:04 +08:00
|
|
|
|
LocalRunnable localRunnable = new LocalRunnable() {
|
|
|
|
|
|
@Override
|
|
|
|
|
|
public void execute() {
|
|
|
|
|
|
try {
|
2023-08-14 21:03:40 +08:00
|
|
|
|
getTaxDeclareRecordService(user).declare(id);
|
2023-08-10 09:33:04 +08:00
|
|
|
|
taxDeclarationRate.setFinish(true);
|
2023-08-11 14:20:14 +08:00
|
|
|
|
} catch (SalaryRunTimeException e) {
|
2023-08-10 09:33:04 +08:00
|
|
|
|
taxDeclarationRate.setStatus(false).setFinish(true).setMsg(e.getMessage());
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
|
log.error("在线申报失败:{}", e.getMessage(), e);
|
2023-08-11 14:20:14 +08:00
|
|
|
|
taxDeclarationRate.setStatus(false).setFinish(true).setMsg(SalaryI18nUtil.getI18nLabel(187274, "在线申报失败:") + e.getMessage());
|
2023-08-10 09:33:04 +08:00
|
|
|
|
} finally {
|
2023-08-14 21:03:40 +08:00
|
|
|
|
getSalaryCacheService(user).set(SalaryCacheKey.TAX_DECLARATION + taxDeclarationRate.getIndex(), taxDeclarationRate);
|
2023-08-10 09:33:04 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
};
|
|
|
|
|
|
ThreadPoolUtil.fixedPoolExecute(ModulePoolEnum.OTHER, "declare", localRunnable);
|
|
|
|
|
|
return taxDeclarationRate.getIndex();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 获取申报反馈
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param id
|
|
|
|
|
|
*/
|
2023-08-14 20:07:29 +08:00
|
|
|
|
public String getDeclareFeedback(Long id) {
|
2023-08-10 09:33:04 +08:00
|
|
|
|
checkBefore(id);
|
|
|
|
|
|
TaxDeclarationRateDTO taxDeclarationRate = new TaxDeclarationRateDTO().setStatus(true).setIndex(Util.null2String(id))
|
2023-08-11 14:20:14 +08:00
|
|
|
|
.setMsg(SalaryI18nUtil.getI18nLabel(182680, "获取申报反馈"));
|
2023-08-14 21:03:40 +08:00
|
|
|
|
getSalaryCacheService(user).set(SalaryCacheKey.TAX_DECLARATION + taxDeclarationRate.getIndex(), taxDeclarationRate);
|
2023-08-10 09:33:04 +08:00
|
|
|
|
LocalRunnable localRunnable = new LocalRunnable() {
|
|
|
|
|
|
@Override
|
|
|
|
|
|
public void execute() {
|
|
|
|
|
|
try {
|
2023-08-14 21:03:40 +08:00
|
|
|
|
getTaxDeclareRecordService(user).getDeclareFeedback(id, taxDeclarationRate);
|
2023-08-10 09:33:04 +08:00
|
|
|
|
taxDeclarationRate.setFinish(true);
|
2023-08-11 14:20:14 +08:00
|
|
|
|
} catch (SalaryRunTimeException e) {
|
2023-08-10 09:33:04 +08:00
|
|
|
|
taxDeclarationRate.setStatus(false).setFinish(true).setMsg(e.getMessage());
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
|
log.error("获取申报反馈失败:{}", e.getMessage(), e);
|
2023-08-11 14:20:14 +08:00
|
|
|
|
taxDeclarationRate.setStatus(false).setFinish(true).setMsg(SalaryI18nUtil.getI18nLabel(187255, "获取申报反馈失败:") + e.getMessage());
|
2023-08-10 09:33:04 +08:00
|
|
|
|
} finally {
|
2023-08-14 21:03:40 +08:00
|
|
|
|
getSalaryCacheService(user).set(SalaryCacheKey.TAX_DECLARATION + taxDeclarationRate.getIndex(), taxDeclarationRate);
|
2023-08-10 09:33:04 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
};
|
|
|
|
|
|
ThreadPoolUtil.fixedPoolExecute(ModulePoolEnum.OTHER, "getDeclareFeedback", localRunnable);
|
|
|
|
|
|
return taxDeclarationRate.getIndex();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2023-12-05 14:58:02 +08:00
|
|
|
|
|
|
|
|
|
|
public Object getDeclareTaxResultFeedback(Long id) {
|
2023-12-14 10:35:10 +08:00
|
|
|
|
return getTaxDeclareRecordService(user).getDeclareTaxResultFeedback(id);
|
2023-12-05 14:58:02 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2023-12-08 18:15:56 +08:00
|
|
|
|
|
2023-12-28 14:09:34 +08:00
|
|
|
|
public XSSFWorkbook exportGetDeclareTaxResultFeedback(DeclareTaxResultFeedbackQueryParam param) {
|
|
|
|
|
|
return getTaxDeclareRecordService(user).exportGetDeclareTaxResultFeedback(param);
|
2023-12-08 18:15:56 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2023-08-10 09:33:04 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 作废
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param id
|
|
|
|
|
|
*/
|
2023-08-14 20:07:29 +08:00
|
|
|
|
public String cancelDeclare(Long id) {
|
2023-08-10 09:33:04 +08:00
|
|
|
|
checkBefore(id);
|
|
|
|
|
|
TaxDeclarationRateDTO taxDeclarationRate = new TaxDeclarationRateDTO().setStatus(true).setIndex(Util.null2String(id))
|
2023-08-11 14:20:14 +08:00
|
|
|
|
.setMsg(SalaryI18nUtil.getI18nLabel(158842, "作废申报"));
|
2023-08-14 21:03:40 +08:00
|
|
|
|
getSalaryCacheService(user).set(SalaryCacheKey.TAX_DECLARATION + taxDeclarationRate.getIndex(), taxDeclarationRate);
|
2023-08-10 09:33:04 +08:00
|
|
|
|
LocalRunnable localRunnable = new LocalRunnable() {
|
|
|
|
|
|
@Override
|
|
|
|
|
|
public void execute() {
|
|
|
|
|
|
try {
|
2023-08-14 21:03:40 +08:00
|
|
|
|
getTaxDeclareRecordService(user).cancelDeclare(id);
|
2023-08-10 09:33:04 +08:00
|
|
|
|
taxDeclarationRate.setFinish(true);
|
2023-08-11 14:20:14 +08:00
|
|
|
|
} catch (SalaryRunTimeException e) {
|
2023-08-10 09:33:04 +08:00
|
|
|
|
taxDeclarationRate.setStatus(false).setFinish(true).setMsg(e.getMessage());
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
|
log.error("作废申报失败:{}", e.getMessage(), e);
|
2023-08-11 14:20:14 +08:00
|
|
|
|
taxDeclarationRate.setStatus(false).setFinish(true).setMsg(SalaryI18nUtil.getI18nLabel(187272, "作废申报失败:") + e.getMessage());
|
2023-08-10 09:33:04 +08:00
|
|
|
|
} finally {
|
2023-08-14 21:03:40 +08:00
|
|
|
|
getSalaryCacheService(user).set(SalaryCacheKey.TAX_DECLARATION + taxDeclarationRate.getIndex(), taxDeclarationRate);
|
2023-08-10 09:33:04 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
};
|
|
|
|
|
|
ThreadPoolUtil.fixedPoolExecute(ModulePoolEnum.OTHER, "cancel", localRunnable);
|
|
|
|
|
|
return taxDeclarationRate.getIndex();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 获取作废反馈
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param id
|
|
|
|
|
|
*/
|
2023-08-14 20:07:29 +08:00
|
|
|
|
public String getCancelFeedback(Long id) {
|
2023-08-10 09:33:04 +08:00
|
|
|
|
checkBefore(id);
|
|
|
|
|
|
TaxDeclarationRateDTO taxDeclarationRate = new TaxDeclarationRateDTO().setStatus(true).setIndex(Util.null2String(id))
|
2023-08-11 14:20:14 +08:00
|
|
|
|
.setMsg(SalaryI18nUtil.getI18nLabel(182681, "获取作废申报反馈"));
|
2023-08-14 21:03:40 +08:00
|
|
|
|
getSalaryCacheService(user).set(SalaryCacheKey.TAX_DECLARATION + taxDeclarationRate.getIndex(), taxDeclarationRate);
|
2023-08-10 09:33:04 +08:00
|
|
|
|
LocalRunnable localRunnable = new LocalRunnable() {
|
|
|
|
|
|
@Override
|
|
|
|
|
|
public void execute() {
|
|
|
|
|
|
try {
|
2023-08-14 21:03:40 +08:00
|
|
|
|
getTaxDeclareRecordService(user).getCancelFeedback(id, taxDeclarationRate);
|
2023-08-10 09:33:04 +08:00
|
|
|
|
taxDeclarationRate.setFinish(true);
|
2023-08-11 14:20:14 +08:00
|
|
|
|
} catch (SalaryRunTimeException e) {
|
2023-08-10 09:33:04 +08:00
|
|
|
|
taxDeclarationRate.setStatus(false).setFinish(true).setMsg(e.getMessage());
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
|
log.error("获取作废反馈结果失败:{}", e.getMessage(), e);
|
2023-08-11 14:20:14 +08:00
|
|
|
|
taxDeclarationRate.setStatus(false).setFinish(true).setMsg(SalaryI18nUtil.getI18nLabel(187270, "获取作废反馈结果失败:") + e.getMessage());
|
2023-08-10 09:33:04 +08:00
|
|
|
|
} finally {
|
2023-08-14 21:03:40 +08:00
|
|
|
|
getSalaryCacheService(user).set(SalaryCacheKey.TAX_DECLARATION + taxDeclarationRate.getIndex(), taxDeclarationRate);
|
2023-08-10 09:33:04 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
};
|
|
|
|
|
|
ThreadPoolUtil.fixedPoolExecute(ModulePoolEnum.OTHER, "getCancelFeedback", localRunnable);
|
|
|
|
|
|
return taxDeclarationRate.getIndex();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 更正申报
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param id
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
2023-08-14 20:07:29 +08:00
|
|
|
|
public String updateDeclare(Long id) {
|
2023-08-10 09:33:04 +08:00
|
|
|
|
checkBefore(id);
|
|
|
|
|
|
TaxDeclarationRateDTO taxDeclarationRate = new TaxDeclarationRateDTO().setStatus(true).setIndex(Util.null2String(id))
|
2023-08-11 14:20:14 +08:00
|
|
|
|
.setMsg(SalaryI18nUtil.getI18nLabel(177637, "更正申报"));
|
2023-08-14 21:03:40 +08:00
|
|
|
|
getSalaryCacheService(user).set(SalaryCacheKey.TAX_DECLARATION + taxDeclarationRate.getIndex(), taxDeclarationRate);
|
2023-08-10 09:33:04 +08:00
|
|
|
|
LocalRunnable localRunnable = new LocalRunnable() {
|
|
|
|
|
|
@Override
|
|
|
|
|
|
public void execute() {
|
|
|
|
|
|
try {
|
2023-08-14 21:03:40 +08:00
|
|
|
|
getTaxDeclareRecordService(user).updateDeclare(id);
|
2023-08-10 09:33:04 +08:00
|
|
|
|
taxDeclarationRate.setFinish(true);
|
2023-08-11 14:20:14 +08:00
|
|
|
|
} catch (SalaryRunTimeException e) {
|
2023-08-10 09:33:04 +08:00
|
|
|
|
taxDeclarationRate.setStatus(false).setFinish(true).setMsg(e.getMessage());
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
|
log.error("更正申报失败:{}", e.getMessage(), e);
|
2023-08-11 14:20:14 +08:00
|
|
|
|
taxDeclarationRate.setStatus(false).setFinish(true).setMsg(SalaryI18nUtil.getI18nLabel(187269, "更正申报失败:") + e.getMessage());
|
2023-08-10 09:33:04 +08:00
|
|
|
|
} finally {
|
2023-08-14 21:03:40 +08:00
|
|
|
|
getSalaryCacheService(user).set(SalaryCacheKey.TAX_DECLARATION + taxDeclarationRate.getIndex(), taxDeclarationRate);
|
2023-08-10 09:33:04 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
};
|
|
|
|
|
|
ThreadPoolUtil.fixedPoolExecute(ModulePoolEnum.OTHER, "updateDeclare", localRunnable);
|
|
|
|
|
|
return taxDeclarationRate.getIndex();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-01-03 10:40:55 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 撤销更正申报
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param id
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
public String cancelCorrect(Long id) {
|
|
|
|
|
|
checkBefore(id);
|
|
|
|
|
|
TaxDeclarationRateDTO taxDeclarationRate = new TaxDeclarationRateDTO().setStatus(true).setIndex(Util.null2String(id))
|
|
|
|
|
|
.setMsg(SalaryI18nUtil.getI18nLabel(177637, "撤销更正申报"));
|
|
|
|
|
|
getSalaryCacheService(user).set(SalaryCacheKey.TAX_DECLARATION + taxDeclarationRate.getIndex(), taxDeclarationRate);
|
|
|
|
|
|
LocalRunnable localRunnable = new LocalRunnable() {
|
|
|
|
|
|
@Override
|
|
|
|
|
|
public void execute() {
|
|
|
|
|
|
try {
|
|
|
|
|
|
getTaxDeclareRecordService(user).cancelCorrect(id);
|
|
|
|
|
|
taxDeclarationRate.setFinish(true);
|
|
|
|
|
|
} catch (SalaryRunTimeException e) {
|
|
|
|
|
|
taxDeclarationRate.setStatus(false).setFinish(true).setMsg(e.getMessage());
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
|
log.error("撤销更正申报失败:{}", e.getMessage(), e);
|
|
|
|
|
|
taxDeclarationRate.setStatus(false).setFinish(true).setMsg(SalaryI18nUtil.getI18nLabel(187269, "撤销更正申报失败:") + e.getMessage());
|
|
|
|
|
|
} finally {
|
|
|
|
|
|
getSalaryCacheService(user).set(SalaryCacheKey.TAX_DECLARATION + taxDeclarationRate.getIndex(), taxDeclarationRate);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
};
|
|
|
|
|
|
ThreadPoolUtil.fixedPoolExecute(ModulePoolEnum.OTHER, "cancelCorrect", localRunnable);
|
|
|
|
|
|
return taxDeclarationRate.getIndex();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2023-08-10 09:33:04 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 税局端申报状态查询
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param id
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
2023-08-11 14:20:14 +08:00
|
|
|
|
public String queryDeclareStatus(Long id) {
|
2023-08-14 21:03:40 +08:00
|
|
|
|
return getTaxDeclareRecordService(user).queryDeclareStatus(id);
|
2023-08-10 09:33:04 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 税局端申报明细查询
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param id
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
2023-08-11 14:20:14 +08:00
|
|
|
|
public String queryCompanyIncomes(Long id) {
|
2023-08-14 21:03:40 +08:00
|
|
|
|
return getTaxDeclareRecordService(user).queryCompanyIncomes(id);
|
2023-08-10 09:33:04 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2024-01-08 09:52:04 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 对比算税结果
|
2024-01-09 10:53:59 +08:00
|
|
|
|
*
|
2024-01-08 09:52:04 +08:00
|
|
|
|
* @param id
|
|
|
|
|
|
*/
|
2024-01-09 10:53:59 +08:00
|
|
|
|
public Map<String, Object> contrast(Long id) {
|
|
|
|
|
|
return getTaxDeclarationValueService(user).contrast(id);
|
2024-01-04 15:35:23 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2023-08-10 09:33:04 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 刷新数据
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param id
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
2023-08-11 14:20:14 +08:00
|
|
|
|
public String refreshData(Long id) {
|
2023-08-10 09:33:04 +08:00
|
|
|
|
checkBefore(id);
|
|
|
|
|
|
TaxDeclarationRateDTO taxDeclarationRate = new TaxDeclarationRateDTO().setStatus(true).setIndex(Util.null2String(id))
|
2023-08-11 14:20:14 +08:00
|
|
|
|
.setMsg(SalaryI18nUtil.getI18nLabel(156447, "刷新数据"));
|
2023-08-14 21:03:40 +08:00
|
|
|
|
getSalaryCacheService(user).set(SalaryCacheKey.TAX_DECLARATION + taxDeclarationRate.getIndex(), taxDeclarationRate);
|
2023-08-10 09:33:04 +08:00
|
|
|
|
LocalRunnable localRunnable = new LocalRunnable() {
|
|
|
|
|
|
@Override
|
|
|
|
|
|
public void execute() {
|
|
|
|
|
|
try {
|
2023-08-14 21:03:40 +08:00
|
|
|
|
getTaxDeclareRecordService(user).refreshData(id);
|
2023-08-10 09:33:04 +08:00
|
|
|
|
taxDeclarationRate.setFinish(true);
|
2023-08-11 14:20:14 +08:00
|
|
|
|
} catch (SalaryRunTimeException e) {
|
2023-08-10 09:33:04 +08:00
|
|
|
|
taxDeclarationRate.setStatus(false).setFinish(true).setMsg(e.getMessage());
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
|
log.error("刷新数据失败:{}", e.getMessage(), e);
|
2023-08-11 14:20:14 +08:00
|
|
|
|
taxDeclarationRate.setStatus(false).setFinish(true).setMsg(SalaryI18nUtil.getI18nLabel(187268, "刷新数据失败:") + e.getMessage());
|
2023-08-10 09:33:04 +08:00
|
|
|
|
} finally {
|
2023-08-14 21:03:40 +08:00
|
|
|
|
getSalaryCacheService(user).set(SalaryCacheKey.TAX_DECLARATION + taxDeclarationRate.getIndex(), taxDeclarationRate);
|
2023-08-10 09:33:04 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
};
|
|
|
|
|
|
ThreadPoolUtil.fixedPoolExecute(ModulePoolEnum.OTHER, "refreshData", localRunnable);
|
|
|
|
|
|
return taxDeclarationRate.getIndex();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void checkBefore(Long id) {
|
2023-08-14 21:03:40 +08:00
|
|
|
|
TaxDeclarationRateDTO taxDeclarationRate = getSalaryCacheService(user).get(SalaryCacheKey.TAX_DECLARATION + Util.null2String(id));
|
2023-08-10 09:33:04 +08:00
|
|
|
|
if (taxDeclarationRate != null && !taxDeclarationRate.isFinish()) {
|
|
|
|
|
|
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(182691, "当前正处于「{0}」中,请稍后再试").replace("{0}", taxDeclarationRate.getMsg()));
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2023-08-23 18:13:31 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 导出个税申报明细列表
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param queryParam
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
public XSSFWorkbook exportTaxDeclarationValue(TaxDeclarationValueListQueryParam queryParam) {
|
|
|
|
|
|
return getTaxDeclarationExcelService(user).exportTaxDeclarationValue(queryParam);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 导出未报送的人员列表
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param queryParam
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
public XSSFWorkbook exportEmployee4NotDeclare(AbnormalEmployeeListQueryParam queryParam) {
|
|
|
|
|
|
return getTaxDeclarationExcelService(user).exportEmployee4NotDeclare(queryParam);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 导出没有申报数据的人员列表
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param queryParam
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
public XSSFWorkbook exportEmployee4NoValue(AbnormalEmployeeListQueryParam queryParam) {
|
|
|
|
|
|
return getTaxDeclarationExcelService(user).exportEmployee4NoValue(queryParam);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 导出申报失败的人员列表
|
|
|
|
|
|
*
|
|
|
|
|
|
* @param queryParam
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
|
|
|
|
|
public XSSFWorkbook exportEmployee4Fail(AbnormalEmployeeListQueryParam queryParam) {
|
|
|
|
|
|
return getTaxDeclarationExcelService(user).exportEmployee4Fail(queryParam);
|
|
|
|
|
|
}
|
2023-12-08 18:15:56 +08:00
|
|
|
|
|
2024-01-04 15:35:23 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 新增表单
|
2024-01-09 10:53:59 +08:00
|
|
|
|
*
|
2024-01-04 15:35:23 +08:00
|
|
|
|
* @param param
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
2023-12-14 17:55:48 +08:00
|
|
|
|
public TaxDeclareRecordDetailFormDTO getAddForm(TaxDeclareRecordDetailFormParam param) {
|
|
|
|
|
|
TaxDeclarationPO taxDeclaration = getTaxDeclarationService(user).getById(param.getTaxDeclarationId());
|
2023-12-27 14:26:25 +08:00
|
|
|
|
|
|
|
|
|
|
if (taxDeclaration == null) {
|
|
|
|
|
|
throw new SalaryRunTimeException("申报表不存在!");
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2023-12-14 10:35:10 +08:00
|
|
|
|
// 查询个税申报表列
|
2024-01-09 10:53:59 +08:00
|
|
|
|
List<TaxReportColumnPO> taxReportColumns = getTaxReportColumnService(user).listByIncomeCategory(IncomeCategoryEnum.parseByValue(taxDeclaration.getIncomeCategory()), 0);
|
2023-12-14 17:55:48 +08:00
|
|
|
|
//当前税款所属期报送成功且状态正常的人员
|
|
|
|
|
|
List<EmployeeDeclarePO> employeeDeclarePOS = getEmployeeDeclareService(user).listByParam(
|
|
|
|
|
|
EmployeeDeclareListQueryParam
|
|
|
|
|
|
.builder()
|
|
|
|
|
|
.taxCycle(taxDeclaration.getTaxCycle())
|
|
|
|
|
|
.taxAgentId(taxDeclaration.getTaxAgentId())
|
|
|
|
|
|
.declareStatus(DeclareStatusEnum.DECLARE_SUCCESS)
|
|
|
|
|
|
.employmentStatus(EmploymentStatusEnum.NORMAL)
|
|
|
|
|
|
.build()
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
//过滤申报表中已存在的人员
|
|
|
|
|
|
List<TaxDeclarationValuePO> taxDeclarationValuePOS = getTaxDeclarationValueService(user).listByTaxDeclarationIds(Collections.singletonList(param.getTaxDeclarationId()));
|
|
|
|
|
|
Set<Long> empIds = SalaryEntityUtil.properties(taxDeclarationValuePOS, TaxDeclarationValuePO::getEmployeeId);
|
|
|
|
|
|
|
|
|
|
|
|
employeeDeclarePOS = employeeDeclarePOS.stream().filter(emp -> !empIds.contains(emp.getEmployeeId())).collect(Collectors.toList());
|
|
|
|
|
|
|
|
|
|
|
|
return TaxDeclareRecordDetailFormDTO.builder()
|
|
|
|
|
|
.taxReportColumns(TaxDeclarationDetailBO.convert2ListTaxReportColumn(taxReportColumns))
|
|
|
|
|
|
.employeeDeclares(employeeDeclarePOS)
|
|
|
|
|
|
.taxDeclarationId(taxDeclaration.getTaxAgentId())
|
|
|
|
|
|
.build();
|
2023-12-14 10:35:10 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2023-12-14 17:55:48 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 新增
|
2023-12-27 14:26:25 +08:00
|
|
|
|
*
|
2023-12-14 17:55:48 +08:00
|
|
|
|
* @param param
|
|
|
|
|
|
*/
|
2023-12-14 10:35:10 +08:00
|
|
|
|
public void add(TaxDeclareRecordDetailSaveParam param) {
|
2023-12-14 17:55:48 +08:00
|
|
|
|
getTaxDeclarationValueService(user).save(param);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 编辑
|
2023-12-27 14:26:25 +08:00
|
|
|
|
*
|
2023-12-14 17:55:48 +08:00
|
|
|
|
* @param param
|
|
|
|
|
|
*/
|
|
|
|
|
|
public void edit(TaxDeclareRecordDetailSaveParam param) {
|
|
|
|
|
|
getTaxDeclarationValueService(user).edit(param);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-01-04 15:35:23 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* 详细信息
|
2024-01-09 10:53:59 +08:00
|
|
|
|
*
|
2024-01-04 15:35:23 +08:00
|
|
|
|
* @param id
|
|
|
|
|
|
* @return
|
|
|
|
|
|
*/
|
2023-12-14 17:55:48 +08:00
|
|
|
|
public TaxDeclareRecordDetailFormDTO detailInfo(Long id) {
|
|
|
|
|
|
TaxDeclarationValuePO declarationValuePO = getTaxDeclarationValueService(user).getById(id);
|
|
|
|
|
|
TaxDeclarationPO taxDeclarationPO = getTaxDeclarationService(user).getById(declarationValuePO.getTaxDeclarationId());
|
2023-12-14 10:35:10 +08:00
|
|
|
|
|
2023-12-14 17:55:48 +08:00
|
|
|
|
List<EmployeeDeclarePO> employeeDeclarePOS = getEmployeeDeclareService(user).listByParam(
|
|
|
|
|
|
EmployeeDeclareListQueryParam
|
|
|
|
|
|
.builder()
|
|
|
|
|
|
.taxCycle(taxDeclarationPO.getTaxCycle())
|
|
|
|
|
|
.taxAgentId(taxDeclarationPO.getTaxAgentId())
|
|
|
|
|
|
.employeeId(declarationValuePO.getEmployeeId())
|
|
|
|
|
|
.build()
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
if (CollectionUtils.isEmpty(employeeDeclarePOS)) {
|
|
|
|
|
|
throw new SalaryRunTimeException("当前人员未报送!");
|
|
|
|
|
|
}
|
|
|
|
|
|
EmployeeDeclarePO employeeDeclarePO = employeeDeclarePOS.get(0);
|
|
|
|
|
|
// 查询个税申报表列
|
2024-01-09 10:53:59 +08:00
|
|
|
|
List<TaxReportColumnPO> taxReportColumns = getTaxReportColumnService(user).listByIncomeCategory(IncomeCategoryEnum.parseByValue(taxDeclarationPO.getIncomeCategory()), 0);
|
2023-12-28 09:39:09 +08:00
|
|
|
|
return TaxDeclareRecordDetailFormDTO
|
|
|
|
|
|
.builder()
|
|
|
|
|
|
.id(id)
|
|
|
|
|
|
.employeeId(employeeDeclarePO.getEmployeeId())
|
|
|
|
|
|
.employeeType(employeeDeclarePO.getEmployeeType())
|
|
|
|
|
|
.taxDeclarationId(taxDeclarationPO.getId())
|
2023-12-14 17:55:48 +08:00
|
|
|
|
.incomeCategory(IncomeCategoryEnum.parseByValue(taxDeclarationPO.getIncomeCategory()).getDefaultLabel())
|
|
|
|
|
|
.cardNum(employeeDeclarePO.getCardNum())
|
|
|
|
|
|
.cardType(SalaryEnumUtil.enumMatchByValue(employeeDeclarePO.getCardType(), CardTypeEnum.class).getDefaultLabel())
|
|
|
|
|
|
.username(employeeDeclarePO.getEmployeeName())
|
|
|
|
|
|
.jobNum(employeeDeclarePO.getJobNum())
|
|
|
|
|
|
.taxReportColumns(TaxDeclarationDetailBO.convert2ListTaxReportColumn(taxReportColumns))
|
|
|
|
|
|
.resultValue(declarationValuePO.getResultValue())
|
2023-12-14 10:35:10 +08:00
|
|
|
|
.build();
|
|
|
|
|
|
}
|
2023-12-28 18:12:38 +08:00
|
|
|
|
|
|
|
|
|
|
public XSSFWorkbook downloadTemplate(DownloadTemplateParam param) {
|
|
|
|
|
|
return getTaxDeclarationExcelService(user).downloadTemplate(param);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public Map<String, Object> preview(DownloadTemplateParam param) {
|
|
|
|
|
|
return getTaxDeclarationExcelService(user).preview(param);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public Map<String, Object> importData(DownloadTemplateParam param) {
|
|
|
|
|
|
return getTaxDeclarationExcelService(user).importData(param);
|
|
|
|
|
|
}
|
2023-12-29 17:24:52 +08:00
|
|
|
|
|
2023-08-10 09:33:04 +08:00
|
|
|
|
}
|