列表增加datakey
This commit is contained in:
parent
651df1842e
commit
9c02c9c9fd
|
|
@ -22,8 +22,7 @@ import java.util.Date;
|
||||||
@Builder
|
@Builder
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@SalaryTable(pageId = "021c4a65-c401-4bcc-a720-6233996e17f1", tableType = WeaTableType.CHECKBOX,operates = {
|
@SalaryTable(pageId = "2394fba1-1381-428a-8532-4e1e6b86626e", tableType = WeaTableType.CHECKBOX)
|
||||||
})
|
|
||||||
public class InsuranceAccountDetailPO {
|
public class InsuranceAccountDetailPO {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,7 @@ public class RecordsBuildServiceImpl extends Service implements RecordsBuildServ
|
||||||
record.put(k + "socialBase", SalaryEntityUtil.thousandthConvert((String) v));
|
record.put(k + "socialBase", SalaryEntityUtil.thousandthConvert((String) v));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
record.put("fundPayOrg", item.getFundPayOrg() == null ? "" : paymentMap.get(item.getFundPayOrg()).getName());
|
record.put("fundPayOrg", item.getFundPayOrg() == null ? "" : (paymentMap.getOrDefault(item.getFundPayOrg(),TaxAgent.builder().build())).getName());
|
||||||
record.put("fundAccount", item.getFundAccount());
|
record.put("fundAccount", item.getFundAccount());
|
||||||
record.put("fundSchemeName", MapperProxyFactory.getProxy(InsuranceSchemeMapper.class).querySchemeName(item.getFundSchemeId()));
|
record.put("fundSchemeName", MapperProxyFactory.getProxy(InsuranceSchemeMapper.class).querySchemeName(item.getFundSchemeId()));
|
||||||
record.put("supplementFundAccount", item.getSupplementFundAccount());
|
record.put("supplementFundAccount", item.getSupplementFundAccount());
|
||||||
|
|
@ -87,7 +87,7 @@ public class RecordsBuildServiceImpl extends Service implements RecordsBuildServ
|
||||||
record.put(k + "fundBase", SalaryEntityUtil.thousandthConvert((String) v));
|
record.put(k + "fundBase", SalaryEntityUtil.thousandthConvert((String) v));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
record.put("otherPayOrg", item.getOtherPayOrg() == null ? "" : paymentMap.get(item.getOtherPayOrg()).getName());
|
record.put("otherPayOrg", item.getOtherPayOrg() == null ? "" : (paymentMap.getOrDefault(item.getOtherPayOrg(),TaxAgent.builder().build())).getName());
|
||||||
record.put("otherSchemeName", MapperProxyFactory.getProxy(InsuranceSchemeMapper.class).querySchemeName(item.getOtherSchemeId()));
|
record.put("otherSchemeName", MapperProxyFactory.getProxy(InsuranceSchemeMapper.class).querySchemeName(item.getOtherSchemeId()));
|
||||||
if (StringUtils.isNotEmpty(item.getOtherPaymentBaseString())) {
|
if (StringUtils.isNotEmpty(item.getOtherPaymentBaseString())) {
|
||||||
Map<String, Object> socialJson = JSON.parseObject(item.getOtherPaymentBaseString(), new HashMap<String, Object>().getClass());
|
Map<String, Object> socialJson = JSON.parseObject(item.getOtherPaymentBaseString(), new HashMap<String, Object>().getClass());
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,7 @@ import com.engine.salary.util.SalaryDateUtil;
|
||||||
import com.engine.salary.util.SalaryFormItemUtil;
|
import com.engine.salary.util.SalaryFormItemUtil;
|
||||||
import com.engine.salary.util.SalaryI18nUtil;
|
import com.engine.salary.util.SalaryI18nUtil;
|
||||||
import com.engine.salary.util.db.MapperProxyFactory;
|
import com.engine.salary.util.db.MapperProxyFactory;
|
||||||
|
import com.engine.salary.util.page.Column;
|
||||||
import com.engine.salary.util.page.PageInfo;
|
import com.engine.salary.util.page.PageInfo;
|
||||||
import com.engine.salary.util.page.PageUtil;
|
import com.engine.salary.util.page.PageUtil;
|
||||||
import com.engine.salary.util.valid.ValidUtil;
|
import com.engine.salary.util.valid.ValidUtil;
|
||||||
|
|
@ -90,6 +91,10 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
||||||
List<Map<Integer,List<Permission>>> operatesPermission = new ArrayList<>();
|
List<Map<Integer,List<Permission>>> operatesPermission = new ArrayList<>();
|
||||||
|
|
||||||
SalaryWeaTable<InsuranceAccountBatchListDTO> table = new SalaryWeaTable<>(user, InsuranceAccountBatchListDTO.class);
|
SalaryWeaTable<InsuranceAccountBatchListDTO> table = new SalaryWeaTable<>(user, InsuranceAccountBatchListDTO.class);
|
||||||
|
List<Column> columns = pageInfos.getColumns();
|
||||||
|
List<WeaTableColumn> weaTableColumn = columns.stream().map(v -> new WeaTableColumn("100", v.getTitle(), v.getKey())).collect(Collectors.toList());
|
||||||
|
|
||||||
|
table.setColumns(weaTableColumn);
|
||||||
|
|
||||||
//table.getColumns().get(0).setFixed("left");
|
//table.getColumns().get(0).setFixed("left");
|
||||||
// for (int i = 0; i < insuranceAccountBatchListDTOS.size(); i++) {
|
// for (int i = 0; i < insuranceAccountBatchListDTOS.size(); i++) {
|
||||||
|
|
@ -118,7 +123,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
||||||
|
|
||||||
datas.put("pageInfo", pageInfos);
|
datas.put("pageInfo", pageInfos);
|
||||||
datas.put("operatesPermission",operatesPermission);
|
datas.put("operatesPermission",operatesPermission);
|
||||||
//datas.put("dataKey",result.getResultMap());
|
datas.put("dataKey",result.getResultMap());
|
||||||
return datas;
|
return datas;
|
||||||
|
|
||||||
// WeaTable<InsuranceAccountBatchListDTO> resultTable = FormatManager.<InsuranceAccountBatchListDTO>getInstance()
|
// WeaTable<InsuranceAccountBatchListDTO> resultTable = FormatManager.<InsuranceAccountBatchListDTO>getInstance()
|
||||||
|
|
@ -156,8 +161,10 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
||||||
//动态列组装
|
//动态列组装
|
||||||
List<WeaTableColumn> weaTableColumn = getColumnBuildService(user).buildCommonColumnsWithStyle(insuranceAccountDetailPOS, employeeId, SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY, false);
|
List<WeaTableColumn> weaTableColumn = getColumnBuildService(user).buildCommonColumnsWithStyle(insuranceAccountDetailPOS, employeeId, SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY, false);
|
||||||
|
|
||||||
SalaryWeaTable<InsuranceAccountDetailPO> table = new SalaryWeaTable<>(user, SalaryArchiveListDTO.class);
|
SalaryWeaTable<InsuranceAccountDetailPO> table = new SalaryWeaTable<>(user,InsuranceAccountDetailPO.class);
|
||||||
table.setColumns(weaTableColumn);
|
table.setColumns(weaTableColumn);
|
||||||
|
List<Column> columns = weaTableColumn.stream().map(v -> new Column(v.getText(), v.getColumn(), v.getColumn())).collect(Collectors.toList());
|
||||||
|
pageInfos.setColumns(columns);
|
||||||
|
|
||||||
|
|
||||||
WeaResultMsg result = new WeaResultMsg(false);
|
WeaResultMsg result = new WeaResultMsg(false);
|
||||||
|
|
@ -197,7 +204,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
||||||
|
|
||||||
//数据组装
|
//数据组装
|
||||||
List<Map<String, Object>> records = getService(user).buildCommonRecords(insuranceAccountDetailPOS, employeeId);
|
List<Map<String, Object>> records = getService(user).buildCommonRecords(insuranceAccountDetailPOS, employeeId);
|
||||||
PageInfo<Map<String, Object>> pageInfos = new PageInfo<Map<String, Object>>(records);
|
PageInfo<Map<String, Object>> pageInfos = new PageInfo<>(records);
|
||||||
pageInfos.setTotal(records.size());
|
pageInfos.setTotal(records.size());
|
||||||
pageInfos.setPageNum(queryParam.getCurrent());
|
pageInfos.setPageNum(queryParam.getCurrent());
|
||||||
pageInfos.setPageSize(queryParam.getPageSize());
|
pageInfos.setPageSize(queryParam.getPageSize());
|
||||||
|
|
@ -206,7 +213,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
||||||
//动态列组装
|
//动态列组装
|
||||||
List<WeaTableColumn> weaTableColumn = getColumnBuildService(user).buildCommonColumnsWithStyle(insuranceAccountDetailPOS, employeeId, SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY, false);
|
List<WeaTableColumn> weaTableColumn = getColumnBuildService(user).buildCommonColumnsWithStyle(insuranceAccountDetailPOS, employeeId, SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY, false);
|
||||||
|
|
||||||
SalaryWeaTable<InsuranceAccountDetailPO> table = new SalaryWeaTable<>(user, SalaryArchiveListDTO.class);
|
SalaryWeaTable<InsuranceAccountDetailPO> table = new SalaryWeaTable<>(user, InsuranceAccountDetailPO.class);
|
||||||
table.setColumns(weaTableColumn);
|
table.setColumns(weaTableColumn);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,11 @@ import java.util.List;
|
||||||
@ToString
|
@ToString
|
||||||
public class PageInfo<T> extends com.github.pagehelper.PageInfo<T> {
|
public class PageInfo<T> extends com.github.pagehelper.PageInfo<T> {
|
||||||
Class<T> clazz;
|
Class<T> clazz;
|
||||||
|
|
||||||
|
// public void setColumns(List<Column> columns) {
|
||||||
|
// this.columns = columns;
|
||||||
|
// }
|
||||||
|
|
||||||
List<Column> columns = new ArrayList<>();
|
List<Column> columns = new ArrayList<>();
|
||||||
List<DataSource> dataSource = new ArrayList<>();
|
List<DataSource> dataSource = new ArrayList<>();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ public class SIAccountController {
|
||||||
* @param response
|
* @param response
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GET
|
@POST
|
||||||
@Path("/batch/list")
|
@Path("/batch/list")
|
||||||
@Produces(MediaType.APPLICATION_JSON)
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
public String list(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody InsuranceAccountBatchParam insuranceAccountBatchParam) {
|
public String list(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody InsuranceAccountBatchParam insuranceAccountBatchParam) {
|
||||||
|
|
@ -63,7 +63,7 @@ public class SIAccountController {
|
||||||
* @param insuranceAccountDetailParam
|
* @param insuranceAccountDetailParam
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GET
|
@POST
|
||||||
@Path("/detail/common/list")
|
@Path("/detail/common/list")
|
||||||
@Produces(MediaType.APPLICATION_JSON)
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
public String commonList(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
public String commonList(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
||||||
|
|
@ -80,7 +80,7 @@ public class SIAccountController {
|
||||||
* @param insuranceAccountDetailParam
|
* @param insuranceAccountDetailParam
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GET
|
@POST
|
||||||
@Path("/detail/common/search")
|
@Path("/detail/common/search")
|
||||||
@Produces(MediaType.APPLICATION_JSON)
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
public String commonByNameList(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
public String commonByNameList(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
||||||
|
|
@ -97,7 +97,7 @@ public class SIAccountController {
|
||||||
* @param insuranceAccountDetailParam
|
* @param insuranceAccountDetailParam
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GET
|
@POST
|
||||||
@Path("/detail/supplementary/list")
|
@Path("/detail/supplementary/list")
|
||||||
@Produces(MediaType.APPLICATION_JSON)
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
public String listSupplementaryPage(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
public String listSupplementaryPage(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
||||||
|
|
@ -114,7 +114,7 @@ public class SIAccountController {
|
||||||
* @param insuranceAccountDetailParam
|
* @param insuranceAccountDetailParam
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GET
|
@POST
|
||||||
@Path("/detail/supplementary/search")
|
@Path("/detail/supplementary/search")
|
||||||
@Produces(MediaType.APPLICATION_JSON)
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
public String supplementaryByNameList(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
public String supplementaryByNameList(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
||||||
|
|
@ -267,7 +267,7 @@ public class SIAccountController {
|
||||||
return new ResponseResult<AccountParam, String>().run(getService(user)::file, accountParam);
|
return new ResponseResult<AccountParam, String>().run(getService(user)::file, accountParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GET
|
@POST
|
||||||
@Path("/changeList")
|
@Path("/changeList")
|
||||||
@Produces(MediaType.APPLICATION_JSON)
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
public String changeList(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
public String changeList(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
||||||
|
|
@ -278,7 +278,7 @@ public class SIAccountController {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@GET
|
@POST
|
||||||
@Path("/overView")
|
@Path("/overView")
|
||||||
@Produces(MediaType.APPLICATION_JSON)
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
public String overView(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
public String overView(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
||||||
|
|
@ -296,7 +296,7 @@ public class SIAccountController {
|
||||||
return new ResponseResult<String, InsuranceAccountTabDTO>().run(getService(user)::tabList, billMonth);
|
return new ResponseResult<String, InsuranceAccountTabDTO>().run(getService(user)::tabList, billMonth);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GET
|
@POST
|
||||||
@Path("/inspectList")
|
@Path("/inspectList")
|
||||||
@Produces(MediaType.APPLICATION_JSON)
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
public String getInspectTable(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
public String getInspectTable(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import com.engine.salary.entity.siexport.param.InsuranceExportParam;
|
||||||
import com.engine.salary.enums.siaccount.PaymentStatusEnum;
|
import com.engine.salary.enums.siaccount.PaymentStatusEnum;
|
||||||
import com.engine.salary.service.SIAccountService;
|
import com.engine.salary.service.SIAccountService;
|
||||||
import com.engine.salary.service.impl.SIAccountServiceImpl;
|
import com.engine.salary.service.impl.SIAccountServiceImpl;
|
||||||
import com.engine.salary.wrapper.SIAccountWrapper;
|
import com.engine.salary.wrapper.SIExportWrapper;
|
||||||
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
||||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||||
import weaver.hrm.HrmUserVarify;
|
import weaver.hrm.HrmUserVarify;
|
||||||
|
|
@ -36,8 +36,8 @@ public class SIExportController {
|
||||||
return ServiceUtil.getService(SIAccountServiceImpl.class, user);
|
return ServiceUtil.getService(SIAccountServiceImpl.class, user);
|
||||||
}
|
}
|
||||||
|
|
||||||
public SIAccountWrapper getSIAccountWrapper(User user) {
|
public SIExportWrapper getSIExportWrapper(User user) {
|
||||||
return ServiceUtil.getService(SIAccountWrapper.class,user);
|
return ServiceUtil.getService(SIExportWrapper.class,user);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -47,7 +47,7 @@ public class SIExportController {
|
||||||
public Response exportAccount(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
public Response exportAccount(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
||||||
@RequestBody InsuranceExportParam param) {
|
@RequestBody InsuranceExportParam param) {
|
||||||
User user = HrmUserVarify.getUser(request, response);
|
User user = HrmUserVarify.getUser(request, response);
|
||||||
XSSFWorkbook workbook = getSIAccountWrapper(user).exportAccount(PaymentStatusEnum.COMMON.getValue(),param);
|
XSSFWorkbook workbook = getSIExportWrapper(user).exportAccount(PaymentStatusEnum.COMMON.getValue(),param);
|
||||||
String time = LocalDate.now().toString();
|
String time = LocalDate.now().toString();
|
||||||
String fileName = "正常缴纳核算报表" + time;
|
String fileName = "正常缴纳核算报表" + time;
|
||||||
try {
|
try {
|
||||||
|
|
@ -70,7 +70,7 @@ public class SIExportController {
|
||||||
public Response exportSupplementary(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
public Response exportSupplementary(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
||||||
@RequestBody InsuranceExportParam param) {
|
@RequestBody InsuranceExportParam param) {
|
||||||
User user = HrmUserVarify.getUser(request, response);
|
User user = HrmUserVarify.getUser(request, response);
|
||||||
XSSFWorkbook workbook = getSIAccountWrapper(user).exportAccount(PaymentStatusEnum.REPAIR.getValue(),param);
|
XSSFWorkbook workbook = getSIExportWrapper(user).exportAccount(PaymentStatusEnum.REPAIR.getValue(),param);
|
||||||
String time = LocalDate.now().toString();
|
String time = LocalDate.now().toString();
|
||||||
String fileName = "补缴核算报表" + time;
|
String fileName = "补缴核算报表" + time;
|
||||||
try {
|
try {
|
||||||
|
|
@ -92,7 +92,7 @@ public class SIExportController {
|
||||||
public Response exportOverView(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
public Response exportOverView(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
||||||
@RequestBody InsuranceExportParam param) {
|
@RequestBody InsuranceExportParam param) {
|
||||||
User user = HrmUserVarify.getUser(request, response);
|
User user = HrmUserVarify.getUser(request, response);
|
||||||
XSSFWorkbook workbook = getSIAccountWrapper(user).exportOverView(param);
|
XSSFWorkbook workbook = getSIExportWrapper(user).exportOverView(param);
|
||||||
String time = LocalDate.now().toString();
|
String time = LocalDate.now().toString();
|
||||||
String fileName = "总览报表" + time;
|
String fileName = "总览报表" + time;
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
|
|
@ -16,16 +16,5 @@ import weaver.hrm.User;
|
||||||
**/
|
**/
|
||||||
public class SIAccountWrapper extends Service {
|
public class SIAccountWrapper extends Service {
|
||||||
|
|
||||||
public SIExportService getSIExportService(User user) {
|
|
||||||
return ServiceUtil.getService(SIExportServiceImpl.class, user);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public XSSFWorkbook exportOverView(InsuranceExportParam param) {
|
|
||||||
return getSIExportService(user).exportOverView(param);
|
|
||||||
}
|
|
||||||
|
|
||||||
public XSSFWorkbook exportAccount(Integer paymentStatus, InsuranceExportParam param) {
|
|
||||||
return getSIExportService(user).exportAccount(paymentStatus,param);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
package com.engine.salary.wrapper;
|
||||||
|
|
||||||
|
import com.engine.common.util.ServiceUtil;
|
||||||
|
import com.engine.core.impl.Service;
|
||||||
|
import com.engine.salary.entity.siexport.param.InsuranceExportParam;
|
||||||
|
import com.engine.salary.service.SIExportService;
|
||||||
|
import com.engine.salary.service.impl.SIExportServiceImpl;
|
||||||
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||||
|
import weaver.hrm.User;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author weaver_cl
|
||||||
|
* @Description: TODO
|
||||||
|
* @Date 2022/4/18
|
||||||
|
* @Version V1.0
|
||||||
|
**/
|
||||||
|
public class SIExportWrapper extends Service {
|
||||||
|
|
||||||
|
public SIExportService getSIExportService(User user) {
|
||||||
|
return ServiceUtil.getService(SIExportServiceImpl.class, user);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public XSSFWorkbook exportOverView(InsuranceExportParam param) {
|
||||||
|
return getSIExportService(user).exportOverView(param);
|
||||||
|
}
|
||||||
|
|
||||||
|
public XSSFWorkbook exportAccount(Integer paymentStatus, InsuranceExportParam param) {
|
||||||
|
return getSIExportService(user).exportAccount(paymentStatus,param);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue