2022-04-16 15:33:51 +08:00
|
|
|
package com.engine.salary.wrapper;
|
|
|
|
|
|
2022-04-19 20:58:30 +08:00
|
|
|
import com.cloudstore.eccom.pc.table.WeaTableColumn;
|
|
|
|
|
import com.cloudstore.eccom.result.WeaResultMsg;
|
|
|
|
|
import com.engine.common.util.ServiceUtil;
|
2022-04-16 15:33:51 +08:00
|
|
|
import com.engine.core.impl.Service;
|
2022-04-19 20:58:30 +08:00
|
|
|
import com.engine.salary.component.SalaryWeaTable;
|
|
|
|
|
import com.engine.salary.entity.taxdeclaration.bo.TaxDeclarationDetailListColumn;
|
2022-04-16 15:33:51 +08:00
|
|
|
import com.engine.salary.entity.taxdeclaration.dto.TaxDeclarationDetailListDTO;
|
|
|
|
|
import com.engine.salary.entity.taxdeclaration.param.TaxDeclarationDetailListQueryParam;
|
|
|
|
|
import com.engine.salary.service.TaxDeclarationDetailService;
|
2022-04-19 20:58:30 +08:00
|
|
|
import com.engine.salary.service.impl.TaxDeclarationDetailServiceImpl;
|
2022-04-16 15:33:51 +08:00
|
|
|
import com.engine.salary.util.page.PageInfo;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
2022-04-19 20:58:30 +08:00
|
|
|
import weaver.hrm.User;
|
2022-04-16 15:33:51 +08:00
|
|
|
|
2022-06-02 18:02:27 +08:00
|
|
|
import java.util.HashMap;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Map;
|
2022-04-19 20:58:30 +08:00
|
|
|
import java.util.stream.Collectors;
|
2022-04-16 15:33:51 +08:00
|
|
|
|
2022-04-19 20:58:30 +08:00
|
|
|
|
|
|
|
|
/** @description: 个税申报表明细
|
2022-04-16 15:33:51 +08:00
|
|
|
* @author: xiajun
|
|
|
|
|
* @modified By: xiajun
|
|
|
|
|
* @date: Created in 1/23/22 6:07 PM
|
2022-04-19 20:58:30 +08:00
|
|
|
* @version:v1.0*/
|
|
|
|
|
|
2022-04-16 15:33:51 +08:00
|
|
|
|
|
|
|
|
@Slf4j
|
|
|
|
|
public class TaxDeclarationDetailWrapper extends Service {
|
|
|
|
|
|
2022-04-19 20:58:30 +08:00
|
|
|
private TaxDeclarationDetailService getTaxDeclarationDetailService(User user) {
|
|
|
|
|
return (TaxDeclarationDetailService) ServiceUtil.getService(TaxDeclarationDetailServiceImpl.class, user);
|
|
|
|
|
}
|
|
|
|
|
|
2022-04-16 15:33:51 +08:00
|
|
|
|
2022-04-19 20:58:30 +08:00
|
|
|
/** 个税申报表明细列表
|
2022-04-16 15:33:51 +08:00
|
|
|
*
|
|
|
|
|
* @param queryParam 列表查询条件
|
2022-04-19 20:58:30 +08:00
|
|
|
* @return*/
|
2022-04-16 15:33:51 +08:00
|
|
|
|
2022-04-19 20:58:30 +08:00
|
|
|
|
|
|
|
|
public Map<String,Object> listPage(TaxDeclarationDetailListQueryParam queryParam) {
|
|
|
|
|
PageInfo<TaxDeclarationDetailListDTO> dtoPage = getTaxDeclarationDetailService(user).listDtoPageByParam(queryParam);
|
|
|
|
|
// 列表的表头
|
|
|
|
|
List<WeaTableColumn> weaTableColumns = TaxDeclarationDetailListColumn.listTableColumn().stream()
|
|
|
|
|
.map(weaTableColumnWapper -> (WeaTableColumn) weaTableColumnWapper)
|
|
|
|
|
.collect(Collectors.toList());
|
|
|
|
|
SalaryWeaTable<TaxDeclarationDetailListDTO> table = new SalaryWeaTable<TaxDeclarationDetailListDTO>(user, TaxDeclarationDetailListDTO.class);
|
|
|
|
|
table.setColumns(weaTableColumns);
|
|
|
|
|
|
|
|
|
|
dtoPage.setTotal(dtoPage.getPageSize());
|
2022-04-16 15:33:51 +08:00
|
|
|
dtoPage.setPageNum(queryParam.getCurrent());
|
|
|
|
|
dtoPage.setPageSize(queryParam.getPageSize());
|
2022-04-19 20:58:30 +08:00
|
|
|
|
|
|
|
|
WeaResultMsg result = new WeaResultMsg(false);
|
|
|
|
|
result.putAll(table.makeDataResult());
|
|
|
|
|
result.success();
|
|
|
|
|
|
|
|
|
|
Map<String,Object> datas = new HashMap<>();
|
|
|
|
|
datas.put("pageInfo", dtoPage);
|
|
|
|
|
datas.put("dataKey",result.getResultMap());
|
|
|
|
|
datas.put("pageUid", "taxDeclarationDetailList");
|
|
|
|
|
return datas;
|
2022-04-16 15:33:51 +08:00
|
|
|
}
|
|
|
|
|
}
|