申报表分页问题
This commit is contained in:
parent
2f59f8283a
commit
215e25fa31
|
|
@ -1,8 +1,8 @@
|
|||
package com.engine.salary.entity.taxdeclaration.dto;
|
||||
|
||||
import com.engine.salary.annotation.TableTitle;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
|
|
@ -17,26 +17,31 @@ import lombok.experimental.Accessors;
|
|||
@Accessors(chain = true)
|
||||
public class FailEmployeeListDTO {
|
||||
|
||||
//主键id")
|
||||
//主键id
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
//姓名")
|
||||
//姓名
|
||||
@TableTitle(title = "姓名",dataIndex = "employeeName",key = "employeeName")
|
||||
private String employeeName;
|
||||
|
||||
//个税扣缴义务人id")
|
||||
//个税扣缴义务人id
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long taxAgentId;
|
||||
|
||||
//个税扣缴义务人名称")
|
||||
//个税扣缴义务人名称
|
||||
@TableTitle(title = "个税扣缴义务人名称",dataIndex = "taxAgentName",key = "taxAgentName")
|
||||
private String taxAgentName;
|
||||
|
||||
//证件号码")
|
||||
//证件号码
|
||||
@TableTitle(title = "证件号码",dataIndex = "cardNum",key = "cardNum")
|
||||
private String cardNum;
|
||||
|
||||
//失败原因")
|
||||
//失败原因
|
||||
@TableTitle(title = "失败原因",dataIndex = "errorMsg",key = "errorMsg")
|
||||
private String errorMsg;
|
||||
|
||||
//所得项目")
|
||||
//所得项目
|
||||
@TableTitle(title = "所得项目",dataIndex = "incomeCategory",key = "incomeCategory")
|
||||
private String incomeCategory;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,9 +38,17 @@ public class PageInfo<T> extends com.github.pagehelper.PageInfo<T> {
|
|||
this.columns = buildColumns();
|
||||
}
|
||||
|
||||
public PageInfo(int pageNum, int pageSize, long total, List<Column> columns, List<T> list) {
|
||||
super(list);
|
||||
super.setPageNum(pageNum);
|
||||
super.setPageSize(pageSize);
|
||||
super.setTotal(total);
|
||||
this.columns = columns;
|
||||
}
|
||||
|
||||
|
||||
public List<Column> buildColumns() {
|
||||
if(clazz==null){
|
||||
if (clazz == null) {
|
||||
return this.columns;
|
||||
}
|
||||
Field[] fields = clazz.getDeclaredFields();
|
||||
|
|
|
|||
|
|
@ -153,9 +153,12 @@ public class TaxDeclareRecordWrapper extends Service {
|
|||
// 查询个税申报表详情
|
||||
PageInfo<TaxDeclarationValuePO> page = getTaxDeclarationValueService(user).listPageByTaxDeclarationIds(queryParam, Collections.singleton(queryParam.getTaxDeclarationId()));
|
||||
TaxDeclarationValueListDTO taxDeclarationValueListDTO = getTaxDeclarationValueService(user).convert2List(taxDeclaration, page.getList());
|
||||
PageInfo<Map<String, Object>> dtoPage = SalaryPageUtil.buildPage(page.getPageNum(), page.getPageSize(), taxDeclarationValueListDTO.getData());
|
||||
dtoPage.setColumns(SalaryPageUtil.convertList(taxDeclarationValueListDTO.getColumns()));
|
||||
dtoPage.setTotal(page.getTotal());
|
||||
PageInfo<Map<String, Object>> dtoPage = new PageInfo<>(
|
||||
page.getPageNum(),
|
||||
page.getPageSize(),
|
||||
page.getTotal(),
|
||||
SalaryPageUtil.convertList(taxDeclarationValueListDTO.getColumns()),
|
||||
taxDeclarationValueListDTO.getData());
|
||||
return dtoPage;
|
||||
}
|
||||
|
||||
|
|
@ -192,7 +195,7 @@ public class TaxDeclareRecordWrapper extends Service {
|
|||
List<TaxDeclareFailPO> taxDeclareFailPOPageInfo = getTaxDeclareFailService(user).listPageByTaxDeclareRecordIds(Collections.singleton(taxDeclareRecord.getId()));
|
||||
// 转换成dto
|
||||
List<FailEmployeeListDTO> failEmployeeListDTOS = getTaxDeclareFailService(user).convert2FailEmployeeList(taxDeclareRecord, taxDeclareFailPOPageInfo);
|
||||
PageInfo<FailEmployeeListDTO> dtoPage = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(), failEmployeeListDTOS,FailEmployeeListDTO.class);
|
||||
PageInfo<FailEmployeeListDTO> dtoPage = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(), failEmployeeListDTOS, FailEmployeeListDTO.class);
|
||||
// 转成前端所需的格式
|
||||
return dtoPage;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue