Compare commits
13 Commits
47c267ba3b
...
e54b775d69
| Author | SHA1 | Date |
|---|---|---|
|
|
e54b775d69 | |
|
|
d03c67644a | |
|
|
ee3fd8da8e | |
|
|
9b9b47de88 | |
|
|
99f6c43f25 | |
|
|
22f494fe12 | |
|
|
43d35cb81b | |
|
|
0bdc48f1c2 | |
|
|
35f8368715 | |
|
|
ac2143080f | |
|
|
491a746c75 | |
|
|
2fe958f5db | |
|
|
7a7030a91c |
|
|
@ -38,6 +38,10 @@ public class TaxDeclarationListDTO {
|
|||
@TableTitle(title = "薪资类型", dataIndex = "incomeCategory", key = "incomeCategory")
|
||||
private String incomeCategory;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM", timezone = "GMT+8")
|
||||
@TableTitle(title = "税款所属期", dataIndex = "taxCycle", key = "taxCycle")
|
||||
private Date taxCycle;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM", timezone = "GMT+8")
|
||||
@TableTitle(title = "薪资所属月", dataIndex = "salaryMonth", key = "salaryMonth")
|
||||
private Date salaryMonth;
|
||||
|
|
@ -48,10 +52,6 @@ public class TaxDeclarationListDTO {
|
|||
@TableTitle(title = "个税扣缴义务人", dataIndex = "taxAgentName", key = "taxAgentName")
|
||||
private String taxAgentName;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM", timezone = "GMT+8")
|
||||
@TableTitle(title = "税款所属期", dataIndex = "taxCycle", key = "taxCycle")
|
||||
private Date taxCycle;
|
||||
|
||||
//@TableTitle(title = "操作人id", dataIndex = "operateEmployeeId", key = "operateEmployeeId")
|
||||
private Long operateEmployeeId;
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import lombok.Builder;
|
|||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -110,6 +110,13 @@ public class TaxDeclarationPO {
|
|||
LocalDateRange taxMonths;
|
||||
|
||||
|
||||
//"开始日期
|
||||
private Date taxCycleFromDate;
|
||||
|
||||
//结束日期
|
||||
private Date taxCycleEndDate;
|
||||
|
||||
|
||||
|
||||
private Collection<Long> taxAgentIds;
|
||||
private Set<String> opts;
|
||||
|
|
|
|||
|
|
@ -69,6 +69,12 @@
|
|||
<if test="taxMonths != null and taxMonths.endDate != null">
|
||||
AND tax_cycle <![CDATA[ <= ]]> #{taxMonths.endDate}
|
||||
</if>
|
||||
<if test="taxCycleFromDate != null">
|
||||
AND tax_cycle <![CDATA[ >= ]]> #{taxCycleFromDate}
|
||||
</if>
|
||||
<if test="taxCycleEndDate != null">
|
||||
AND tax_cycle <![CDATA[ <= ]]> #{taxCycleEndDate}
|
||||
</if>
|
||||
<if test="taxAgentIds != null and taxAgentIds.size()>0">
|
||||
AND tax_agent_id IN
|
||||
<foreach collection="taxAgentIds" open="(" item="id" separator="," close=")">
|
||||
|
|
|
|||
|
|
@ -932,17 +932,10 @@ public class SalarySobItemServiceImpl extends Service implements SalarySobItemSe
|
|||
// 不是查询薪资账套下实时的薪资项目,而是查询发起薪资核算时存储的薪资项目快照
|
||||
SalaryAcctConfig salaryAcctSobConfig = getSalaryAcctSobConfigService(user).getSalaryAcctConfig(salaryAcctRecordId);
|
||||
|
||||
// 1.1、如果薪资核算记录已经归档了,就不能继续核算
|
||||
if (!Objects.equals(salaryAcctRecordPO.getStatus(), SalaryAcctRecordStatusEnum.NOT_ARCHIVED.getValue())) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(99148, "当前薪资核算记录已归档,请重新打开后再进行核算"));
|
||||
}
|
||||
// 2、查询薪资核算记录的薪资周期、考勤周期等
|
||||
SalarySobCycleDTO salarySobCycleDTO = getSalaryAcctRecordService(user).getSalarySobCycleById(salaryAcctRecordId);
|
||||
// 3、查询薪资核算记录所用薪资账套的薪资项目副本
|
||||
List<SalarySobItemPO> salarySobItemPOS = salaryAcctSobConfig.getSalarySobItems();
|
||||
if (CollectionUtils.isEmpty(salarySobItemPOS)) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(99151, "当前所用的薪资账套未选择任何薪资项目,无法核算"));
|
||||
}
|
||||
// 回算薪资项目
|
||||
List<SalarySobBackItemPO> salarySobBackItems = Collections.emptyList();
|
||||
if (Objects.equals(salaryAcctRecordPO.getBackCalcStatus(), 1)) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.engine.salary.service.impl;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.hrmelog.entity.dto.LoggerContext;
|
||||
|
|
@ -157,20 +158,24 @@ public class TaxDeclarationServiceImpl extends Service implements TaxDeclaration
|
|||
public PageInfo<TaxDeclarationPO> listPageByParam(TaxDeclarationListQueryParam queryParam) {
|
||||
// 分页参数
|
||||
TaxDeclarationPO po = TaxDeclarationPO.builder().build();
|
||||
LocalDateRange localDateRange = new LocalDateRange();
|
||||
if (Objects.nonNull(queryParam.getFromSalaryMonth())) {
|
||||
localDateRange.setFromDate(queryParam.getFromSalaryMonth());
|
||||
po.setTaxCycleFromDate(queryParam.getFromSalaryMonth());
|
||||
}
|
||||
if (Objects.nonNull(queryParam.getEndSalaryMonth())) {
|
||||
localDateRange.setEndDate(SalaryDateUtil.localDateToDate(SalaryDateUtil.localDate2YearMonth(queryParam.getEndSalaryMonth()).atEndOfMonth()));
|
||||
po.setTaxCycleEndDate(queryParam.getEndSalaryMonth());
|
||||
}
|
||||
po.setSalaryMonths(localDateRange);
|
||||
|
||||
// 查询个税申报表
|
||||
List<TaxDeclarationPO> taxDeclarationPOS = getTaxDeclarationMapper().listSome(po);
|
||||
|
||||
taxDeclarationPOS = getAuthService(user).auth(taxDeclarationPOS, AuthFilterTypeEnum.DATA_OPT, TaxDeclarationPO.class);
|
||||
|
||||
if (StrUtil.isNotBlank(queryParam.getTaxAgentName())) {
|
||||
List<TaxAgentPO> taxAgentPOs = getTaxAgentService(user).list(TaxAgentQueryParam.builder().name(queryParam.getTaxAgentName()).build());
|
||||
Set<Long> taxAgentIds = SalaryEntityUtil.properties(taxAgentPOs, TaxAgentPO::getId);
|
||||
taxDeclarationPOS = taxDeclarationPOS.stream().filter(tax -> taxAgentIds.contains(tax.getTaxAgentId())).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
|
||||
return SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(),
|
||||
taxDeclarationPOS, TaxDeclarationPO.class);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.engine.salary.service.impl;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.hrmelog.entity.dto.LoggerContext;
|
||||
|
|
@ -23,6 +24,7 @@ import com.engine.salary.entity.salarysob.po.SalarySobAddUpRulePO;
|
|||
import com.engine.salary.entity.salarysob.po.SalarySobPO;
|
||||
import com.engine.salary.entity.salarysob.po.SalarySobTaxReportRulePO;
|
||||
import com.engine.salary.entity.taxagent.bo.TaxAgentTaxReturnBO;
|
||||
import com.engine.salary.entity.taxagent.param.TaxAgentQueryParam;
|
||||
import com.engine.salary.entity.taxagent.po.TaxAgentPO;
|
||||
import com.engine.salary.entity.taxagent.po.TaxAgentTaxReturnPO;
|
||||
import com.engine.salary.entity.taxapiflow.bo.TaxApiFlowBO;
|
||||
|
|
@ -250,6 +252,13 @@ public class TaxDeclareRecordServiceImpl extends Service implements TaxDeclareRe
|
|||
}
|
||||
|
||||
List<TaxDeclareRecordPO> taxDeclareRecordPOS = getTaxDeclareRecordMapper().listSome(build);
|
||||
|
||||
if (StrUtil.isNotBlank(queryParam.getTaxAgentName())) {
|
||||
List<TaxAgentPO> taxAgentPOs = getTaxAgentService(user).list(TaxAgentQueryParam.builder().name(queryParam.getTaxAgentName()).build());
|
||||
Set<Long> taxAgentIds = SalaryEntityUtil.properties(taxAgentPOs, TaxAgentPO::getId);
|
||||
taxDeclareRecordPOS = taxDeclareRecordPOS.stream().filter(tax -> taxAgentIds.contains(tax.getTaxAgentId())).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
return SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(), taxDeclareRecordPOS, TaxDeclareRecordPO.class);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ public class TaxDeclarationController {
|
|||
@POST
|
||||
@Path("/list")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String listTaxDeclaration(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody TaxDeclarationListQueryParam queryParam) {
|
||||
public String list(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody TaxDeclarationListQueryParam queryParam) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<TaxDeclarationListQueryParam, PageInfo>(user).run(getTaxDeclareRecordWrapper(user)::listPage, queryParam);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue