申报表税款所属期检索和申报
This commit is contained in:
parent
552cee8a6f
commit
7a7030a91c
|
|
@ -37,6 +37,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;
|
||||
|
|
@ -47,10 +51,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;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,12 @@
|
|||
package com.engine.salary.entity.taxdeclaration.param;
|
||||
|
||||
import com.engine.salary.common.BaseQueryParam;
|
||||
import lombok.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.YearMonth;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 个税申报记录查询条件
|
||||
|
|
@ -19,13 +22,7 @@ import java.time.YearMonth;
|
|||
@AllArgsConstructor
|
||||
public class TaxDeclarationListQueryParam extends BaseQueryParam {
|
||||
|
||||
//薪资所属月范围起点
|
||||
private YearMonth fromSalaryMonth;
|
||||
private Date fromSalaryMonth;
|
||||
|
||||
//薪资所属月范围终点
|
||||
private YearMonth endSalaryMonth;
|
||||
|
||||
private String fromSalaryMonthStr;
|
||||
|
||||
private String endSalaryMonthStr;
|
||||
private Date endSalaryMonth;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -86,6 +86,13 @@ public class TaxDeclarationPO {
|
|||
LocalDateRange salaryMonths;
|
||||
|
||||
|
||||
//"开始日期
|
||||
private Date taxCycleFromDate;
|
||||
|
||||
//结束日期
|
||||
private Date taxCycleEndDate;
|
||||
|
||||
|
||||
|
||||
private Collection<Long> taxAgentIds;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,6 +61,12 @@
|
|||
<if test="salaryMonths != null and salaryMonths.endDate != null">
|
||||
AND salary_month <![CDATA[ <= ]]> #{salaryMonths.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=")">
|
||||
|
|
|
|||
|
|
@ -114,15 +114,12 @@ public class TaxDeclarationServiceImpl extends Service implements TaxDeclaration
|
|||
|
||||
// 分页参数
|
||||
TaxDeclarationPO po = TaxDeclarationPO.builder().build();
|
||||
LocalDateRange localDateRange = new LocalDateRange();
|
||||
if (Objects.nonNull(queryParam.getFromSalaryMonth())) {
|
||||
localDateRange.setFromDate(SalaryDateUtil.localDateToDate(queryParam.getFromSalaryMonth().atDay(1)));
|
||||
po.setTaxCycleFromDate(queryParam.getFromSalaryMonth());
|
||||
}
|
||||
if (Objects.nonNull(queryParam.getEndSalaryMonth())) {
|
||||
localDateRange.setEndDate(SalaryDateUtil.localDateToDate(queryParam.getEndSalaryMonth().atEndOfMonth()));
|
||||
po.setTaxCycleEndDate(queryParam.getEndSalaryMonth());
|
||||
}
|
||||
po.setSalaryMonths(localDateRange);
|
||||
|
||||
|
||||
// 分权
|
||||
Boolean openDevolution = getTaxAgentService(user).isNeedAuth(currentEmployeeId);
|
||||
|
|
|
|||
|
|
@ -31,7 +31,6 @@ import javax.ws.rs.core.Response;
|
|||
import javax.ws.rs.core.StreamingOutput;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLEncoder;
|
||||
import java.text.ParseException;
|
||||
import java.time.LocalDate;
|
||||
|
||||
|
||||
|
|
@ -58,10 +57,8 @@ public class TaxDeclarationController {
|
|||
@POST
|
||||
@Path("/list")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String list(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody TaxDeclarationListQueryParam queryParam) throws ParseException {
|
||||
public String list(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody TaxDeclarationListQueryParam queryParam){
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
queryParam.setFromSalaryMonth(SalaryDateUtil.String2YearMonth(queryParam.getFromSalaryMonthStr() == null ? "" : queryParam.getFromSalaryMonthStr()));
|
||||
queryParam.setEndSalaryMonth(SalaryDateUtil.String2YearMonth(queryParam.getEndSalaryMonthStr() == null ? "" : queryParam.getEndSalaryMonthStr()));
|
||||
return new ResponseResult<TaxDeclarationListQueryParam, PageInfo<TaxDeclarationListDTO>>(user).run(getTaxDeclarationWrapper(user)::listPage, queryParam);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue