weaver-hrm-salary/src/com/engine/salary/wrapper/SalarySobRangeWrapper.java

135 lines
4.3 KiB
Java
Raw Normal View History

2022-03-22 21:01:38 +08:00
package com.engine.salary.wrapper;
2022-03-23 18:41:38 +08:00
import com.engine.common.util.ServiceUtil;
2022-03-22 21:01:38 +08:00
import com.engine.core.impl.Service;
2023-03-14 10:52:48 +08:00
import com.engine.salary.entity.SalarySobExtRangePO;
2022-03-23 18:41:38 +08:00
import com.engine.salary.entity.salarysob.dto.SalarySobRangeListDTO;
2023-03-14 10:52:48 +08:00
import com.engine.salary.entity.salarysob.param.SalarySobRangeExtSaveParam;
2023-01-09 15:12:44 +08:00
import com.engine.salary.entity.salarysob.param.SalarySobRangeImportParam;
2022-03-23 18:41:38 +08:00
import com.engine.salary.entity.salarysob.param.SalarySobRangeQueryParam;
2022-03-22 21:01:38 +08:00
import com.engine.salary.entity.salarysob.param.SalarySobRangeSaveParam;
2023-03-15 18:03:46 +08:00
import com.engine.salary.service.SalarySobExtRangeService;
2022-03-22 21:01:38 +08:00
import com.engine.salary.service.SalarySobRangeService;
2023-03-15 18:03:46 +08:00
import com.engine.salary.service.impl.SalarySobExtRangeServiceImpl;
2022-03-23 18:41:38 +08:00
import com.engine.salary.service.impl.SalarySobRangeServiceImpl;
import com.engine.salary.util.page.PageInfo;
import org.apache.commons.lang.math.NumberUtils;
2023-01-09 15:12:44 +08:00
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
2022-03-23 18:41:38 +08:00
import weaver.hrm.User;
2022-03-22 21:01:38 +08:00
import java.util.Collection;
2023-01-09 15:12:44 +08:00
import java.util.Map;
2022-03-22 21:01:38 +08:00
/**
* 薪资账套的人员范围
* <p>Copyright: Copyright (c) 2022</p>
* <p>Company: 泛微软件</p>
*
* @author qiantao
* @version 1.0
**/
public class SalarySobRangeWrapper extends Service {
2022-03-23 18:41:38 +08:00
private SalarySobRangeService getSalarySobRangeService(User user) {
2022-08-11 10:27:15 +08:00
return ServiceUtil.getService(SalarySobRangeServiceImpl.class, user);
2022-03-23 18:41:38 +08:00
}
2022-03-22 21:01:38 +08:00
2023-03-15 18:03:46 +08:00
private SalarySobExtRangeService getSalarySobExtRangeService(User user) {
return ServiceUtil.getService(SalarySobExtRangeServiceImpl.class, user);
}
2022-03-23 18:41:38 +08:00
/**
* 薪资账套的人员范围列表关联人员范围
*
* @param queryParam 列表查询条件
* @return
*/
public PageInfo<SalarySobRangeListDTO> listPage4Include(SalarySobRangeQueryParam queryParam) {
return getSalarySobRangeService(user).listPageByParamAndIncludeType(queryParam, NumberUtils.INTEGER_ONE);
}
2022-03-23 13:52:43 +08:00
2022-03-23 18:41:38 +08:00
/**
* 薪资账套的人员范围列表从范围中排除
*
* @param queryParam 列表查询条件
* @return
*/
public PageInfo<SalarySobRangeListDTO> listPage4Exclude(SalarySobRangeQueryParam queryParam) {
return getSalarySobRangeService(user).listPageByParamAndIncludeType(queryParam, NumberUtils.INTEGER_ZERO);
}
/**
* 获取薪资账套的人员范围列表添加人员的表单
*
* @return
*/
2022-03-22 21:01:38 +08:00
// public WeaForm getForm() {
// return SalaryFormatUtil.<SalarySobRangeFormDTO>getInstance().buildForm(SalarySobRangeFormDTO.class, new SalarySobRangeFormDTO());
// }
/**
* 保存
*
* @param saveParam 保存参数
*/
2022-03-23 13:52:43 +08:00
public void save(SalarySobRangeSaveParam saveParam) {
2022-03-23 18:41:38 +08:00
getSalarySobRangeService(user).save(saveParam);
2022-03-22 21:01:38 +08:00
}
2023-03-14 10:52:48 +08:00
/**
* 保存
*
* @param saveParam 保存参数
*/
public void saveExtRange(SalarySobRangeExtSaveParam saveParam) {
2023-03-15 18:03:46 +08:00
getSalarySobExtRangeService(user).saveExtRange(saveParam);
2023-03-14 10:52:48 +08:00
}
2023-03-15 09:13:29 +08:00
public PageInfo<SalarySobExtRangePO> listPage4Ext(SalarySobRangeQueryParam param) {
2023-03-15 18:03:46 +08:00
return getSalarySobExtRangeService(user).listPage4Ext(param);
2023-03-14 10:52:48 +08:00
}
2022-03-22 21:01:38 +08:00
/**
* 删除
*
* @param ids 薪资账套的人员范围的主键id
*/
2022-03-23 18:41:38 +08:00
public void delete(Collection<Long> ids) {
getSalarySobRangeService(user).deleteByIds(ids);
2022-03-22 21:01:38 +08:00
}
2023-01-09 15:12:44 +08:00
2023-03-14 10:52:48 +08:00
public void deleteSalarySobExtRange(Collection<Long> ids) {
2023-03-15 18:03:46 +08:00
getSalarySobExtRangeService(user).deleteSalarySobExtRange(ids);
2023-03-14 10:52:48 +08:00
}
2023-01-09 15:12:44 +08:00
/***
* @description 下载薪资账套人员范围导入模板
* @return XSSFWorkbook
* @author Harryxzy
* @date 2023/1/9 11:32
*/
public XSSFWorkbook exportImportTemplate() {
return getSalarySobRangeService(user).downloadTemplateRange();
}
/**
* @return void
2023-03-15 09:13:29 +08:00
* @description 薪资账套人员范围导入预览
2023-01-09 15:12:44 +08:00
* @author Harryxzy
* @date 2023/1/9 13:37
*/
public Map<String, Object> preview(SalarySobRangeImportParam importParam) {
return getSalarySobRangeService(user).preview(importParam);
}
/**
2023-03-15 09:13:29 +08:00
* @return Map<String, Object>
2023-01-09 15:12:44 +08:00
* @description 导入薪资账套人员范围
* @author Harryxzy
* @date 2023/1/9 14:10
*/
public Map<String, Object> importData(SalarySobRangeImportParam importParam) {
return getSalarySobRangeService(user).importData(importParam);
}
2022-03-22 21:01:38 +08:00
}