Merge branch 'auth' into release
# Conflicts: # src/com/engine/salary/biz/AddUpDeductionBiz.java # src/com/engine/salary/biz/AddUpSituationBiz.java # src/com/engine/salary/biz/SIAccountBiz.java # src/com/engine/salary/biz/SIArchivesBiz.java # src/com/engine/salary/biz/SalaryArchiveBiz.java # src/com/engine/salary/biz/SalaryArchiveItemBiz.java # src/com/engine/salary/biz/SalaryItemBiz.java # src/com/engine/salary/biz/SalarySobCheckRuleBiz.java # src/com/engine/salary/cmd/datacollection/AddUpDeductionImportCmd.java # src/com/engine/salary/cmd/datacollection/AddUpSituationImportCmd.java # src/com/engine/salary/entity/datacollection/dto/AddUpDeductionDTO.java # src/com/engine/salary/enums/UserStatusEnum.java # src/com/engine/salary/mapper/salarysob/SalarySobMapper.xml # src/com/engine/salary/service/impl/SalaryComparisonResultServiceImpl.java
This commit is contained in:
commit
f8ecb548ed
|
|
@ -0,0 +1,134 @@
|
|||
DROP TABLE IF EXISTS hrsa_tax_agent_emp;
|
||||
CREATE TABLE hrsa_tax_agent_emp
|
||||
(
|
||||
id bigint(20) NOT NULL COMMENT 'ID',
|
||||
create_time datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
|
||||
update_time datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
|
||||
creator bigint(20) NULL DEFAULT NULL COMMENT '创建人id',
|
||||
delete_type int(11) NULL DEFAULT 0,
|
||||
tenant_key varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '租户KEY',
|
||||
tax_agent_id bigint(20) NULL DEFAULT NULL COMMENT '个税扣缴义务人的主键id',
|
||||
employee_id bigint(20) NULL DEFAULT NULL COMMENT '人员信息表的主键id',
|
||||
employee_name varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
PRIMARY KEY (id) USING BTREE,
|
||||
INDEX idx_tenant_key(tenant_key) USING BTREE,
|
||||
INDEX idx_tax_agent(tax_agent_id) USING BTREE
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
|
||||
|
||||
DROP TABLE IF EXISTS hrsa_tax_agent_emp_change;
|
||||
CREATE TABLE hrsa_tax_agent_emp_change
|
||||
(
|
||||
id bigint(20) NOT NULL COMMENT 'ID',
|
||||
create_time datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
|
||||
update_time datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
|
||||
creator bigint(20) NULL DEFAULT NULL COMMENT '创建人id',
|
||||
delete_type int(11) NULL DEFAULT 0 COMMENT '是否删除',
|
||||
tenant_key varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '租户KEY',
|
||||
tax_agent_id bigint(20) NOT NULL COMMENT '个税扣缴义务人的主键id',
|
||||
employee_id bigint(20) NOT NULL COMMENT '人员信息表的主键id',
|
||||
change_type int(11) NOT NULL DEFAULT 0 COMMENT '增量类型。1:新增、2:删除',
|
||||
employee_name varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
module_type int(4) NOT NULL DEFAULT 0,
|
||||
PRIMARY KEY (id) USING BTREE,
|
||||
INDEX idx_tenant_key(tenant_key) USING BTREE,
|
||||
INDEX idx_tax_agent(tax_agent_id) USING BTREE
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
|
||||
|
||||
|
||||
DROP TABLE IF EXISTS hrsa_tax_agent_admin;
|
||||
CREATE TABLE hrsa_tax_agent_admin
|
||||
(
|
||||
id bigint(20) NOT NULL COMMENT '主键',
|
||||
tax_agent_id bigint(20) NOT NULL COMMENT '个税扣缴义务人的主键id',
|
||||
employee_id bigint(20) NOT NULL COMMENT '人员信息表的主键id',
|
||||
create_time datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP (0) COMMENT '创建时间',
|
||||
update_time datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP (0) ON UPDATE CURRENT_TIMESTAMP (0) COMMENT '更新时间',
|
||||
creator bigint(20) NOT NULL DEFAULT 0 COMMENT '创建人',
|
||||
delete_type int(11) NOT NULL DEFAULT 0 COMMENT '是否已删除。0:未删除、1:已删除',
|
||||
tenant_key varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '租户ID',
|
||||
PRIMARY KEY (id) USING BTREE,
|
||||
INDEX idx_tenant_key(tenant_key) USING BTREE,
|
||||
INDEX idx_employee_id(employee_id) USING BTREE
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '个税扣缴义务人管理员表' ROW_FORMAT = Dynamic;
|
||||
|
||||
DROP TABLE IF EXISTS hrsa_tax_agent_manage_range;
|
||||
CREATE TABLE hrsa_tax_agent_manage_range
|
||||
(
|
||||
id bigint(20) NOT NULL COMMENT '主键id',
|
||||
tax_agent_id bigint(20) NOT NULL DEFAULT 0 COMMENT '个税扣缴义务人的id',
|
||||
employee_id bigint(20) NOT NULL DEFAULT 0 COMMENT '人员表的主键id',
|
||||
tax_agent_sub_admin_id bigint(20) NOT NULL DEFAULT 0 COMMENT '个税扣缴义务人的分管理员的id',
|
||||
target_type tinyint(4) NOT NULL DEFAULT 1 COMMENT '对象类型。1:人员、2:部门、3:岗位',
|
||||
target_id bigint(20) NOT NULL DEFAULT 0 COMMENT '对象id',
|
||||
employee_status varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
||||
include_type int(4) NOT NULL DEFAULT 1,
|
||||
creator bigint(20) NOT NULL DEFAULT 0 COMMENT '创建人',
|
||||
create_time datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP (0) COMMENT '创建时间',
|
||||
update_time datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP (0) ON UPDATE CURRENT_TIMESTAMP (0) COMMENT '更新时间',
|
||||
delete_type int(11) NOT NULL DEFAULT 0 COMMENT '是否已删除。0:未删除、1:已删除',
|
||||
tenant_key varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '租户ID',
|
||||
range_type int(4) NOT NULL DEFAULT 0,
|
||||
PRIMARY KEY (id) USING BTREE,
|
||||
INDEX idx_tenant(tenant_key) USING BTREE,
|
||||
INDEX idx_tax_agent_sub_admin_id(tax_agent_sub_admin_id) USING BTREE,
|
||||
INDEX idx_tenant_key(tenant_key) USING BTREE
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '个税扣缴义务人的管理范围表' ROW_FORMAT = Dynamic;
|
||||
|
||||
DROP TABLE IF EXISTS hrsa_tax_agent_base;
|
||||
CREATE TABLE hrsa_tax_agent_base
|
||||
(
|
||||
id bigint(20) NOT NULL COMMENT '主键',
|
||||
devolution_status int(11) NOT NULL DEFAULT 0 COMMENT '分权开启状态。0:关、1:开',
|
||||
create_time datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP (0) COMMENT '创建时间',
|
||||
update_time datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP (0) ON UPDATE CURRENT_TIMESTAMP (0) COMMENT '更新时间',
|
||||
creator bigint(20) NOT NULL DEFAULT 0 COMMENT '创建人',
|
||||
delete_type int(11) NOT NULL DEFAULT 0 COMMENT '是否已删除。0:未删除、1:已删除',
|
||||
tenant_key varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '租户ID',
|
||||
PRIMARY KEY (id) USING BTREE,
|
||||
INDEX idx_tenant_key(tenant_key) USING BTREE
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '个税扣缴义务人基础信息表' ROW_FORMAT = Dynamic;
|
||||
|
||||
DROP TABLE IF EXISTS hrsa_tax_agent_sub_admin;
|
||||
CREATE TABLE hrsa_tax_agent_sub_admin
|
||||
(
|
||||
id bigint(20) NOT NULL COMMENT '主键',
|
||||
tax_agent_id bigint(20) NOT NULL COMMENT '个税扣缴义务人的主键id',
|
||||
employee_id bigint(20) NOT NULL COMMENT '人员信息表的主键id',
|
||||
description varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '描述',
|
||||
create_time datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
update_time datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP (0) COMMENT '更新时间',
|
||||
creator bigint(20) NOT NULL DEFAULT 0 COMMENT '创建人',
|
||||
delete_type int(11) NOT NULL DEFAULT 0 COMMENT '是否已删除。0:未删除、1:已删除',
|
||||
tenant_key varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '租户ID',
|
||||
remark text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL,
|
||||
PRIMARY KEY (id) USING BTREE,
|
||||
INDEX idx_tenant_key(tenant_key) USING BTREE,
|
||||
INDEX idx_tax_agent_id(tax_agent_id) USING BTREE,
|
||||
INDEX idx_employee_id(employee_id) USING BTREE
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '个税扣缴义务人分管理员表' ROW_FORMAT = Dynamic;
|
||||
|
||||
DROP TABLE IF EXISTS hrsa_tax_agent_sub_admin_emp;
|
||||
CREATE TABLE hrsa_tax_agent_sub_admin_emp
|
||||
(
|
||||
id bigint(20) NOT NULL COMMENT 'ID',
|
||||
create_time datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
|
||||
update_time datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
|
||||
creator bigint(20) NULL DEFAULT NULL COMMENT '创建人id',
|
||||
delete_type int(11) NULL DEFAULT 0 COMMENT '是否删除',
|
||||
tenant_key varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '租户KEY',
|
||||
tax_agent_id bigint(20) NOT NULL DEFAULT 0 COMMENT '个税扣缴义务人的主键id',
|
||||
tax_agent_sub_admin_id bigint(20) NOT NULL DEFAULT 0 COMMENT '个税扣缴义务人的分管理员的id',
|
||||
employee_id bigint(20) NOT NULL DEFAULT 0 COMMENT '人员信息表的主键id',
|
||||
employee_name varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '人员姓名',
|
||||
PRIMARY KEY (id) USING BTREE,
|
||||
INDEX idx_tenant_key(tenant_key) USING BTREE,
|
||||
INDEX idx_tax_agent(tax_agent_id) USING BTREE
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
|
||||
|
||||
|
||||
|
||||
ALTER TABLE hrsa_tax_agent ADD COLUMN payment_agency varchar(255) NULL COMMENT '代缴机构' AFTER tenant_key;
|
||||
|
||||
|
||||
ALTER TABLE hrsa_salary_sob ADD COLUMN tax_agent_id bigint(0) NULL COMMENT '个税扣缴义务人的主键id' AFTER tenant_key;
|
||||
|
||||
|
|
@ -9,12 +9,9 @@ import com.engine.salary.util.excel.ExcelUtil;
|
|||
import com.google.common.collect.Lists;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.ibatis.session.SqlSession;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
import weaver.conn.mybatis.MyBatisFactory;
|
||||
import weaver.general.BaseBean;
|
||||
import weaver.general.Util;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
|
@ -130,118 +127,10 @@ public class AddUpDeductionBiz extends BaseBean {
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导出
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
public XSSFWorkbook export(AddUpDeductionQueryParam param) {
|
||||
|
||||
//获取操作按钮资源
|
||||
List<List<String>> rowList = getExcelRowList(param);
|
||||
|
||||
//获取excel
|
||||
return ExcelUtil.genWorkbook(rowList, "累计专项附加扣除");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取excel数据行
|
||||
*
|
||||
* @return 导出数据行集合
|
||||
*/
|
||||
private List<List<String>> getExcelRowList(AddUpDeductionQueryParam param) {
|
||||
//excel标题
|
||||
List<String> title = Arrays.asList("姓名", "个税扣缴义务人", "部门", "手机号", "工号", "证件号码", "入职日期", "累计子女教育", "累计继续教育", "累计住房贷款利息", "累计住房租金", "累计赡养老人", "累计大病医疗", "累计婴幼儿照护");
|
||||
|
||||
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
|
||||
List<AddUpDeductionDTO> list = list(param);
|
||||
final List<List<String>> dataRowList = Optional.ofNullable(list)
|
||||
.map(List::stream)
|
||||
.map(operatorStream -> operatorStream.map(dto -> {
|
||||
List<String> cellList = new ArrayList<>();
|
||||
cellList.add(Util.null2String(dto.getUsername()));
|
||||
cellList.add(Util.null2String(dto.getTaxAgentName()));
|
||||
cellList.add(Util.null2String(dto.getDepartmentName()));
|
||||
cellList.add(Util.null2String(dto.getMobile()));
|
||||
cellList.add(Util.null2String(dto.getJobNum()));
|
||||
cellList.add(Util.null2String(dto.getIdNo()));
|
||||
cellList.add(Util.null2String(dto.getHiredate()));
|
||||
cellList.add(Util.null2String(dto.getAddUpChildEducation()));
|
||||
cellList.add(Util.null2String(dto.getAddUpContinuingEducation()));
|
||||
cellList.add(Util.null2String(dto.getAddUpHousingLoanInterest()));
|
||||
cellList.add(Util.null2String(dto.getAddUpHousingRent()));
|
||||
cellList.add(Util.null2String(dto.getAddUpSupportElderly()));
|
||||
cellList.add(Util.null2String(dto.getAddUpIllnessMedical()));
|
||||
cellList.add(Util.null2String(dto.getAddUpInfantCare()));
|
||||
return cellList;
|
||||
}).collect(Collectors.toList()))
|
||||
.orElse(Collections.emptyList());
|
||||
|
||||
List<List<String>> rowList = new ArrayList<>();
|
||||
rowList.add(title);
|
||||
rowList.addAll(dataRowList);
|
||||
return rowList;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导出详情列表
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
public XSSFWorkbook exportDetail(AddUpDeductionQueryParam param) {
|
||||
|
||||
//获取操作按钮资源
|
||||
List<List<String>> rowList = getExcelRowDetailList(param);
|
||||
|
||||
//获取excel
|
||||
return ExcelUtil.genWorkbook(rowList, "累计专项附加扣除明细");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导出详情
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
private List<List<String>> getExcelRowDetailList(AddUpDeductionQueryParam param) {
|
||||
|
||||
//excel标题
|
||||
List<String> title = Arrays.asList("姓名", "申报月份", "个税扣缴义务人", "部门", "工号", "累计子女教育", "累计继续教育", "累计住房贷款利息", "累计住房租金", "累计赡养老人", "累计大病医疗", "累计婴幼儿照护");
|
||||
|
||||
|
||||
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM");
|
||||
//查询详细信息
|
||||
List<AddUpDeductionRecordDTO> list = recordList(param);
|
||||
final List<List<String>> dataRowList = Optional.ofNullable(list)
|
||||
.map(List::stream)
|
||||
.map(operatorStream -> operatorStream.map(dto -> {
|
||||
List<String> cellList = new ArrayList<>();
|
||||
cellList.add(Util.null2String(dto.getUsername()));
|
||||
cellList.add(Util.null2String(dto.getDeclareMonth() == null ? "" : formatter.format(dto.getDeclareMonth())));
|
||||
cellList.add(Util.null2String(dto.getTaxAgentName()));
|
||||
cellList.add(Util.null2String(dto.getDepartmentName()));
|
||||
cellList.add(Util.null2String(dto.getJobNum()));
|
||||
cellList.add(Util.null2String(dto.getAddUpChildEducation()));
|
||||
cellList.add(Util.null2String(dto.getAddUpContinuingEducation()));
|
||||
cellList.add(Util.null2String(dto.getAddUpHousingLoanInterest()));
|
||||
cellList.add(Util.null2String(dto.getAddUpHousingRent()));
|
||||
cellList.add(Util.null2String(dto.getAddUpSupportElderly()));
|
||||
cellList.add(Util.null2String(dto.getAddUpIllnessMedical()));
|
||||
cellList.add(Util.null2String(dto.getAddUpInfantCare()));
|
||||
return cellList;
|
||||
}).collect(Collectors.toList()))
|
||||
.orElse(Collections.emptyList());
|
||||
|
||||
List<List<String>> rowList = new ArrayList<>();
|
||||
rowList.add(title);
|
||||
rowList.addAll(dataRowList);
|
||||
return rowList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理导入数据
|
||||
|
|
|
|||
|
|
@ -9,12 +9,9 @@ import com.engine.salary.util.excel.ExcelUtil;
|
|||
import com.google.common.collect.Lists;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.ibatis.session.SqlSession;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
import weaver.conn.mybatis.MyBatisFactory;
|
||||
import weaver.general.BaseBean;
|
||||
import weaver.general.Util;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
|
@ -32,7 +29,6 @@ public class AddUpSituationBiz extends BaseBean {
|
|||
try {
|
||||
AddUpSituationMapper mapper = sqlSession.getMapper(AddUpSituationMapper.class);
|
||||
return mapper.list(param);
|
||||
|
||||
} finally {
|
||||
sqlSession.close();
|
||||
}
|
||||
|
|
@ -130,142 +126,7 @@ public class AddUpSituationBiz extends BaseBean {
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导出
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
public XSSFWorkbook export(AddUpSituationQueryParam param) {
|
||||
|
||||
//获取操作按钮资源
|
||||
List<List<String>> rowList = getExcelRowList(param);
|
||||
|
||||
//获取excel
|
||||
return ExcelUtil.genWorkbook(rowList, "累计情况");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取excel数据行
|
||||
*
|
||||
* @return 导出数据行集合
|
||||
*/
|
||||
private List<List<String>> getExcelRowList(AddUpSituationQueryParam param) {
|
||||
// excel标题
|
||||
final List<String> title = Arrays.asList("姓名", "个税扣缴义务人", "部门", "手机号", "工号", "证件号码", "入职日期", "累计收入额", "累计减除费用",
|
||||
"累计社保个人合计", "累计公积金个人合计", "累计子女教育", "累计继续教育", "累计住房贷款利息", "累计住房租金", "累计赡养老人",
|
||||
"累计大病医疗", "累计企业(职业)年金及其他福利", "累计其他扣除", "累计免税收入", "累计准予扣除的捐赠额", "累计减免税额", "累计已预扣预缴税额", "累计婴幼儿照护");
|
||||
|
||||
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
|
||||
List<AddUpSituationDTO> list = list(param);
|
||||
final List<List<String>> dataRowList = Optional.ofNullable(list)
|
||||
.map(List::stream)
|
||||
.map(operatorStream -> operatorStream.map(dto -> {
|
||||
List<String> cellList = new ArrayList<>();
|
||||
cellList.add(Util.null2String(dto.getUsername()));
|
||||
cellList.add(Util.null2String(dto.getTaxAgentName()));
|
||||
cellList.add(Util.null2String(dto.getDepartmentName()));
|
||||
cellList.add(Util.null2String(dto.getMobile()));
|
||||
cellList.add(Util.null2String(dto.getJobNum()));
|
||||
cellList.add(Util.null2String(dto.getIdNo()));
|
||||
cellList.add(dto.getHiredate() == null ? "" : formatter.format(dto.getHiredate()));
|
||||
cellList.add(String.valueOf(dto.getAddUpIncome()));
|
||||
cellList.add(String.valueOf(dto.getAddUpSubtraction()));
|
||||
cellList.add(String.valueOf(dto.getAddUpSocialSecurityTotal()));
|
||||
cellList.add(String.valueOf(dto.getAddUpAccumulationFundTotal()));
|
||||
cellList.add(String.valueOf(dto.getAddUpChildEducation()));
|
||||
cellList.add(String.valueOf(dto.getAddUpContinuingEducation()));
|
||||
cellList.add(String.valueOf(dto.getAddUpHousingLoanInterest()));
|
||||
cellList.add(String.valueOf(dto.getAddUpHousingRent()));
|
||||
cellList.add(String.valueOf(dto.getAddUpSupportElderly()));
|
||||
cellList.add(String.valueOf(dto.getAddUpIllnessMedical()));
|
||||
cellList.add(String.valueOf(dto.getAddUpEnterpriseAndOther()));
|
||||
cellList.add(String.valueOf(dto.getAddUpOtherDeduction()));
|
||||
cellList.add(String.valueOf(dto.getAddUpTaxExemptIncome()));
|
||||
cellList.add(String.valueOf(dto.getAddUpAllowedDonation()));
|
||||
cellList.add(String.valueOf(dto.getAddUpTaxSavings()));
|
||||
cellList.add(String.valueOf(dto.getAddUpAdvanceTax()));
|
||||
cellList.add(String.valueOf(dto.getAddUpInfantCare()));
|
||||
return cellList;
|
||||
}).collect(Collectors.toList()))
|
||||
.orElse(Collections.emptyList());
|
||||
|
||||
List<List<String>> rowList = new ArrayList<>();
|
||||
rowList.add(title);
|
||||
rowList.addAll(dataRowList);
|
||||
return rowList;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导出详情列表
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
public XSSFWorkbook exportDetail(AddUpSituationQueryParam param) {
|
||||
|
||||
//获取操作按钮资源
|
||||
List<List<String>> rowList = getExcelRowDetailList(param);
|
||||
|
||||
//获取excel
|
||||
return ExcelUtil.genWorkbook(rowList, "累计情况明细");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导出详情
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
private List<List<String>> getExcelRowDetailList(AddUpSituationQueryParam param) {
|
||||
|
||||
//excel标题
|
||||
List<String> title = Arrays.asList("姓名", "税款所属期", "个税扣缴义务人", "部门", "手机号", "工号", "累计收入额", "累计减除费用", "累计社保个人合计",
|
||||
"累计公积金个人合计", "累计子女教育", "累计继续教育", "累计住房贷款利息", "累计住房租金", "累计赡养老人", "累计大病医疗", "累计企业(职业)年金及其他福利",
|
||||
"累计其他扣除", "累计免税收入", "累计准予扣除的捐赠额", "累计减免税额", "累计已预扣预缴税额", "累计婴幼儿照护");
|
||||
|
||||
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM");
|
||||
//查询详细信息
|
||||
List<AddUpSituationRecordDTO> list = recordList(param);
|
||||
final List<List<String>> dataRowList = Optional.ofNullable(list)
|
||||
.map(List::stream)
|
||||
.map(operatorStream -> operatorStream.map(dto -> {
|
||||
List<String> cellList = new ArrayList<>();
|
||||
cellList.add(Util.null2String(dto.getUsername()));
|
||||
cellList.add(Util.null2String(dto.getTaxYearMonth() == null ? "" : formatter.format(dto.getTaxYearMonth())));
|
||||
cellList.add(Util.null2String(dto.getTaxAgentName()));
|
||||
cellList.add(Util.null2String(dto.getDepartmentName()));
|
||||
cellList.add(Util.null2String(dto.getMobile()));
|
||||
cellList.add(Util.null2String(dto.getJobNum()));
|
||||
cellList.add(Util.null2String(dto.getAddUpIncome()));
|
||||
cellList.add(Util.null2String(dto.getAddUpSubtraction()));
|
||||
cellList.add(Util.null2String(dto.getAddUpSocialSecurityTotal()));
|
||||
cellList.add(Util.null2String(dto.getAddUpAccumulationFundTotal()));
|
||||
cellList.add(Util.null2String(dto.getAddUpChildEducation()));
|
||||
cellList.add(Util.null2String(dto.getAddUpContinuingEducation()));
|
||||
cellList.add(Util.null2String(dto.getAddUpHousingLoanInterest()));
|
||||
cellList.add(Util.null2String(dto.getAddUpHousingRent()));
|
||||
cellList.add(Util.null2String(dto.getAddUpSupportElderly()));
|
||||
cellList.add(Util.null2String(dto.getAddUpIllnessMedical()));
|
||||
cellList.add(Util.null2String(dto.getAddUpEnterpriseAndOther()));
|
||||
cellList.add(Util.null2String(dto.getAddUpOtherDeduction()));
|
||||
cellList.add(Util.null2String(dto.getAddUpTaxExemptIncome()));
|
||||
cellList.add(Util.null2String(dto.getAddUpAllowedDonation()));
|
||||
cellList.add(Util.null2String(dto.getAddUpTaxSavings()));
|
||||
cellList.add(Util.null2String(dto.getAddUpAdvanceTax()));
|
||||
cellList.add(Util.null2String(dto.getAddUpInfantCare()));
|
||||
return cellList;
|
||||
}).collect(Collectors.toList()))
|
||||
.orElse(Collections.emptyList());
|
||||
|
||||
List<List<String>> rowList = new ArrayList<>();
|
||||
rowList.add(title);
|
||||
rowList.addAll(dataRowList);
|
||||
return rowList;
|
||||
}
|
||||
|
||||
|
||||
public void handleImportData(List<AddUpSituation> pos) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
package com.engine.salary.biz;
|
||||
|
||||
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
||||
import com.engine.salary.entity.hrm.DeptInfo;
|
||||
import com.engine.salary.entity.hrm.PositionInfo;
|
||||
import com.engine.salary.entity.hrm.SubCompanyInfo;
|
||||
import com.engine.salary.entity.salarysob.param.SalarySobRangeEmpQueryParam;
|
||||
import com.engine.salary.mapper.datacollection.EmployMapper;
|
||||
import org.apache.ibatis.session.SqlSession;
|
||||
|
|
@ -93,4 +95,26 @@ public class EmployBiz extends BaseBean {
|
|||
sqlSession.close();
|
||||
}
|
||||
}
|
||||
|
||||
public List<DeptInfo> getDeptInfoList(List<Long> departmentIds) {
|
||||
|
||||
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
|
||||
try {
|
||||
EmployMapper mapper = sqlSession.getMapper(EmployMapper.class);
|
||||
return mapper.getDeptInfoList(departmentIds);
|
||||
} finally {
|
||||
sqlSession.close();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public List<SubCompanyInfo> getSubCompanyInfoList(List<Long> subDepartmentIds) {
|
||||
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
|
||||
try {
|
||||
EmployMapper mapper = sqlSession.getMapper(EmployMapper.class);
|
||||
return mapper.getSubCompanyInfoList(subDepartmentIds);
|
||||
} finally {
|
||||
sqlSession.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,15 +28,13 @@ import com.engine.salary.mapper.siaccount.SIAccountDetailTempMapper;
|
|||
|
||||
import com.engine.salary.mapper.sicategory.ICategoryMapper;
|
||||
import com.engine.salary.mapper.sischeme.InsuranceSchemeDetailMapper;
|
||||
import com.engine.salary.service.SIAccountService;
|
||||
import com.engine.salary.service.impl.SIAccountServiceImpl;
|
||||
import com.engine.salary.util.SalaryAssert;
|
||||
import com.engine.salary.util.SalaryDateUtil;
|
||||
import com.engine.salary.util.SalaryEntityUtil;
|
||||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
import com.engine.salary.util.db.MapperProxyFactory;
|
||||
import com.engine.salary.util.page.PageInfo;
|
||||
import com.engine.salary.util.page.PageUtil;
|
||||
import com.engine.salary.util.page.SalaryPageUtil;
|
||||
import com.google.common.collect.Lists;
|
||||
import dm.jdbc.util.IdGenerator;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
|
@ -45,9 +43,7 @@ import org.apache.commons.lang3.StringUtils;
|
|||
import org.apache.ibatis.session.SqlSession;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import weaver.conn.mybatis.MyBatisFactory;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
|
|
@ -74,7 +70,7 @@ public class SIAccountBiz extends Service{
|
|||
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
|
||||
try {
|
||||
InsuranceAccountBatchMapper insuranceAccountBatchMapper = sqlSession.getMapper(InsuranceAccountBatchMapper.class);
|
||||
PageUtil.start(queryParam.getCurrent(), queryParam.getPageSize());
|
||||
SalaryPageUtil.start(queryParam.getCurrent(), queryParam.getPageSize());
|
||||
List<InsuranceAccountBatchPO> list = insuranceAccountBatchMapper.list(queryParam);
|
||||
PageInfo<InsuranceAccountBatchPO> pageInfo = new PageInfo<>(list,InsuranceAccountBatchPO.class);
|
||||
return pageInfo;
|
||||
|
|
@ -88,7 +84,7 @@ public class SIAccountBiz extends Service{
|
|||
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
|
||||
try {
|
||||
InsuranceAccountDetailMapper insuranceAccountDetailMapper = sqlSession.getMapper(InsuranceAccountDetailMapper.class);
|
||||
PageUtil.start(queryParam.getCurrent(), queryParam.getPageSize());
|
||||
SalaryPageUtil.start(queryParam.getCurrent(), queryParam.getPageSize());
|
||||
queryParam.setPaymentStatus(PaymentStatusEnum.COMMON.getValue());
|
||||
List<InsuranceAccountDetailPO> list = insuranceAccountDetailMapper.list(queryParam);
|
||||
PageInfo<InsuranceAccountDetailPO> pageInfo = new PageInfo<>(list,InsuranceAccountDetailPO.class);
|
||||
|
|
@ -1349,7 +1345,7 @@ public class SIAccountBiz extends Service{
|
|||
|
||||
public PageInfo<InsuranceAccountViewListDTO> overView(InsuranceAccountDetailParam queryParam) {
|
||||
|
||||
// PageUtil.start(queryParam.getCurrent(),queryParam.getPageSize());
|
||||
// SalaryPageUtil.start(queryParam.getCurrent(),queryParam.getPageSize());
|
||||
List<InsuranceAccountDetailPO> insuranceAccountDetailPOS = MapperProxyFactory.getProxy(InsuranceAccountDetailMapper.class).selectList(queryParam.getBillMonth());
|
||||
|
||||
//获取扣缴义务人信息
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ import com.api.browser.bean.SearchConditionItem;
|
|||
import com.api.browser.bean.SearchConditionOption;
|
||||
import com.api.browser.util.ConditionFactory;
|
||||
import com.api.browser.util.ConditionType;
|
||||
import com.cloudstore.eccom.constant.WeaInputType;
|
||||
import com.cloudstore.eccom.pc.table.WeaTable;
|
||||
import com.cloudstore.eccom.pc.table.WeaTableCheckboxpopedom;
|
||||
import com.cloudstore.eccom.pc.table.WeaTableColumn;
|
||||
|
|
@ -44,6 +43,7 @@ import com.engine.salary.util.db.MapperProxyFactory;
|
|||
import com.engine.salary.util.page.PageInfo;
|
||||
import com.engine.salary.util.page.PageUtil;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.engine.salary.util.page.SalaryPageUtil;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.ibatis.session.SqlSession;
|
||||
import weaver.conn.mybatis.MyBatisFactory;
|
||||
|
|
@ -611,7 +611,7 @@ public class SIArchivesBiz {
|
|||
Map<String, Object> datas = new HashMap<>(16);
|
||||
try {
|
||||
SocialSchemeMapper socialSchemeMapper = sqlSession.getMapper(SocialSchemeMapper.class);
|
||||
PageUtil.start(param.getCurrent(), param.getPageSize());
|
||||
SalaryPageUtil.start(param.getCurrent(), param.getPageSize());
|
||||
// List<InsuranceArchivesEmployeePO> page = socialSchemeMapper.listPageEmployeePOS(param);
|
||||
List<InsuranceArchivesEmployeePO> page = socialSchemeMapper.queryEmployeeList(param);
|
||||
PageInfo<InsuranceArchivesEmployeePO> pageInfo = new PageInfo<>(page, InsuranceArchivesEmployeePO.class);
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import com.engine.salary.util.page.PageInfo;
|
|||
import com.engine.salary.util.page.PageUtil;
|
||||
import com.google.common.collect.Lists;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import com.engine.salary.util.page.SalaryPageUtil;
|
||||
import org.apache.ibatis.session.SqlSession;
|
||||
import weaver.conn.mybatis.MyBatisFactory;
|
||||
|
||||
|
|
@ -30,7 +31,7 @@ public class SalaryArchiveBiz {
|
|||
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
|
||||
try {
|
||||
SalaryArchiveMapper mapper = sqlSession.getMapper(SalaryArchiveMapper.class);
|
||||
PageUtil.start(param.getCurrent(), param.getPageSize());
|
||||
SalaryPageUtil.start(param.getCurrent(), param.getPageSize());
|
||||
List<SalaryArchiveListDTO> list = mapper.list(param);
|
||||
PageInfo<SalaryArchiveListDTO> pageInfo = new PageInfo<SalaryArchiveListDTO>(list, SalaryArchiveListDTO.class);
|
||||
return pageInfo;
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import com.engine.salary.util.page.PageInfo;
|
|||
import com.engine.salary.util.page.PageUtil;
|
||||
import com.google.common.collect.Lists;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import com.engine.salary.util.page.SalaryPageUtil;
|
||||
import org.apache.ibatis.session.SqlSession;
|
||||
import weaver.conn.mybatis.MyBatisFactory;
|
||||
|
||||
|
|
@ -129,7 +130,7 @@ public class SalaryArchiveItemBiz {
|
|||
public PageInfo<SalaryItemAdjustRecordListDTO> salaryItemAdjustRecordListPage(SalaryItemAdjustRecordQueryParam queryParam, List<Long> salaryItemIds) {
|
||||
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
|
||||
try {
|
||||
PageUtil.start(queryParam.getCurrent(), queryParam.getPageSize());
|
||||
SalaryPageUtil.start(queryParam.getCurrent(), queryParam.getPageSize());
|
||||
SalaryArchiveItemMapper mapper = sqlSession.getMapper(SalaryArchiveItemMapper.class);
|
||||
List<SalaryItemAdjustRecordListDTO> salaryItemAdjustRecordListDTOS = mapper.salaryItemAdjustRecordList(queryParam, salaryItemIds);
|
||||
PageInfo<SalaryItemAdjustRecordListDTO> page = new PageInfo<SalaryItemAdjustRecordListDTO>(salaryItemAdjustRecordListDTOS, SalaryItemAdjustRecordListDTO.class);
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import com.engine.salary.util.page.PageInfo;
|
|||
import com.engine.salary.util.page.PageUtil;
|
||||
import com.google.common.collect.Lists;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import com.engine.salary.util.page.SalaryPageUtil;
|
||||
import org.apache.ibatis.session.SqlSession;
|
||||
import weaver.conn.mybatis.MyBatisFactory;
|
||||
|
||||
|
|
@ -98,7 +99,7 @@ public class SalaryItemBiz {
|
|||
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
|
||||
try {
|
||||
SalaryItemMapper mapper = sqlSession.getMapper(SalaryItemMapper.class);
|
||||
PageUtil.start(searchParam.getCurrent(), searchParam.getPageSize());
|
||||
SalaryPageUtil.start(searchParam.getCurrent(), searchParam.getPageSize());
|
||||
List<SalaryItemPO> salaryItemPOList = mapper.listByParam(searchParam);
|
||||
return new PageInfo<SalaryItemPO>(salaryItemPOList);
|
||||
} finally {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,11 @@
|
|||
package com.engine.salary.biz;
|
||||
|
||||
import weaver.general.BaseBean;
|
||||
|
||||
public class SalaryRoleBiz {
|
||||
public String getAllAdminRoleId() {
|
||||
BaseBean baseBean = new BaseBean();
|
||||
String salaryAdminRoleId = baseBean.getPropValue("hrmSalary", "chiefAdminRoleId");
|
||||
return salaryAdminRoleId;
|
||||
}
|
||||
}
|
||||
|
|
@ -7,6 +7,7 @@ import com.engine.salary.util.page.PageInfo;
|
|||
import com.engine.salary.util.page.PageUtil;
|
||||
import com.google.common.collect.Lists;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import com.engine.salary.util.page.SalaryPageUtil;
|
||||
import org.apache.ibatis.session.SqlSession;
|
||||
import weaver.conn.mybatis.MyBatisFactory;
|
||||
|
||||
|
|
@ -99,7 +100,7 @@ public class SalarySobCheckRuleBiz {
|
|||
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
|
||||
try {
|
||||
SalarySobCheckRuleMapper mapper = sqlSession.getMapper(SalarySobCheckRuleMapper.class);
|
||||
PageUtil.start(param.getCurrent(), param.getPageSize());
|
||||
SalaryPageUtil.start(param.getCurrent(), param.getPageSize());
|
||||
List<SalarySobCheckRulePO> list = mapper.listByParam(param);
|
||||
PageInfo<SalarySobCheckRulePO> pageInfo = new PageInfo<SalarySobCheckRulePO>(list, SalarySobCheckRulePO.class);
|
||||
return pageInfo;
|
||||
|
|
|
|||
|
|
@ -1,73 +0,0 @@
|
|||
package com.engine.salary.cmd.TaxAgent;
|
||||
|
||||
import com.api.browser.bean.SearchConditionGroup;
|
||||
import com.api.browser.bean.SearchConditionItem;
|
||||
import com.api.browser.util.ConditionFactory;
|
||||
import com.api.browser.util.ConditionType;
|
||||
import com.engine.common.biz.AbstractCommonCommand;
|
||||
import com.engine.common.entity.BizLogContext;
|
||||
import com.engine.core.interceptor.CommandContext;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class TaxAgentGetFromCmd extends AbstractCommonCommand<Map<String, Object>> {
|
||||
|
||||
public TaxAgentGetFromCmd(Map<String, Object> params, User user) {
|
||||
this.user = user;
|
||||
this.params = params;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BizLogContext getLogContext() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> execute(CommandContext commandContext) {
|
||||
//定义返回数据
|
||||
Map<String, Object> apidatas = new HashMap<String, Object>();
|
||||
|
||||
if (null == user) {
|
||||
apidatas.put("hasRight", false);
|
||||
return apidatas;
|
||||
}
|
||||
apidatas.put("hasRight", true);
|
||||
|
||||
ConditionFactory conditionFactory = new ConditionFactory(user);
|
||||
|
||||
List<SearchConditionGroup> addGroups = new ArrayList<SearchConditionGroup>();
|
||||
List<SearchConditionItem> inputItems = new ArrayList<SearchConditionItem>();
|
||||
|
||||
//名称
|
||||
SearchConditionItem nameInput = conditionFactory.createCondition(ConditionType.INPUT, 502327, "name");
|
||||
nameInput.setColSpan(1);//定义一行显示条件数,默认值为2,当值为1时标识该条件单独占一行
|
||||
nameInput.setFieldcol(12); //条件输入框所占宽度,默认值18
|
||||
nameInput.setViewAttr(3); // 编辑权限 1:只读,2:可编辑, 3:必填 默认2
|
||||
nameInput.setLength(10); // 设置输入长度
|
||||
nameInput.setLabel("名称"); //设置文本值 这个将覆盖多语言标签的值
|
||||
nameInput.setRules("required"); //设置字段填入规则
|
||||
inputItems.add(nameInput);
|
||||
|
||||
//描述
|
||||
SearchConditionItem descriptionInput = conditionFactory.createCondition(ConditionType.INPUT, 502327, "description");
|
||||
descriptionInput.setColSpan(1);//定义一行显示条件数,默认值为2,当值为1时标识该条件单独占一行
|
||||
descriptionInput.setFieldcol(12); //条件输入框所占宽度,默认值18
|
||||
descriptionInput.setViewAttr(3); // 编辑权限 1:只读,2:可编辑, 3:必填 默认2
|
||||
descriptionInput.setLength(10); // 设置输入长度
|
||||
descriptionInput.setLabel("描述"); //设置文本值 这个将覆盖多语言标签的值
|
||||
inputItems.add(nameInput);
|
||||
|
||||
|
||||
addGroups.add(new SearchConditionGroup("", true, inputItems));
|
||||
|
||||
apidatas.put("condition", addGroups );
|
||||
|
||||
return apidatas;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
package com.engine.salary.cmd.TaxAgent;
|
||||
|
||||
import com.cloudstore.eccom.result.WeaResultMsg;
|
||||
import com.engine.common.biz.AbstractCommonCommand;
|
||||
import com.engine.common.entity.BizLogContext;
|
||||
import com.engine.core.interceptor.CommandContext;
|
||||
import com.engine.salary.component.SalaryWeaTable;
|
||||
import com.engine.salary.entity.taxrate.vo.TaxAgentTableVO;
|
||||
import com.engine.salary.util.db.DBType;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public class TaxAgentListCmd extends AbstractCommonCommand<Map<String, Object>> {
|
||||
|
||||
public TaxAgentListCmd(Map<String, Object> params, User user) {
|
||||
this.user = user;
|
||||
this.params = params;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BizLogContext getLogContext() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> execute(CommandContext commandContext) {
|
||||
|
||||
SalaryWeaTable<TaxAgentTableVO> table = new SalaryWeaTable<TaxAgentTableVO>(user, TaxAgentTableVO.class);
|
||||
|
||||
//sql条件
|
||||
String sqlWhere = makeSqlWhere(params);
|
||||
table.setSqlwhere(sqlWhere);
|
||||
|
||||
WeaResultMsg result = new WeaResultMsg(false);
|
||||
result.putAll(table.makeDataResult());
|
||||
result.success();
|
||||
return result.getResultMap();
|
||||
}
|
||||
|
||||
/**
|
||||
* sql条件
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
private String makeSqlWhere(Map<String, Object> params) {
|
||||
DBType dbType = DBType.get(new RecordSet().getDBType());
|
||||
String sqlWhere = "where delete_Type = 0";
|
||||
//模糊查询
|
||||
String name = (String) params.get("name");
|
||||
if (StringUtils.isNotBlank(name)) {
|
||||
sqlWhere += " AND name " + dbType.like(name);
|
||||
}
|
||||
return sqlWhere;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,54 +0,0 @@
|
|||
package com.engine.salary.cmd.TaxAgent;
|
||||
|
||||
import com.engine.common.biz.AbstractCommonCommand;
|
||||
import com.engine.common.entity.BizLogContext;
|
||||
import com.engine.core.interceptor.CommandContext;
|
||||
import com.engine.salary.entity.taxrate.TaxAgent;
|
||||
import com.engine.salary.exception.SalaryRunTimeException;
|
||||
import com.engine.salary.mapper.TaxAgentMapper;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.ibatis.session.SqlSession;
|
||||
import weaver.conn.mybatis.MyBatisFactory;
|
||||
import weaver.general.Util;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class TaxAgentSaveCmd extends AbstractCommonCommand<Map<String, Object>> {
|
||||
|
||||
public TaxAgentSaveCmd(Map<String, Object> params, User user) {
|
||||
this.user = user;
|
||||
this.params = params;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BizLogContext getLogContext() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> execute(CommandContext commandContext) {
|
||||
Map<String, Object> apidatas = new HashMap<String, Object>(16);
|
||||
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
|
||||
try {
|
||||
TaxAgentMapper mapper = sqlSession.getMapper(TaxAgentMapper.class);
|
||||
|
||||
List<TaxAgent> list = mapper.listByName(Util.null2String(this.params.get("name")));
|
||||
if (CollectionUtils.isNotEmpty(list)) {
|
||||
throw new SalaryRunTimeException("名称不允许重复");
|
||||
}
|
||||
|
||||
TaxAgent taxAgent = TaxAgent.convertToPO(params, (long) user.getUID());
|
||||
mapper.insertIgnoreNull(taxAgent);
|
||||
|
||||
sqlSession.commit();
|
||||
} finally {
|
||||
sqlSession.close();
|
||||
}
|
||||
return apidatas;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,63 +0,0 @@
|
|||
package com.engine.salary.cmd.TaxAgent;
|
||||
|
||||
import com.engine.common.biz.AbstractCommonCommand;
|
||||
import com.engine.common.entity.BizLogContext;
|
||||
import com.engine.core.interceptor.CommandContext;
|
||||
import com.engine.salary.entity.taxrate.TaxAgent;
|
||||
import com.engine.salary.entity.taxrate.param.TaxAgentQueryParam;
|
||||
import com.engine.salary.exception.SalaryRunTimeException;
|
||||
import com.engine.salary.mapper.TaxAgentMapper;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.compress.utils.Lists;
|
||||
import org.apache.ibatis.session.SqlSession;
|
||||
import weaver.conn.mybatis.MyBatisFactory;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.lang.reflect.Array;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class TaxAgentSelectListCmd extends AbstractCommonCommand<Map<String, Object>> {
|
||||
|
||||
public TaxAgentSelectListCmd(Map<String, Object> params, User user) {
|
||||
this.user = user;
|
||||
this.params = params;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BizLogContext getLogContext() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> execute(CommandContext commandContext) {
|
||||
Map<String, Object> apidatas = new HashMap<String, Object>(16);
|
||||
List<Map<String, String>> list = Lists.newArrayList();
|
||||
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
|
||||
try {
|
||||
TaxAgentMapper taxAgentMapper = sqlSession.getMapper(TaxAgentMapper.class);
|
||||
|
||||
List<TaxAgent> taxAgents = taxAgentMapper.listAll();
|
||||
|
||||
taxAgents.forEach(m -> {
|
||||
Map<String, String> map = new HashMap<>(2);
|
||||
map.put("id", String.valueOf(m.getId()));
|
||||
map.put("content", m.getName());
|
||||
list.add(map);
|
||||
});
|
||||
|
||||
apidatas.put("list", list);
|
||||
|
||||
sqlSession.commit();
|
||||
} finally {
|
||||
sqlSession.close();
|
||||
}
|
||||
|
||||
return apidatas;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,83 +0,0 @@
|
|||
package com.engine.salary.cmd.TaxAgent;
|
||||
|
||||
import com.engine.common.biz.AbstractCommonCommand;
|
||||
import com.engine.common.entity.BizLogContext;
|
||||
import com.engine.core.interceptor.CommandContext;
|
||||
import com.engine.salary.entity.taxrate.TaxAgent;
|
||||
import com.engine.salary.exception.SalaryRunTimeException;
|
||||
import com.engine.salary.mapper.TaxAgentMapper;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.ibatis.session.SqlSession;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import weaver.conn.mybatis.MyBatisFactory;
|
||||
import weaver.general.Util;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
public class TaxAgentUpdateCmd extends AbstractCommonCommand<Map<String, Object>> {
|
||||
|
||||
public TaxAgentUpdateCmd(Map<String, Object> params, User user) {
|
||||
this.user = user;
|
||||
this.params = params;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BizLogContext getLogContext() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> execute(CommandContext commandContext) {
|
||||
Map<String, Object> apidatas = new HashMap<String, Object>(16);
|
||||
String name = Util.null2String(params.get("name"));
|
||||
if (StringUtils.isBlank(name)) {
|
||||
throw new SalaryRunTimeException("名称必填");
|
||||
}
|
||||
Long id = Long.valueOf((Util.null2String(params.get("id"))));
|
||||
if (params.get("id") == null) {
|
||||
throw new SalaryRunTimeException("参数错误");
|
||||
}
|
||||
|
||||
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
|
||||
try {
|
||||
TaxAgentMapper taxAgentMapper = sqlSession.getMapper(TaxAgentMapper.class);
|
||||
|
||||
TaxAgent taxAgent = taxAgentMapper.getById(id);
|
||||
if (taxAgent == null) {
|
||||
throw new SalaryRunTimeException("个税扣缴义务人不存在");
|
||||
}
|
||||
List<TaxAgent> individualTaxWithholdingAgents = taxAgentMapper.listByName(name);
|
||||
boolean nameExist = individualTaxWithholdingAgents.stream().anyMatch(e -> !Objects.equals(e.getId(), id));
|
||||
if (nameExist) {
|
||||
throw new SalaryRunTimeException("名称不允许重复");
|
||||
}
|
||||
|
||||
TaxAgent taxAgentNew = new TaxAgent();
|
||||
BeanUtils.copyProperties(taxAgent, taxAgentNew);
|
||||
taxAgentNew.setName(name);
|
||||
taxAgentNew.setDescription(Util.null2String(params.get("description")));
|
||||
taxAgentNew.setUpdateTime(new Date());
|
||||
|
||||
taxAgentMapper.updateIgnoreNull(taxAgentNew);
|
||||
|
||||
// taxAgentMapper.updateById(taxAgentNew);
|
||||
// // todo 记录日志
|
||||
// SalaryLoggerUtil.recordUpdateSingleLog(taxAgentLoggerTemplate,
|
||||
// taxAgent.getId(),
|
||||
// taxAgentNew.getName(),
|
||||
// SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 93767, "编辑个税扣缴义务人"),
|
||||
// SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 93767, "编辑个税扣缴义务人"),
|
||||
// taxAgent,
|
||||
// taxAgentNew);
|
||||
|
||||
sqlSession.commit();
|
||||
} finally {
|
||||
sqlSession.close();
|
||||
}
|
||||
|
||||
return apidatas;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
package com.engine.salary.cmd.datacollection;
|
||||
|
||||
import com.engine.common.biz.AbstractCommonCommand;
|
||||
import com.engine.common.entity.BizLogContext;
|
||||
import com.engine.core.interceptor.CommandContext;
|
||||
import com.engine.salary.biz.AddUpDeductionBiz;
|
||||
import com.engine.salary.entity.datacollection.param.AddUpDeductionQueryParam;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public class AddUpDeductionExportCmd extends AbstractCommonCommand<XSSFWorkbook> {
|
||||
|
||||
public AddUpDeductionExportCmd(Map<String, Object> params, User user) {
|
||||
this.user = user;
|
||||
this.params = params;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BizLogContext getLogContext() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public XSSFWorkbook execute(CommandContext commandContext) {
|
||||
AddUpDeductionQueryParam addUpDeductionQueryParam = (AddUpDeductionQueryParam) params.get("addUpDeductionQueryParam");
|
||||
|
||||
AddUpDeductionBiz addUpDeductionBiz = new AddUpDeductionBiz();
|
||||
XSSFWorkbook workbook = addUpDeductionBiz.export(addUpDeductionQueryParam);
|
||||
|
||||
return workbook;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,66 +0,0 @@
|
|||
package com.engine.salary.cmd.datacollection;
|
||||
|
||||
import com.engine.common.biz.AbstractCommonCommand;
|
||||
import com.engine.common.entity.BizLogContext;
|
||||
import com.engine.core.interceptor.CommandContext;
|
||||
import com.engine.salary.biz.AddUpDeductionBiz;
|
||||
import com.engine.salary.biz.EmployBiz;
|
||||
import com.engine.salary.entity.datacollection.AddUpDeduction;
|
||||
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
||||
import com.engine.salary.entity.datacollection.param.AddUpDeductionQueryParam;
|
||||
import com.engine.salary.exception.SalaryRunTimeException;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class AddUpDeductionExportDetailCmd extends AbstractCommonCommand<XSSFWorkbook> {
|
||||
|
||||
public AddUpDeductionExportDetailCmd(Map<String, Object> params, User user) {
|
||||
this.user = user;
|
||||
this.params = params;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BizLogContext getLogContext() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public XSSFWorkbook execute(CommandContext commandContext) {
|
||||
AddUpDeductionQueryParam queryParam = (AddUpDeductionQueryParam) params.get("addUpDeductionQueryParam");
|
||||
EmployBiz employBiz = new EmployBiz();
|
||||
AddUpDeductionBiz biz = new AddUpDeductionBiz();
|
||||
|
||||
Long id = queryParam.getAccumulatedSpecialAdditionalDeductionId();
|
||||
if (id == null) {
|
||||
throw new SalaryRunTimeException("id不能为空");
|
||||
}
|
||||
|
||||
AddUpDeduction po = biz.getById(id);
|
||||
if (po == null) {
|
||||
throw new SalaryRunTimeException(String.format("累计专项附加扣除不存在"+"[id:%s]", id));
|
||||
}
|
||||
|
||||
List<DataCollectionEmployee> employeeList = employBiz.getEmployeeByIds(Collections.singletonList(po.getEmployeeId()));
|
||||
if (CollectionUtils.isEmpty(employeeList)) {
|
||||
throw new SalaryRunTimeException("员工信息不存在");
|
||||
}
|
||||
|
||||
//查询参数
|
||||
queryParam.setEmployeeId(po.getEmployeeId());
|
||||
//申报月份
|
||||
List<String> declareMonth = queryParam.getDeclareMonth();
|
||||
if (CollectionUtils.isNotEmpty(declareMonth)) {
|
||||
queryParam.setDeclareMonth(declareMonth.stream().map(e -> e + "-01 00:00:00").collect(Collectors.toList()));
|
||||
}
|
||||
|
||||
XSSFWorkbook workbook = biz.exportDetail(queryParam);
|
||||
|
||||
return workbook;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,173 +0,0 @@
|
|||
package com.engine.salary.cmd.datacollection;
|
||||
|
||||
import com.cloudstore.eccom.result.WeaResultMsg;
|
||||
import com.engine.common.biz.AbstractCommonCommand;
|
||||
import com.engine.common.entity.BizLogContext;
|
||||
import com.engine.core.interceptor.CommandContext;
|
||||
import com.engine.salary.biz.AddUpDeductionBiz;
|
||||
import com.engine.salary.biz.EmployBiz;
|
||||
import com.engine.salary.component.SalaryWeaTable;
|
||||
import com.engine.salary.entity.datacollection.AddUpDeduction;
|
||||
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
||||
import com.engine.salary.entity.datacollection.dto.AddUpDeductionRecordDTO;
|
||||
import com.engine.salary.entity.datacollection.param.AddUpDeductionQueryParam;
|
||||
import com.engine.salary.exception.SalaryRunTimeException;
|
||||
import com.engine.salary.util.db.DBType;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class AddUpDeductionGetDetailListCmd extends AbstractCommonCommand<Map<String, Object>> {
|
||||
|
||||
public AddUpDeductionGetDetailListCmd(Map<String, Object> params, User user) {
|
||||
this.user = user;
|
||||
this.params = params;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BizLogContext getLogContext() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> execute(CommandContext commandContext) {
|
||||
|
||||
EmployBiz employBiz = new EmployBiz();
|
||||
AddUpDeductionBiz biz = new AddUpDeductionBiz();
|
||||
|
||||
AddUpDeductionQueryParam queryParam = (AddUpDeductionQueryParam) params.get("queryParam");
|
||||
if (queryParam == null) {
|
||||
throw new SalaryRunTimeException("参数异常");
|
||||
}
|
||||
|
||||
Long id = queryParam.getAccumulatedSpecialAdditionalDeductionId();
|
||||
if (id == null) {
|
||||
throw new SalaryRunTimeException("累计专项附加扣除id不能为空");
|
||||
}
|
||||
|
||||
AddUpDeduction po = biz.getById(id);
|
||||
if (po == null) {
|
||||
throw new SalaryRunTimeException(String.format("累计专项附加扣除不存在[id:%s]", id));
|
||||
}
|
||||
|
||||
List<DataCollectionEmployee> employeeList = employBiz.getEmployeeByIds(Collections.singletonList(po.getEmployeeId()));
|
||||
if (CollectionUtils.isEmpty(employeeList)) {
|
||||
throw new SalaryRunTimeException("员工信息不存在");
|
||||
}
|
||||
|
||||
//查询参数
|
||||
queryParam.setEmployeeId(po.getEmployeeId());
|
||||
//申报月份
|
||||
List<String> declareMonth = queryParam.getDeclareMonth();
|
||||
if (CollectionUtils.isNotEmpty(declareMonth)) {
|
||||
queryParam.setDeclareMonth(declareMonth.stream().map(e -> e + "-01 00:00:00").collect(Collectors.toList()));
|
||||
}
|
||||
|
||||
String fields = " t1.id," +
|
||||
" t1.declare_month as declareMonth," +
|
||||
" t1.employee_id as employeeId," +
|
||||
" e.lastname as username," +
|
||||
" d.departmentname AS departmentName," +
|
||||
" e.mobile," +
|
||||
" e.workcode as jobNum," +
|
||||
" e.companystartdate as hiredate," +
|
||||
" t2.name AS taxAgentName," +
|
||||
" t1.add_up_child_education as addUpChildEducation," +
|
||||
" t1.add_up_continuing_education as addUpContinuingEducation," +
|
||||
" t1.add_up_housing_loan_interest as addUpHousingLoanInterest," +
|
||||
" t1.add_up_housing_rent as addUpHousingRent," +
|
||||
" t1.add_up_support_elderly as addUpSupportElderly," +
|
||||
" t1.add_up_illness_medical as addUpIllnessMedical," +
|
||||
" t1.add_up_infant_care as addUpInfantCare";
|
||||
|
||||
String fromSql = " FROM" +
|
||||
" hrsa_add_up_deduction t1" +
|
||||
" LEFT JOIN hrsa_tax_agent t2 ON t1.tax_agent_id = t2.id" +
|
||||
" LEFT JOIN hrmresource e ON t1.employee_id = e.id" +
|
||||
" LEFT JOIN hrmdepartment d ON e.departmentid = d.id";
|
||||
|
||||
SalaryWeaTable<AddUpDeductionRecordDTO> table = new SalaryWeaTable<AddUpDeductionRecordDTO>(user, AddUpDeductionRecordDTO.class);
|
||||
table.setBackfields(fields);
|
||||
table.setSqlform(fromSql);
|
||||
table.setSqlwhere(makeSqlWhere(queryParam));
|
||||
table.setSqlorderby("t1.declare_month DESC");
|
||||
table.setSqlprimarykey("t1.id");
|
||||
table.setSqlisdistinct("false");
|
||||
|
||||
|
||||
WeaResultMsg result = new WeaResultMsg(false);
|
||||
result.putAll(table.makeDataResult());
|
||||
result.success();
|
||||
return result.getResultMap();
|
||||
}
|
||||
|
||||
|
||||
private String makeSqlWhere(AddUpDeductionQueryParam queryParam) {
|
||||
DBType dbType = DBType.get(new RecordSet().getDBType());
|
||||
String sqlWhere = "t1.delete_type = 0 AND t2.delete_type = 0";
|
||||
Collection<Long> ids = queryParam.getIds();
|
||||
if (CollectionUtils.isNotEmpty(ids)) {
|
||||
String idsStr = ids.stream().map(String::valueOf).collect(Collectors.joining(","));
|
||||
sqlWhere += " AND t1.id IN (" + idsStr + ")";
|
||||
}
|
||||
Long employeeId = queryParam.getEmployeeId();
|
||||
if (employeeId != null) {
|
||||
sqlWhere += " AND t1.employee_id =" + employeeId;
|
||||
}
|
||||
String keyword = queryParam.getKeyword();
|
||||
if (StringUtils.isNotBlank(keyword)) {
|
||||
sqlWhere += " AND (" +
|
||||
" e.lastname " + dbType.like(keyword) +
|
||||
" OR d.departmentname " + dbType.like(keyword) +
|
||||
" OR e.workcode " + dbType.like(keyword) +
|
||||
" )";
|
||||
}
|
||||
// 申报月份
|
||||
List<String> declareMonths = queryParam.getDeclareMonth();
|
||||
if (CollectionUtils.isNotEmpty(declareMonths)) {
|
||||
if (declareMonths.size() == 1) {
|
||||
sqlWhere += " AND t1.declare_month = '" + declareMonths.get(0) + ",";
|
||||
}
|
||||
if (declareMonths.size() == 2) {
|
||||
sqlWhere += " AND (t1.declare_month BETWEEN '" + declareMonths.get(0) + "' AND '" + declareMonths.get(1) + "')";
|
||||
}
|
||||
}
|
||||
//姓名
|
||||
String username = queryParam.getUsername();
|
||||
if (StringUtils.isNotBlank(username)) {
|
||||
sqlWhere += " AND e.lastname " + dbType.like(username);
|
||||
}
|
||||
//个税扣缴义务人
|
||||
Long taxAgentId = queryParam.getTaxAgentId();
|
||||
if (taxAgentId != null) {
|
||||
sqlWhere += " AND t1.tax_agent_id = " + taxAgentId;
|
||||
}
|
||||
//部门
|
||||
List<Long> departmentIds = queryParam.getDepartmentIds();
|
||||
if (CollectionUtils.isNotEmpty(departmentIds)) {
|
||||
String departmentStrIds = departmentIds.stream().map(String::valueOf).collect(Collectors.joining(","));
|
||||
sqlWhere += " AND d.id IN (" + departmentStrIds + ")";
|
||||
}
|
||||
//工号
|
||||
String jobNum = queryParam.getJobNum();
|
||||
if (StringUtils.isNotBlank(jobNum)) {
|
||||
sqlWhere += " AND e.workcode " + dbType.like(jobNum);
|
||||
}
|
||||
//入职日期
|
||||
List<Date> hiredate = queryParam.getHiredate();
|
||||
if (CollectionUtils.isNotEmpty(hiredate) && hiredate.size() == 2) {
|
||||
sqlWhere += " AND (e.companystartdate BETWEEN " + hiredate.get(0) + " AND " + hiredate.get(1) + ")";
|
||||
}
|
||||
//手机号
|
||||
String mobile = queryParam.getMobile();
|
||||
if (StringUtils.isNotBlank(mobile)) {
|
||||
sqlWhere += " AND e.mobile " + dbType.like(mobile);
|
||||
}
|
||||
|
||||
return sqlWhere;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,112 +0,0 @@
|
|||
package com.engine.salary.cmd.datacollection;
|
||||
|
||||
import com.api.browser.bean.SearchConditionGroup;
|
||||
import com.api.browser.bean.SearchConditionItem;
|
||||
import com.api.browser.bean.SearchConditionOption;
|
||||
import com.api.browser.util.ConditionFactory;
|
||||
import com.api.browser.util.ConditionType;
|
||||
import com.engine.common.biz.AbstractCommonCommand;
|
||||
import com.engine.common.entity.BizLogContext;
|
||||
import com.engine.core.interceptor.CommandContext;
|
||||
import weaver.hrm.User;
|
||||
import weaver.systeminfo.SystemEnv;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class AddUpDeductionGetSearchConditionCmd extends AbstractCommonCommand<Map<String, Object>> {
|
||||
|
||||
public AddUpDeductionGetSearchConditionCmd(Map<String, Object> params, User user) {
|
||||
this.user = user;
|
||||
this.params = params;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BizLogContext getLogContext() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> execute(CommandContext commandContext) {
|
||||
Map<String, Object> apidatas = new HashMap<String, Object>();
|
||||
ConditionFactory conditionFactory = new ConditionFactory(user);
|
||||
|
||||
//条件组
|
||||
List<SearchConditionGroup> addGroups = new ArrayList<SearchConditionGroup>();
|
||||
|
||||
List<SearchConditionItem> conditionItems = new ArrayList<SearchConditionItem>();
|
||||
|
||||
//文本输入框
|
||||
SearchConditionItem username = conditionFactory.createCondition(ConditionType.INPUT,25034, "username");
|
||||
username.setInputType("input");
|
||||
username.setColSpan(2);//定义一行显示条件数,默认值为2,当值为1时标识该条件单独占一行
|
||||
username.setFieldcol(16); //条件输入框所占宽度,默认值18
|
||||
username.setLabelcol(8);
|
||||
username.setViewAttr(2); // 编辑权限 1:只读,2:可编辑, 3:必填 默认2
|
||||
username.setLabel("姓名"); //设置文本值 这个将覆盖多语言标签的值
|
||||
conditionItems.add(username);
|
||||
|
||||
|
||||
SearchConditionItem departmentName = conditionFactory.createCondition(ConditionType.BROWSER,502227,"departmentIds","4");
|
||||
departmentName.setInputType("browser");
|
||||
departmentName.setColSpan(2);
|
||||
departmentName.setFieldcol(16);
|
||||
departmentName.setLabelcol(8);
|
||||
departmentName.setViewAttr(2);
|
||||
departmentName.setIsQuickSearch(false);
|
||||
departmentName.setLabel("部门");
|
||||
conditionItems.add(departmentName);
|
||||
|
||||
|
||||
SearchConditionItem jobNum = conditionFactory.createCondition(ConditionType.INPUT,25034, "jobNum");
|
||||
jobNum.setInputType("input");
|
||||
jobNum.setColSpan(2);
|
||||
jobNum.setFieldcol(16);
|
||||
jobNum.setLabelcol(8);
|
||||
jobNum.setViewAttr(2);
|
||||
jobNum.setLabel("工号");
|
||||
conditionItems.add(jobNum);
|
||||
|
||||
|
||||
|
||||
SearchConditionItem idNo = conditionFactory.createCondition(ConditionType.INPUT,25034, "idNo");
|
||||
idNo.setInputType("input");
|
||||
idNo.setColSpan(2);
|
||||
idNo.setFieldcol(16);
|
||||
idNo.setLabelcol(8);
|
||||
idNo.setViewAttr(2);
|
||||
idNo.setLabel("证件号码");
|
||||
conditionItems.add(idNo);
|
||||
|
||||
//日期范围选项
|
||||
List<SearchConditionOption> dateOptions = new ArrayList<SearchConditionOption>();
|
||||
dateOptions.add(new SearchConditionOption("6", SystemEnv.getHtmlLabelName(32530, user.getLanguage()),true));//指定日期范围(必须为6)
|
||||
SearchConditionItem hiredate = conditionFactory.createCondition(ConditionType.RANGEPICKER, 18648, new String[]{"hiredate","hiredate"});
|
||||
hiredate.setInputType("rangepicker");
|
||||
hiredate.setFormat("yyyy-MM-dd");
|
||||
hiredate.setFieldcol(16);
|
||||
hiredate.setLabelcol(8);
|
||||
hiredate.setViewAttr(2);
|
||||
hiredate.setLabel("入职日期");
|
||||
hiredate.setOptions(dateOptions);
|
||||
conditionItems.add(hiredate);
|
||||
|
||||
|
||||
SearchConditionItem mobile = conditionFactory.createCondition(ConditionType.INPUT,25034, "mobile");
|
||||
mobile.setInputType("input");
|
||||
mobile.setColSpan(2);
|
||||
mobile.setFieldcol(16);
|
||||
mobile.setLabelcol(8);
|
||||
mobile.setViewAttr(2);
|
||||
mobile.setLabel("手机号");
|
||||
conditionItems.add(mobile);
|
||||
|
||||
addGroups.add(new SearchConditionGroup("常用条件",true,conditionItems));
|
||||
|
||||
apidatas.put("condition",addGroups);
|
||||
return apidatas;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,144 +0,0 @@
|
|||
package com.engine.salary.cmd.datacollection;
|
||||
|
||||
import com.cloudstore.eccom.result.WeaResultMsg;
|
||||
import com.engine.common.biz.AbstractCommonCommand;
|
||||
import com.engine.common.entity.BizLogContext;
|
||||
import com.engine.core.interceptor.CommandContext;
|
||||
import com.engine.salary.component.SalaryWeaTable;
|
||||
import com.engine.salary.entity.datacollection.dto.AddUpDeductionDTO;
|
||||
import com.engine.salary.entity.datacollection.param.AddUpDeductionQueryParam;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class AddUpDeductionListCmd extends AbstractCommonCommand<Map<String, Object>> {
|
||||
|
||||
public AddUpDeductionListCmd(Map<String, Object> params, User user) {
|
||||
this.user = user;
|
||||
this.params = params;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BizLogContext getLogContext() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> execute(CommandContext commandContext) {
|
||||
|
||||
String fields = " t1.id," +
|
||||
" t1.declare_month as declareMonth," +
|
||||
" t1.employee_id as employeeId," +
|
||||
" e.lastname as username," +
|
||||
" d.departmentname AS departmentName," +
|
||||
" e.mobile," +
|
||||
" e.workcode as jobNum," +
|
||||
" e.companystartdate as hiredate," +
|
||||
" t2.name AS taxAgentName," +
|
||||
" t1.add_up_child_education as addUpChildEducation," +
|
||||
" t1.add_up_continuing_education as addUpContinuingEducation," +
|
||||
" t1.add_up_housing_loan_interest as addUpHousingLoanInterest," +
|
||||
" t1.add_up_housing_rent as addUpHousingRent," +
|
||||
" t1.add_up_support_elderly as addUpSupportElderly,"+
|
||||
" t1.add_up_illness_medical as addUpIllnessMedical,"+
|
||||
" t1.add_up_infant_care as addUpInfantCare";
|
||||
|
||||
String fromSql = " FROM" +
|
||||
" hrsa_add_up_deduction t1" +
|
||||
" LEFT JOIN hrsa_tax_agent t2 ON t1.tax_agent_id = t2.id" +
|
||||
" LEFT JOIN hrmresource e ON t1.employee_id = e.id" +
|
||||
" LEFT JOIN hrmdepartment d ON e.departmentid = d.id";
|
||||
|
||||
SalaryWeaTable<AddUpDeductionDTO> table = new SalaryWeaTable<AddUpDeductionDTO>(user, AddUpDeductionDTO.class);
|
||||
table.setBackfields(fields);
|
||||
table.setSqlform(fromSql);
|
||||
table.setSqlwhere(makeSqlWhere());
|
||||
table.setSqlorderby("t1.id DESC");
|
||||
table.setSqlprimarykey("t1.id");
|
||||
table.setSqlisdistinct("false");
|
||||
|
||||
WeaResultMsg result = new WeaResultMsg(false);
|
||||
result.putAll(table.makeDataResult());
|
||||
result.success();
|
||||
return result.getResultMap();
|
||||
}
|
||||
|
||||
|
||||
private String makeSqlWhere() {
|
||||
|
||||
AddUpDeductionQueryParam queryParam = (AddUpDeductionQueryParam) params.get("queryParam");
|
||||
//申报月份
|
||||
List<String> declareMonth = queryParam.getDeclareMonth();
|
||||
if (CollectionUtils.isNotEmpty(declareMonth)) {
|
||||
queryParam.setDeclareMonth(declareMonth.stream().map(e -> e + "-01 00:00:00").collect(Collectors.toList()));
|
||||
}
|
||||
|
||||
String sqlWhere = "t1.delete_type = 0 AND t2.delete_type = 0";
|
||||
Collection<Long> ids = queryParam.getIds();
|
||||
if (CollectionUtils.isNotEmpty(ids)) {
|
||||
String idsStr = ids.stream().map(String::valueOf).collect(Collectors.joining(","));
|
||||
sqlWhere += " AND t1.id IN (" + idsStr + ")";
|
||||
}
|
||||
Long employeeId = queryParam.getEmployeeId();
|
||||
if (employeeId != null) {
|
||||
sqlWhere += " AND t1.employee_id =" + employeeId;
|
||||
}
|
||||
String keyword = queryParam.getKeyword();
|
||||
if (StringUtils.isNotBlank(keyword)) {
|
||||
sqlWhere += " AND (" +
|
||||
" e.lastname like '%" + keyword + "%'" +
|
||||
" OR d.departmentname like '%" + keyword + "%'" +
|
||||
" OR e.workcode like ''%"+keyword+"%'" +
|
||||
" )";
|
||||
}
|
||||
// 申报月份
|
||||
List<String> declareMonths = queryParam.getDeclareMonth();
|
||||
if (CollectionUtils.isNotEmpty(declareMonths)) {
|
||||
if (declareMonths.size() == 1) {
|
||||
sqlWhere += " AND t1.declare_month = '" + declareMonths.get(0)+"'";
|
||||
}
|
||||
if (declareMonths.size() == 2) {
|
||||
sqlWhere += " AND (t1.declare_month BETWEEN '" + declareMonths.get(0) + "' AND '" + declareMonths.get(1) + "')";
|
||||
}
|
||||
}
|
||||
//姓名
|
||||
String username = queryParam.getUsername();
|
||||
if (StringUtils.isNotBlank(username)) {
|
||||
sqlWhere += " AND e.lastname like '%" + username + "%'";
|
||||
}
|
||||
//个税扣缴义务人
|
||||
Long taxAgentId = queryParam.getTaxAgentId();
|
||||
if (taxAgentId != null) {
|
||||
sqlWhere += " AND t1.tax_agent_id = " + taxAgentId;
|
||||
}
|
||||
//部门
|
||||
List<Long> departmentIds = queryParam.getDepartmentIds();
|
||||
if (CollectionUtils.isNotEmpty(departmentIds)) {
|
||||
String departmentStrIds = departmentIds.stream().map(String::valueOf).collect(Collectors.joining(","));
|
||||
sqlWhere += " AND d.id IN (" + departmentStrIds + ")";
|
||||
}
|
||||
//工号
|
||||
String jobNum = queryParam.getJobNum();
|
||||
if (StringUtils.isNotBlank(jobNum)) {
|
||||
sqlWhere += " AND e.workcode like '%" + jobNum + "%'";
|
||||
}
|
||||
//入职日期
|
||||
List<Date> hiredate = queryParam.getHiredate();
|
||||
if (CollectionUtils.isNotEmpty(hiredate) && hiredate.size() == 2) {
|
||||
sqlWhere += " AND (e.companystartdate BETWEEN '"+hiredate.get(0)+"' AND '"+hiredate.get(1)+"')";
|
||||
}
|
||||
//手机号
|
||||
String mobile = queryParam.getMobile();
|
||||
if (StringUtils.isNotBlank(mobile)) {
|
||||
sqlWhere += " AND e.mobile like '%" + mobile + "%'";
|
||||
}
|
||||
|
||||
return sqlWhere;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,60 +0,0 @@
|
|||
package com.engine.salary.cmd.datacollection;
|
||||
|
||||
import com.engine.common.biz.AbstractCommonCommand;
|
||||
import com.engine.common.entity.BizLogContext;
|
||||
import com.engine.core.interceptor.CommandContext;
|
||||
import com.engine.salary.biz.AddUpDeductionBiz;
|
||||
import com.engine.salary.entity.datacollection.dto.AddUpDeductionDTO;
|
||||
import com.engine.salary.entity.datacollection.param.AddUpDeductionImportParam;
|
||||
import com.engine.salary.util.excel.ExcelParseHelper;
|
||||
import org.apache.commons.lang3.Validate;
|
||||
import org.apache.poi.util.IOUtils;
|
||||
import weaver.file.ImageFileManager;
|
||||
import weaver.general.Util;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.io.InputStream;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class AddUpDeductionPreviewCmd extends AbstractCommonCommand<Map<String, Object>> {
|
||||
|
||||
protected HttpServletRequest request;
|
||||
|
||||
public AddUpDeductionPreviewCmd(Map<String, Object> params, User user) {
|
||||
this.user = user;
|
||||
this.params = params;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public BizLogContext getLogContext() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> execute(CommandContext commandContext) {
|
||||
Map<String, Object> apidatas = new HashMap<String, Object>();
|
||||
AddUpDeductionBiz addUpDeductionBiz = new AddUpDeductionBiz();
|
||||
|
||||
//导入参数
|
||||
AddUpDeductionImportParam importParam = (AddUpDeductionImportParam) params.get("importParam");
|
||||
//excel文件id
|
||||
String imageId = Util.null2String(importParam.getImageId());
|
||||
Validate.notBlank(imageId, "imageId为空");
|
||||
|
||||
InputStream fileInputStream = null;
|
||||
try {
|
||||
fileInputStream = ImageFileManager.getInputStreamById(Integer.valueOf(imageId));
|
||||
List<AddUpDeductionDTO> addUpDeductions = ExcelParseHelper.parse2Map(fileInputStream, AddUpDeductionDTO.class, 0, 1, 14, "addUpDeductionTemplate.xlsx");
|
||||
apidatas.put("preview", addUpDeductions);
|
||||
} finally {
|
||||
IOUtils.closeQuietly(fileInputStream);
|
||||
}
|
||||
return apidatas;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
package com.engine.salary.cmd.datacollection;
|
||||
|
||||
import com.engine.common.biz.AbstractCommonCommand;
|
||||
import com.engine.common.entity.BizLogContext;
|
||||
import com.engine.core.interceptor.CommandContext;
|
||||
import com.engine.salary.biz.AddUpSituationBiz;
|
||||
import com.engine.salary.entity.datacollection.param.AddUpSituationQueryParam;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public class AddUpSituationExportCmd extends AbstractCommonCommand<XSSFWorkbook> {
|
||||
|
||||
public AddUpSituationExportCmd(Map<String, Object> params, User user) {
|
||||
this.user = user;
|
||||
this.params = params;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BizLogContext getLogContext() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public XSSFWorkbook execute(CommandContext commandContext) {
|
||||
AddUpSituationQueryParam queryParam = (AddUpSituationQueryParam) params.get("queryParam");
|
||||
AddUpSituationBiz biz = new AddUpSituationBiz();
|
||||
XSSFWorkbook workbook = biz.export(queryParam);
|
||||
return workbook;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,65 +0,0 @@
|
|||
package com.engine.salary.cmd.datacollection;
|
||||
|
||||
import com.engine.common.biz.AbstractCommonCommand;
|
||||
import com.engine.common.entity.BizLogContext;
|
||||
import com.engine.core.interceptor.CommandContext;
|
||||
import com.engine.salary.biz.AddUpSituationBiz;
|
||||
import com.engine.salary.biz.EmployBiz;
|
||||
import com.engine.salary.entity.datacollection.AddUpSituation;
|
||||
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
||||
import com.engine.salary.entity.datacollection.param.AddUpSituationQueryParam;
|
||||
import com.engine.salary.exception.SalaryRunTimeException;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class AddUpSituationExportDetailCmd extends AbstractCommonCommand<XSSFWorkbook> {
|
||||
|
||||
public AddUpSituationExportDetailCmd(Map<String, Object> params, User user) {
|
||||
this.user = user;
|
||||
this.params = params;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BizLogContext getLogContext() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public XSSFWorkbook execute(CommandContext commandContext) {
|
||||
AddUpSituationQueryParam queryParam = (AddUpSituationQueryParam) params.get("queryParam");
|
||||
AddUpSituationBiz biz = new AddUpSituationBiz();
|
||||
EmployBiz employBiz = new EmployBiz();
|
||||
|
||||
Long id = queryParam.getAccumulatedSituationId();
|
||||
if (id == null) {
|
||||
throw new SalaryRunTimeException("id不能为空");
|
||||
}
|
||||
|
||||
AddUpSituation po = biz.getById(id);
|
||||
if (po == null) {
|
||||
throw new SalaryRunTimeException(String.format("累计情况不存在"+"[id:%s]", id));
|
||||
}
|
||||
|
||||
List<DataCollectionEmployee> employeeList = employBiz.getEmployeeByIds(Collections.singletonList(po.getEmployeeId()));
|
||||
if (CollectionUtils.isEmpty(employeeList)) {
|
||||
throw new SalaryRunTimeException("员工信息不存在");
|
||||
}
|
||||
|
||||
//查询参数
|
||||
queryParam.setEmployeeId(po.getEmployeeId());
|
||||
//申报月份
|
||||
List<String> taxYearMonths = queryParam.getTaxYearMonth();
|
||||
if (CollectionUtils.isNotEmpty(taxYearMonths)) {
|
||||
queryParam.setTaxYearMonth(taxYearMonths.stream().map(e -> e + "-01 00:00:00").collect(Collectors.toList()));
|
||||
}
|
||||
|
||||
XSSFWorkbook workbook = biz.exportDetail(queryParam);
|
||||
return workbook;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,189 +0,0 @@
|
|||
package com.engine.salary.cmd.datacollection;
|
||||
|
||||
import com.cloudstore.eccom.result.WeaResultMsg;
|
||||
import com.engine.common.biz.AbstractCommonCommand;
|
||||
import com.engine.common.entity.BizLogContext;
|
||||
import com.engine.core.interceptor.CommandContext;
|
||||
import com.engine.salary.biz.AddUpSituationBiz;
|
||||
import com.engine.salary.biz.EmployBiz;
|
||||
import com.engine.salary.component.SalaryWeaTable;
|
||||
import com.engine.salary.entity.datacollection.AddUpSituation;
|
||||
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
||||
import com.engine.salary.entity.datacollection.dto.AddUpSituationRecordDTO;
|
||||
import com.engine.salary.entity.datacollection.param.AddUpSituationQueryParam;
|
||||
import com.engine.salary.exception.SalaryRunTimeException;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class AddUpSituationGetDetailListCmd extends AbstractCommonCommand<Map<String, Object>> {
|
||||
|
||||
public AddUpSituationGetDetailListCmd(Map<String, Object> params, User user) {
|
||||
this.user = user;
|
||||
this.params = params;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BizLogContext getLogContext() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> execute(CommandContext commandContext) {
|
||||
|
||||
EmployBiz employBiz = new EmployBiz();
|
||||
AddUpSituationBiz biz = new AddUpSituationBiz();
|
||||
|
||||
AddUpSituationQueryParam queryParam = (AddUpSituationQueryParam) params.get("queryParam");
|
||||
if (queryParam == null) {
|
||||
throw new SalaryRunTimeException("参数异常");
|
||||
}
|
||||
|
||||
Long id = queryParam.getAccumulatedSituationId();
|
||||
if (id == null) {
|
||||
throw new SalaryRunTimeException("累计情况id不能为空");
|
||||
}
|
||||
|
||||
AddUpSituation po = biz.getById(id);
|
||||
if (po == null) {
|
||||
throw new SalaryRunTimeException(String.format("累计情况不存在[id:%s]", id));
|
||||
}
|
||||
|
||||
List<DataCollectionEmployee> employeeList = employBiz.getEmployeeByIds(Collections.singletonList(po.getEmployeeId()));
|
||||
if (CollectionUtils.isEmpty(employeeList)) {
|
||||
throw new SalaryRunTimeException("员工信息不存在");
|
||||
}
|
||||
|
||||
//构建查询参数
|
||||
queryParam.setEmployeeId(po.getEmployeeId());
|
||||
//申报月份
|
||||
List<String> taxYearMonths = queryParam.getTaxYearMonth();
|
||||
if (CollectionUtils.isNotEmpty(taxYearMonths)) {
|
||||
queryParam.setTaxYearMonth(taxYearMonths.stream().map(e -> e + "-01 00:00:00").collect(Collectors.toList()));
|
||||
}
|
||||
|
||||
|
||||
String fields = " t1.id," +
|
||||
" t1.tax_year_month as taxYearMonth," +
|
||||
" t1.employee_id as employeeId," +
|
||||
" e.lastname as username," +
|
||||
" d.departmentName AS departmentName," +
|
||||
" e.mobile," +
|
||||
" e.workcode as jobNum," +
|
||||
" e.companystartdate as hiredate," +
|
||||
" t2.name AS taxAgentName," +
|
||||
" t1.add_up_income as addUpIncome," +
|
||||
" t1.add_up_subtraction as addUpSubtraction," +
|
||||
" t1.add_up_social_security_total as addUpSocialSecurityTotal," +
|
||||
" t1.add_up_accumulation_fund_total as addUpAccumulationFundTotal," +
|
||||
" t1.add_up_child_education as addUpChildEducation," +
|
||||
" t1.add_up_continuing_education as addUpContinuingEducation," +
|
||||
" t1.add_up_housing_loan_interest as addUpHousingLoanInterest," +
|
||||
" t1.add_up_housing_rent as addUpHousingRent," +
|
||||
" t1.add_up_support_elderly as addUpSupportElderly," +
|
||||
" t1.add_up_enterprise_and_other as addUpEnterpriseAndOther," +
|
||||
" t1.add_up_other_deduction as addUpOtherDeduction," +
|
||||
" t1.add_up_tax_exempt_income as addUpTaxExemptIncome," +
|
||||
" t1.add_up_allowed_donation as addUpAllowedDonation," +
|
||||
" t1.add_up_infant_care as addUpInfantCare," +
|
||||
" t1.add_up_tax_savings as addUpTaxSavings," +
|
||||
" t1.add_up_illness_medical as addUpIllnessMedical," +
|
||||
" t1.add_up_advance_tax as addUpAdvanceTax";
|
||||
|
||||
String fromSql = " FROM " +
|
||||
" hrsa_add_up_situation t1" +
|
||||
" INNER JOIN" +
|
||||
" (SELECT employee_id, MAX(tax_year_month) tax_year_month FROM hrsa_add_up_situation GROUP BY employee_id) t ON" +
|
||||
" t.employee_id = t1.employee_id AND t.tax_year_month = t1.tax_year_month" +
|
||||
" LEFT JOIN hrmresource e ON e.id = t1.employee_id" +
|
||||
" LEFT JOIN hrmdepartment d ON d.id = e.departmentid" +
|
||||
" LEFT JOIN hrsa_tax_agent t2 ON t1.tax_agent_id = t2.id";
|
||||
|
||||
SalaryWeaTable<AddUpSituationRecordDTO> table = new SalaryWeaTable<AddUpSituationRecordDTO>(user, AddUpSituationRecordDTO.class);
|
||||
table.setBackfields(fields);
|
||||
table.setSqlform(fromSql);
|
||||
table.setSqlwhere(makeSqlWhere(queryParam));
|
||||
table.setSqlorderby("t1.id DESC");
|
||||
table.setSqlprimarykey("t1.id");
|
||||
table.setSqlisdistinct("false");
|
||||
|
||||
WeaResultMsg result = new WeaResultMsg(false);
|
||||
result.putAll(table.makeDataResult());
|
||||
result.success();
|
||||
return result.getResultMap();
|
||||
}
|
||||
|
||||
|
||||
private String makeSqlWhere(AddUpSituationQueryParam queryParam) {
|
||||
|
||||
|
||||
String sqlWhere = "t1.delete_type = 0 AND t2.delete_type = 0 AND e.status not in (7)";
|
||||
Collection<Long> ids = queryParam.getIds();
|
||||
if (CollectionUtils.isNotEmpty(ids)) {
|
||||
String idsStr = ids.stream().map(String::valueOf).collect(Collectors.joining(","));
|
||||
sqlWhere += " AND t1.id IN (" + idsStr + ")";
|
||||
}
|
||||
Integer year = queryParam.getYear();
|
||||
if (year != null) {
|
||||
sqlWhere += " AND t1.year =" + year;
|
||||
}
|
||||
Long employeeId = queryParam.getEmployeeId();
|
||||
if (employeeId != null) {
|
||||
sqlWhere += " AND t1.employee_id =" + employeeId;
|
||||
}
|
||||
String keyword = queryParam.getKeyword();
|
||||
if (StringUtils.isNotBlank(keyword)) {
|
||||
sqlWhere += " AND (" +
|
||||
" e.lastname like '%" + keyword + "%'" +
|
||||
" OR d.departmentname like '%" + keyword + "%'" +
|
||||
" OR e.workcode like ''%" + keyword + "%'" +
|
||||
" )";
|
||||
}
|
||||
// 税款所属期
|
||||
List<String> taxYearMonth = queryParam.getTaxYearMonth();
|
||||
if (CollectionUtils.isNotEmpty(taxYearMonth)) {
|
||||
if (taxYearMonth.size() == 1) {
|
||||
sqlWhere += " AND t1.tax_year_month = '" + taxYearMonth.get(0) + "'";
|
||||
}
|
||||
if (taxYearMonth.size() == 2) {
|
||||
sqlWhere += " AND (t1.tax_year_month BETWEEN '" + taxYearMonth.get(0) + "' AND '" + taxYearMonth.get(1) + "')";
|
||||
}
|
||||
}
|
||||
//姓名
|
||||
String username = queryParam.getUsername();
|
||||
if (StringUtils.isNotBlank(username)) {
|
||||
sqlWhere += " AND e.lastname like '%" + username + "%'";
|
||||
}
|
||||
//个税扣缴义务人
|
||||
Long taxAgentId = queryParam.getTaxAgentId();
|
||||
if (taxAgentId != null) {
|
||||
sqlWhere += " AND t1.tax_agent_id = " + taxAgentId;
|
||||
}
|
||||
//部门
|
||||
List<Long> departmentIds = queryParam.getDepartmentIds();
|
||||
if (CollectionUtils.isNotEmpty(departmentIds)) {
|
||||
String departmentStrIds = departmentIds.stream().map(String::valueOf).collect(Collectors.joining(","));
|
||||
sqlWhere += " AND d.id IN (" + departmentStrIds + ")";
|
||||
}
|
||||
//工号
|
||||
String jobNum = queryParam.getJobNum();
|
||||
if (StringUtils.isNotBlank(jobNum)) {
|
||||
sqlWhere += " AND e.workcode like '%" + jobNum + "%'";
|
||||
}
|
||||
//入职日期
|
||||
List<Date> hiredate = queryParam.getHiredate();
|
||||
if (CollectionUtils.isNotEmpty(hiredate) && hiredate.size() == 2) {
|
||||
sqlWhere += " AND (e.companystartdate BETWEEN '" + hiredate.get(0) + "' AND '" + hiredate.get(1) + "')";
|
||||
}
|
||||
//手机号
|
||||
String mobile = queryParam.getMobile();
|
||||
if (StringUtils.isNotBlank(mobile)) {
|
||||
sqlWhere += " AND e.mobile like '%" + mobile + "%'";
|
||||
}
|
||||
|
||||
return sqlWhere;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,112 +0,0 @@
|
|||
package com.engine.salary.cmd.datacollection;
|
||||
|
||||
import com.api.browser.bean.SearchConditionGroup;
|
||||
import com.api.browser.bean.SearchConditionItem;
|
||||
import com.api.browser.bean.SearchConditionOption;
|
||||
import com.api.browser.util.ConditionFactory;
|
||||
import com.api.browser.util.ConditionType;
|
||||
import com.engine.common.biz.AbstractCommonCommand;
|
||||
import com.engine.common.entity.BizLogContext;
|
||||
import com.engine.core.interceptor.CommandContext;
|
||||
import weaver.hrm.User;
|
||||
import weaver.systeminfo.SystemEnv;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class AddUpSituationGetSearchConditionCmd extends AbstractCommonCommand<Map<String, Object>> {
|
||||
|
||||
public AddUpSituationGetSearchConditionCmd(Map<String, Object> params, User user) {
|
||||
this.user = user;
|
||||
this.params = params;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BizLogContext getLogContext() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> execute(CommandContext commandContext) {
|
||||
Map<String, Object> apidatas = new HashMap<String, Object>();
|
||||
ConditionFactory conditionFactory = new ConditionFactory(user);
|
||||
|
||||
//条件组
|
||||
List<SearchConditionGroup> addGroups = new ArrayList<SearchConditionGroup>();
|
||||
|
||||
List<SearchConditionItem> conditionItems = new ArrayList<SearchConditionItem>();
|
||||
|
||||
//文本输入框
|
||||
SearchConditionItem username = conditionFactory.createCondition(ConditionType.INPUT,25034, "username");
|
||||
username.setInputType("input");
|
||||
username.setColSpan(2);//定义一行显示条件数,默认值为2,当值为1时标识该条件单独占一行
|
||||
username.setFieldcol(16); //条件输入框所占宽度,默认值18
|
||||
username.setLabelcol(8);
|
||||
username.setViewAttr(2); // 编辑权限 1:只读,2:可编辑, 3:必填 默认2
|
||||
username.setLabel("姓名"); //设置文本值 这个将覆盖多语言标签的值
|
||||
conditionItems.add(username);
|
||||
|
||||
|
||||
SearchConditionItem departmentName = conditionFactory.createCondition(ConditionType.BROWSER,502227,"departmentName","4");
|
||||
departmentName.setInputType("browser");
|
||||
departmentName.setColSpan(2);
|
||||
departmentName.setFieldcol(16);
|
||||
departmentName.setLabelcol(8);
|
||||
departmentName.setViewAttr(2);
|
||||
departmentName.setIsQuickSearch(false);
|
||||
departmentName.setLabel("部门");
|
||||
conditionItems.add(departmentName);
|
||||
|
||||
|
||||
SearchConditionItem jobNum = conditionFactory.createCondition(ConditionType.INPUT,25034, "jobNum");
|
||||
jobNum.setInputType("input");
|
||||
jobNum.setColSpan(2);
|
||||
jobNum.setFieldcol(16);
|
||||
jobNum.setLabelcol(8);
|
||||
jobNum.setViewAttr(2);
|
||||
jobNum.setLabel("工号");
|
||||
conditionItems.add(jobNum);
|
||||
|
||||
|
||||
|
||||
SearchConditionItem idNo = conditionFactory.createCondition(ConditionType.INPUT,25034, "idNo");
|
||||
idNo.setInputType("input");
|
||||
idNo.setColSpan(2);
|
||||
idNo.setFieldcol(16);
|
||||
idNo.setLabelcol(8);
|
||||
idNo.setViewAttr(2);
|
||||
idNo.setLabel("证件号码");
|
||||
conditionItems.add(idNo);
|
||||
|
||||
//日期范围选项
|
||||
List<SearchConditionOption> dateOptions = new ArrayList<SearchConditionOption>();
|
||||
dateOptions.add(new SearchConditionOption("6", SystemEnv.getHtmlLabelName(32530, user.getLanguage()),true));//指定日期范围(必须为6)
|
||||
SearchConditionItem hiredate = conditionFactory.createCondition(ConditionType.RANGEPICKER, 18648, new String[]{"hiredate","hiredate"});
|
||||
hiredate.setInputType("rangepicker");
|
||||
hiredate.setFormat("yyyy-MM-dd");
|
||||
hiredate.setFieldcol(16);
|
||||
hiredate.setLabelcol(8);
|
||||
hiredate.setViewAttr(2);
|
||||
hiredate.setLabel("入职日期");
|
||||
hiredate.setOptions(dateOptions);
|
||||
conditionItems.add(hiredate);
|
||||
|
||||
|
||||
SearchConditionItem mobile = conditionFactory.createCondition(ConditionType.INPUT,25034, "mobile");
|
||||
mobile.setInputType("input");
|
||||
mobile.setColSpan(2);
|
||||
mobile.setFieldcol(16);
|
||||
mobile.setLabelcol(8);
|
||||
mobile.setViewAttr(2);
|
||||
mobile.setLabel("手机号");
|
||||
conditionItems.add(mobile);
|
||||
|
||||
addGroups.add(new SearchConditionGroup("常用条件",true,conditionItems));
|
||||
|
||||
apidatas.put("condition",addGroups);
|
||||
return apidatas;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,269 +0,0 @@
|
|||
package com.engine.salary.cmd.datacollection;
|
||||
|
||||
import com.engine.common.biz.AbstractCommonCommand;
|
||||
import com.engine.common.entity.BizLogContext;
|
||||
import com.engine.core.interceptor.CommandContext;
|
||||
import com.engine.salary.biz.AddUpSituationBiz;
|
||||
import com.engine.salary.biz.EmployBiz;
|
||||
import com.engine.salary.biz.TaxAgentBiz;
|
||||
import com.engine.salary.entity.datacollection.AddUpSituation;
|
||||
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
||||
import com.engine.salary.entity.datacollection.dto.AddUpSituationDTO;
|
||||
import com.engine.salary.entity.datacollection.param.AddUpSituationImportParam;
|
||||
import com.engine.salary.entity.taxrate.TaxAgent;
|
||||
import com.engine.salary.enums.UserStatusEnum;
|
||||
import com.engine.salary.exception.SalaryRunTimeException;
|
||||
import com.engine.salary.util.excel.ExcelParseHelper;
|
||||
import com.google.common.collect.Maps;
|
||||
import lombok.SneakyThrows;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.poi.util.IOUtils;
|
||||
import weaver.file.ImageFileManager;
|
||||
import weaver.general.Util;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.io.InputStream;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.engine.salary.constant.SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY;
|
||||
|
||||
public class AddUpSituationImportCmd extends AbstractCommonCommand<Map<String, Object>> {
|
||||
|
||||
protected HttpServletRequest request;
|
||||
|
||||
public AddUpSituationImportCmd(Map<String, Object> params, User user) {
|
||||
this.user = user;
|
||||
this.params = params;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public BizLogContext getLogContext() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@SneakyThrows
|
||||
@Override
|
||||
public Map<String, Object> execute(CommandContext commandContext) {
|
||||
Map<String, Object> apidatas = new HashMap<String, Object>();
|
||||
EmployBiz employBiz = new EmployBiz();
|
||||
AddUpSituationBiz biz = new AddUpSituationBiz();
|
||||
|
||||
//检验参数
|
||||
checkImportParam();
|
||||
|
||||
//导入参数
|
||||
AddUpSituationImportParam importParam = (AddUpSituationImportParam) params.get("importParam");
|
||||
//excel文件id
|
||||
String imageId = Util.null2String(importParam.getImageId());
|
||||
//税款所属期
|
||||
String taxYearMonthStr = Util.null2String(importParam.getTaxYearMonth());
|
||||
|
||||
|
||||
InputStream fileInputStream = null;
|
||||
try {
|
||||
fileInputStream = ImageFileManager.getInputStreamById(Integer.valueOf(imageId));
|
||||
|
||||
List<AddUpSituationDTO> excelDates = ExcelParseHelper.parse2Map(fileInputStream, AddUpSituationDTO.class, 0, 1, 24, "template.xlsx");
|
||||
|
||||
int total = excelDates.size();
|
||||
int index = 0;
|
||||
int successCount = 0;
|
||||
int errorCount = 0;
|
||||
|
||||
//人员信息
|
||||
List<DataCollectionEmployee> employees = employBiz.listEmployee();
|
||||
List<TaxAgent> taxAgents = new TaxAgentBiz().listAll();
|
||||
|
||||
//税款所属期
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Date taxYearMonth = simpleDateFormat.parse(taxYearMonthStr + "-01");
|
||||
Date now = new Date();
|
||||
|
||||
// 错误excel内容
|
||||
List<Map> errorData = new ArrayList<>();
|
||||
//合规数据
|
||||
List<AddUpSituation> eligibleData = new ArrayList<>();
|
||||
|
||||
|
||||
for (int i = 0; i < excelDates.size(); i++) {
|
||||
//excel中的数据
|
||||
AddUpSituationDTO dto = excelDates.get(i);
|
||||
//待插入数据库对象
|
||||
AddUpSituation po = AddUpSituation.builder().tenantKey(DEFAULT_TENANT_KEY)
|
||||
.createTime(now)
|
||||
.updateTime(now)
|
||||
.creator((long) user.getUID())
|
||||
.year(Integer.valueOf(taxYearMonthStr.split("-")[0]))
|
||||
.taxYearMonth(taxYearMonth)
|
||||
.build();
|
||||
|
||||
|
||||
//异常点数量
|
||||
int errorSum = 0;
|
||||
|
||||
//行号
|
||||
String rowIndex = String.format("第%s行", i + 2);
|
||||
|
||||
//相同的姓名
|
||||
String userName = dto.getUsername();
|
||||
String deparmentName = dto.getDepartmentName();
|
||||
List<Long> employeeSameIds = new ArrayList<>();
|
||||
|
||||
List<DataCollectionEmployee> emps = employees.stream().filter(e -> (StringUtils.isBlank(userName) || Objects.equals(e.getUsername(), userName))
|
||||
&& (StringUtils.isBlank(deparmentName) || Objects.equals(e.getDepartmentName(), deparmentName)))
|
||||
.collect(Collectors.toList());
|
||||
//含在职和离职,选在职数据
|
||||
if (CollectionUtils.isNotEmpty(emps) && emps.size() > 1) {
|
||||
employeeSameIds = emps.stream()
|
||||
.filter(e -> UserStatusEnum.getNormalStatus().contains(e.getStatus()))
|
||||
.map(DataCollectionEmployee::getEmployeeId)
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(emps) && emps.size() == 1) {
|
||||
employeeSameIds = emps.stream()
|
||||
.map(DataCollectionEmployee::getEmployeeId)
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
|
||||
if (StringUtils.isBlank(userName)) {
|
||||
//姓名 不能为空
|
||||
//错误消息对象
|
||||
Map<String, String> errorMessageMap = Maps.newHashMap();
|
||||
errorMessageMap.put("message", rowIndex + "姓名不能为空");
|
||||
errorData.add(errorMessageMap);
|
||||
errorSum += 1;
|
||||
} else if (CollectionUtils.isEmpty(employeeSameIds) || employeeSameIds.size() > 1) {
|
||||
Map<String, String> errorMessageMap = Maps.newHashMap();
|
||||
errorMessageMap.put("message", rowIndex + "员工信息不能为空且不可重复(姓名与部门同时确认唯一)");
|
||||
errorData.add(errorMessageMap);
|
||||
errorSum += 1;
|
||||
} else {
|
||||
Long employeeId = CollectionUtils.isNotEmpty(employeeSameIds) && employeeSameIds.size() == 1 ? employeeSameIds.get(0) : null;
|
||||
if (employeeId != null && employeeId > 0) {
|
||||
po.setEmployeeId(employeeId);
|
||||
} else {
|
||||
//姓名错误,系统内不存在该姓名
|
||||
Map<String, String> errorMessageMap = Maps.newHashMap();
|
||||
errorMessageMap.put("message", rowIndex + "姓名错误,系统内不存在该姓名");
|
||||
errorData.add(errorMessageMap);
|
||||
errorSum += 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
String taxAgentName = dto.getTaxAgentName();
|
||||
if (StringUtils.isBlank(taxAgentName)) {
|
||||
//个税扣缴义务人不能为空
|
||||
Map<String, String> errorMessageMap = Maps.newHashMap();
|
||||
errorMessageMap.put("message", rowIndex + "个税扣缴义务人不能为空");
|
||||
errorData.add(errorMessageMap);
|
||||
errorSum += 1;
|
||||
} else {
|
||||
Optional<TaxAgent> optionalTemp = taxAgents.stream().filter(m -> m.getName().equals(taxAgentName)).findFirst();
|
||||
if (optionalTemp.isPresent()) {
|
||||
po.setTaxAgentId(optionalTemp.get().getId());
|
||||
} else {
|
||||
//个税扣缴义务人不存在
|
||||
Map<String, String> errorMessageMap = Maps.newHashMap();
|
||||
errorMessageMap.put("message", rowIndex + "个税扣缴义务人不存在");
|
||||
errorData.add(errorMessageMap);
|
||||
errorSum += 1;
|
||||
}
|
||||
}
|
||||
|
||||
//累计收入额
|
||||
String addUpIncome = dto.getAddUpIncome();
|
||||
po.setAddUpIncome(Util.null2String(addUpIncome));
|
||||
//累计减除费用
|
||||
String addUpSubtraction = dto.getAddUpSubtraction();
|
||||
po.setAddUpSubtraction(addUpSubtraction);
|
||||
//累计社保个人合计
|
||||
String addUpSocialSecurityTotal = dto.getAddUpSocialSecurityTotal();
|
||||
po.setAddUpSocialSecurityTotal(addUpSocialSecurityTotal);
|
||||
//累计公积金个人合计
|
||||
String addUpAccumulationFundTotal = dto.getAddUpAccumulationFundTotal();
|
||||
po.setAddUpAccumulationFundTotal(addUpAccumulationFundTotal);
|
||||
//累计子女教育
|
||||
String addUpChildEducation = dto.getAddUpChildEducation();
|
||||
po.setAddUpChildEducation(Util.null2String(addUpChildEducation));
|
||||
//累计继续教育
|
||||
String addUpContinuingEducation = dto.getAddUpContinuingEducation();
|
||||
po.setAddUpContinuingEducation(Util.null2String(addUpContinuingEducation));
|
||||
//累计住房贷款利息
|
||||
String addUpHousingLoanInterest = dto.getAddUpHousingLoanInterest();
|
||||
po.setAddUpHousingLoanInterest(Util.null2String(addUpHousingLoanInterest));
|
||||
//累计住房租金
|
||||
String addUpHousingRent = dto.getAddUpHousingRent();
|
||||
po.setAddUpHousingRent(Util.null2String(addUpHousingRent));
|
||||
//累计赡养老人
|
||||
String addUpSupportElderly = dto.getAddUpSupportElderly();
|
||||
po.setAddUpSupportElderly(Util.null2String(addUpSupportElderly));
|
||||
//累计企业(职业)年金及其他福利
|
||||
String addUpEnterpriseAndOther = dto.getAddUpEnterpriseAndOther();
|
||||
po.setAddUpEnterpriseAndOther(addUpEnterpriseAndOther);
|
||||
//累计其他扣除
|
||||
String addUpOtherDeduction = dto.getAddUpOtherDeduction();
|
||||
po.setAddUpOtherDeduction(addUpOtherDeduction);
|
||||
//累计免税收入
|
||||
String addUpTaxExemptIncome = dto.getAddUpTaxExemptIncome();
|
||||
po.setAddUpTaxExemptIncome(addUpTaxExemptIncome);
|
||||
//累计准予扣除的捐赠额
|
||||
String addUpAllowedDonation = dto.getAddUpAllowedDonation();
|
||||
po.setAddUpAllowedDonation(addUpAllowedDonation);
|
||||
//累计已预扣预缴税额
|
||||
String addUpAdvanceTax = dto.getAddUpAdvanceTax();
|
||||
po.setAddUpAdvanceTax(addUpAdvanceTax);
|
||||
|
||||
po.setAddUpIllnessMedical(dto.getAddUpIllnessMedical());
|
||||
po.setAddUpTaxSavings(dto.getAddUpTaxSavings());
|
||||
po.setAddUpInfantCare(dto.getAddUpInfantCare());
|
||||
|
||||
if (errorSum == 0) {
|
||||
successCount += 1;
|
||||
// 合格数据
|
||||
eligibleData.add(po);
|
||||
} else {
|
||||
errorCount += 1;
|
||||
// 添加错误数据
|
||||
}
|
||||
}
|
||||
|
||||
//入库
|
||||
biz.handleImportData(eligibleData);
|
||||
|
||||
apidatas.put("successCount", successCount);
|
||||
apidatas.put("errorCount", errorCount);
|
||||
apidatas.put("errorData", errorData);
|
||||
|
||||
} finally {
|
||||
IOUtils.closeQuietly(fileInputStream);
|
||||
}
|
||||
return apidatas;
|
||||
}
|
||||
|
||||
private void checkImportParam() {
|
||||
|
||||
AddUpSituationImportParam importParam = (AddUpSituationImportParam) params.get("importParam");
|
||||
|
||||
//excel文件id
|
||||
String imageId = Util.null2String(importParam.getImageId());
|
||||
//税款所属期
|
||||
String declareMonthStr = Util.null2String(importParam.getTaxYearMonth());
|
||||
|
||||
|
||||
if (StringUtils.isBlank(imageId)) {
|
||||
throw new SalaryRunTimeException("文件不存在");
|
||||
}
|
||||
if (StringUtils.isBlank(declareMonthStr)) {
|
||||
throw new SalaryRunTimeException("税款所属期为空");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,161 +0,0 @@
|
|||
package com.engine.salary.cmd.datacollection;
|
||||
|
||||
import com.cloudstore.eccom.result.WeaResultMsg;
|
||||
import com.engine.common.biz.AbstractCommonCommand;
|
||||
import com.engine.common.entity.BizLogContext;
|
||||
import com.engine.core.interceptor.CommandContext;
|
||||
import com.engine.salary.component.SalaryWeaTable;
|
||||
import com.engine.salary.entity.datacollection.dto.AddUpSituationDTO;
|
||||
import com.engine.salary.entity.datacollection.param.AddUpSituationQueryParam;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class AddUpSituationListCmd extends AbstractCommonCommand<Map<String, Object>> {
|
||||
|
||||
public AddUpSituationListCmd(Map<String, Object> params, User user) {
|
||||
this.user = user;
|
||||
this.params = params;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BizLogContext getLogContext() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> execute(CommandContext commandContext) {
|
||||
|
||||
String fields = " t1.id," +
|
||||
" t1.tax_year_month as taxYearMonth," +
|
||||
" t1.employee_id as employeeId," +
|
||||
" e.lastname as username," +
|
||||
" d.departmentName AS departmentName," +
|
||||
" e.mobile," +
|
||||
" e.workcode as jobNum," +
|
||||
" e.companystartdate as hiredate," +
|
||||
" t2.name AS taxAgentName," +
|
||||
" t1.add_up_income as addUpIncome," +
|
||||
" t1.add_up_subtraction as addUpSubtraction," +
|
||||
" t1.add_up_social_security_total as addUpSocialSecurityTotal," +
|
||||
" t1.add_up_accumulation_fund_total as addUpAccumulationFundTotal," +
|
||||
" t1.add_up_child_education as addUpChildEducation," +
|
||||
" t1.add_up_continuing_education as addUpContinuingEducation," +
|
||||
" t1.add_up_housing_loan_interest as addUpHousingLoanInterest," +
|
||||
" t1.add_up_housing_rent as addUpHousingRent," +
|
||||
" t1.add_up_support_elderly as addUpSupportElderly," +
|
||||
" t1.add_up_enterprise_and_other as addUpEnterpriseAndOther," +
|
||||
" t1.add_up_other_deduction as addUpOtherDeduction," +
|
||||
" t1.add_up_tax_exempt_income as addUpTaxExemptIncome," +
|
||||
" t1.add_up_allowed_donation as addUpAllowedDonation," +
|
||||
" t1.add_up_infant_care as addUpInfantCare," +
|
||||
" t1.add_up_tax_savings as addUpTaxSavings," +
|
||||
" t1.add_up_illness_medical as addUpIllnessMedical," +
|
||||
" t1.add_up_advance_tax as addUpAdvanceTax";
|
||||
|
||||
String fromSql = " FROM " +
|
||||
" hrsa_add_up_situation t1" +
|
||||
" LEFT JOIN" +
|
||||
" (SELECT employee_id, MAX(tax_year_month) tax_year_month FROM hrsa_add_up_situation GROUP BY employee_id) t ON" +
|
||||
" t.employee_id = t1.employee_id AND t.tax_year_month = t1.tax_year_month" +
|
||||
" LEFT JOIN hrmresource e ON e.id = t1.employee_id" +
|
||||
" LEFT JOIN hrmdepartment d ON d.id = e.departmentid" +
|
||||
" LEFT JOIN hrsa_tax_agent t2 ON t1.tax_agent_id = t2.id";
|
||||
|
||||
SalaryWeaTable<AddUpSituationDTO> table = new SalaryWeaTable<AddUpSituationDTO>(user, AddUpSituationDTO.class);
|
||||
table.setBackfields(fields);
|
||||
table.setSqlform(fromSql);
|
||||
table.setSqlwhere(makeSqlWhere());
|
||||
table.setSqlorderby("t1.id DESC");
|
||||
table.setSqlprimarykey("t1.id");
|
||||
table.setSqlisdistinct("false");
|
||||
|
||||
WeaResultMsg result = new WeaResultMsg(false);
|
||||
result.putAll(table.makeDataResult());
|
||||
result.success();
|
||||
return result.getResultMap();
|
||||
}
|
||||
|
||||
|
||||
private String makeSqlWhere() {
|
||||
|
||||
AddUpSituationQueryParam queryParam = (AddUpSituationQueryParam) params.get("queryParam");
|
||||
//申报月份
|
||||
List<String> taxYearMonths = queryParam.getTaxYearMonth();
|
||||
if (CollectionUtils.isNotEmpty(taxYearMonths)) {
|
||||
queryParam.setTaxYearMonth(taxYearMonths.stream().map(e -> e + "-01 00:00:00").collect(Collectors.toList()));
|
||||
}
|
||||
|
||||
String sqlWhere = "t1.delete_type = 0 AND t2.delete_type = 0 AND e.status not in (7)";
|
||||
Collection<Long> ids = queryParam.getIds();
|
||||
if (CollectionUtils.isNotEmpty(ids)) {
|
||||
String idsStr = ids.stream().map(String::valueOf).collect(Collectors.joining(","));
|
||||
sqlWhere += " AND t1.id IN (" + idsStr + ")";
|
||||
}
|
||||
Integer year = queryParam.getYear();
|
||||
if (year != null) {
|
||||
sqlWhere += " AND t1.year =" + year;
|
||||
}
|
||||
Long employeeId = queryParam.getEmployeeId();
|
||||
if (employeeId != null) {
|
||||
sqlWhere += " AND t1.employee_id =" + employeeId;
|
||||
}
|
||||
String keyword = queryParam.getKeyword();
|
||||
if (StringUtils.isNotBlank(keyword)) {
|
||||
sqlWhere += " AND (" +
|
||||
" e.lastname like '%" + keyword + "%'" +
|
||||
" OR d.departmentname like '%" + keyword + "%'" +
|
||||
" OR e.workcode like ''%" + keyword + "%'" +
|
||||
" )";
|
||||
}
|
||||
// 税款所属期
|
||||
List<String> taxYearMonth = queryParam.getTaxYearMonth();
|
||||
if (CollectionUtils.isNotEmpty(taxYearMonth)) {
|
||||
if (taxYearMonth.size() == 1) {
|
||||
sqlWhere += " AND t1.tax_year_month = '" + taxYearMonth.get(0) + "'";
|
||||
}
|
||||
if (taxYearMonth.size() == 2) {
|
||||
sqlWhere += " AND (t1.tax_year_month BETWEEN '" + taxYearMonth.get(0) + "' AND '" + taxYearMonth.get(1) + "')";
|
||||
}
|
||||
}
|
||||
//姓名
|
||||
String username = queryParam.getUsername();
|
||||
if (StringUtils.isNotBlank(username)) {
|
||||
sqlWhere += " AND e.lastname like '%" + username + "%'";
|
||||
}
|
||||
//个税扣缴义务人
|
||||
Long taxAgentId = queryParam.getTaxAgentId();
|
||||
if (taxAgentId != null) {
|
||||
sqlWhere += " AND t1.tax_agent_id = " + taxAgentId;
|
||||
}
|
||||
//部门
|
||||
List<Long> departmentIds = queryParam.getDepartmentIds();
|
||||
if (CollectionUtils.isNotEmpty(departmentIds)) {
|
||||
String departmentStrIds = departmentIds.stream().map(String::valueOf).collect(Collectors.joining(","));
|
||||
sqlWhere += " AND d.id IN (" + departmentStrIds + ")";
|
||||
}
|
||||
//工号
|
||||
String jobNum = queryParam.getJobNum();
|
||||
if (StringUtils.isNotBlank(jobNum)) {
|
||||
sqlWhere += " AND e.workcode like '%" + jobNum + "%'";
|
||||
}
|
||||
//入职日期
|
||||
List<Date> hiredate = queryParam.getHiredate();
|
||||
if (CollectionUtils.isNotEmpty(hiredate) && hiredate.size() == 2) {
|
||||
sqlWhere += " AND (e.companystartdate BETWEEN '" + hiredate.get(0) + "' AND '" + hiredate.get(1) + "')";
|
||||
}
|
||||
//手机号
|
||||
String mobile = queryParam.getMobile();
|
||||
if (StringUtils.isNotBlank(mobile)) {
|
||||
sqlWhere += " AND e.mobile like '%" + mobile + "%'";
|
||||
}
|
||||
|
||||
return sqlWhere;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,80 +0,0 @@
|
|||
package com.engine.salary.cmd.datacollection;
|
||||
|
||||
import com.engine.common.biz.AbstractCommonCommand;
|
||||
import com.engine.common.entity.BizLogContext;
|
||||
import com.engine.core.interceptor.CommandContext;
|
||||
import com.engine.salary.entity.datacollection.dto.AddUpSituationDTO;
|
||||
import com.engine.salary.entity.datacollection.param.AddUpSituationImportParam;
|
||||
import com.engine.salary.exception.SalaryRunTimeException;
|
||||
import com.engine.salary.util.excel.ExcelParseHelper;
|
||||
import lombok.SneakyThrows;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.poi.util.IOUtils;
|
||||
import weaver.file.ImageFileManager;
|
||||
import weaver.general.Util;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.io.InputStream;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class AddUpSituationPreviewCmd extends AbstractCommonCommand<Map<String, Object>> {
|
||||
|
||||
protected HttpServletRequest request;
|
||||
|
||||
public AddUpSituationPreviewCmd(Map<String, Object> params, User user) {
|
||||
this.user = user;
|
||||
this.params = params;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public BizLogContext getLogContext() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@SneakyThrows
|
||||
@Override
|
||||
public Map<String, Object> execute(CommandContext commandContext) {
|
||||
Map<String, Object> apidatas = new HashMap<String, Object>();
|
||||
|
||||
//检验参数
|
||||
checkImportParam();
|
||||
|
||||
//导入参数
|
||||
AddUpSituationImportParam importParam = (AddUpSituationImportParam) params.get("importParam");
|
||||
//excel文件id
|
||||
String imageId = Util.null2String(importParam.getImageId());
|
||||
|
||||
InputStream fileInputStream = null;
|
||||
try {
|
||||
fileInputStream = ImageFileManager.getInputStreamById(Integer.valueOf(imageId));
|
||||
List<AddUpSituationDTO> excelDates = ExcelParseHelper.parse2Map(fileInputStream, AddUpSituationDTO.class, 0, 1, 24, "template.xlsx");
|
||||
apidatas.put("preview", excelDates);
|
||||
} finally {
|
||||
IOUtils.closeQuietly(fileInputStream);
|
||||
}
|
||||
return apidatas;
|
||||
}
|
||||
|
||||
private void checkImportParam() {
|
||||
|
||||
AddUpSituationImportParam importParam = (AddUpSituationImportParam) params.get("importParam");
|
||||
|
||||
//excel文件id
|
||||
String imageId = Util.null2String(importParam.getImageId());
|
||||
//税款所属期
|
||||
String declareMonthStr = Util.null2String(importParam.getTaxYearMonth());
|
||||
|
||||
|
||||
if (StringUtils.isBlank(imageId)) {
|
||||
throw new SalaryRunTimeException("文件不存在");
|
||||
}
|
||||
if (StringUtils.isBlank(declareMonthStr)) {
|
||||
throw new SalaryRunTimeException("税款所属期为空");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
package com.engine.salary.constant;
|
||||
|
||||
/**
|
||||
* @Description: 个税扣缴义务人分权
|
||||
* @Author: wangxiangzhong
|
||||
* @Date: 2022/5/2 10:09
|
||||
*/
|
||||
public class TaxAgentPermissionConstant {
|
||||
|
||||
/**
|
||||
* 菜单编码
|
||||
*/
|
||||
public static final String MENU_CODE = "TaxAgent";
|
||||
|
||||
/**
|
||||
* 权限编码-默认权限项
|
||||
*/
|
||||
public static final String ITEM_CODE_DEFAULT = "TaxAgent.default";
|
||||
|
||||
/**
|
||||
* 权限编码-分权开关
|
||||
*/
|
||||
public static final String ITEM_CODE_DEVOLUTION = "TaxAgent.devolution";
|
||||
}
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
package com.engine.salary.entity.agency.bo;
|
||||
|
||||
import com.engine.salary.entity.agency.dto.PaymentAgencyFormDTO;
|
||||
import com.engine.salary.entity.agency.dto.PaymentAgencyListDTO;
|
||||
import com.engine.salary.entity.agency.po.PaymentAgencyPO;
|
||||
import com.engine.salary.enums.sicategory.DeleteTypeEnum;
|
||||
import dm.jdbc.util.IdGenerator;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
public class PaymentAgencyBO {
|
||||
|
||||
// public static Wrapper<PaymentAgencyPO> buildPaymentAgencyListWrapper(Long employeeId, String tenantKey) {
|
||||
// LambdaQueryWrapper<PaymentAgencyPO> lambdaQueryWrapper = Wrappers.lambdaQuery();
|
||||
// lambdaQueryWrapper.eq(PaymentAgencyPO::getTenantKey, tenantKey);
|
||||
// lambdaQueryWrapper.eq(PaymentAgencyPO::getDeleteType, DeleteTypeEnum.NOT_DELETED.getValue());
|
||||
// lambdaQueryWrapper.orderByDesc(PaymentAgencyPO::getUpdateTime);
|
||||
// return lambdaQueryWrapper;
|
||||
// }
|
||||
|
||||
public static List<PaymentAgencyListDTO> buildPaymentAgencyDTOList(List<PaymentAgencyPO> paymentAgencyPOS, Long employeeId, String tenantKey) {
|
||||
if (CollectionUtils.isEmpty(paymentAgencyPOS)) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
return paymentAgencyPOS.stream().map(e -> PaymentAgencyListDTO.builder()
|
||||
.id(e.getId())
|
||||
.agencyName(e.getAgencyName())
|
||||
.remarks(e.getRemarks()).build()
|
||||
).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
public static PaymentAgencyFormDTO buildPaymentAgencyFormDTO(PaymentAgencyPO paymentAgencyPO, Long employeeId, String tenantKey) {
|
||||
PaymentAgencyFormDTO paymentAgencyFormDTO = PaymentAgencyFormDTO.builder().build();
|
||||
paymentAgencyFormDTO.setId(paymentAgencyPO.getId());
|
||||
paymentAgencyFormDTO.setAgencyName(paymentAgencyPO.getAgencyName());
|
||||
paymentAgencyFormDTO.setRemarks(paymentAgencyFormDTO.getRemarks());
|
||||
return paymentAgencyFormDTO;
|
||||
}
|
||||
|
||||
public static PaymentAgencyPO buildPaymentAgencyPO(PaymentAgencyFormDTO paymentAgencyFormDTO, Long employeeId, String tenantKey) {
|
||||
return PaymentAgencyPO.builder()
|
||||
.id(IdGenerator.generate())
|
||||
.agencyName(paymentAgencyFormDTO.getAgencyName())
|
||||
.createTime(LocalDateTime.now())
|
||||
.creator(employeeId)
|
||||
.tenantKey(tenantKey)
|
||||
.deleteType(DeleteTypeEnum.NOT_DELETED.getValue())
|
||||
.updateTime(LocalDateTime.now())
|
||||
.remarks(paymentAgencyFormDTO.getRemarks())
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
package com.engine.salary.entity.agency.dto;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 代缴机构表单
|
||||
* <p>Copyright: Copyright (c) 2022</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class PaymentAgencyFormDTO {
|
||||
|
||||
//主键id")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
// @SalaryForm(
|
||||
// label = "名称",
|
||||
// labelId = 84756,
|
||||
// items = {
|
||||
// @SalaryFormItem(
|
||||
// itemType = WeaFormItemType.INPUT,
|
||||
// required = true,
|
||||
// maxLength = "50"
|
||||
// )
|
||||
// }
|
||||
// )
|
||||
// @NotBlank(message = "name is required")
|
||||
// @Size(max = 50, message = "the maximum lenth is 50")
|
||||
// //名称")
|
||||
private String agencyName;
|
||||
|
||||
// @SalaryForm(
|
||||
// label = "备注",
|
||||
// labelId = 84961,
|
||||
// items = {
|
||||
// @SalaryFormItem(
|
||||
// itemType = WeaFormItemType.TEXTAREA,
|
||||
// maxLength = "50"
|
||||
// )
|
||||
// }
|
||||
// )
|
||||
// @NotBlank(message = "name is required")
|
||||
// @Size(max = 60, message = "the maximum lenth is 60")
|
||||
// //名称")
|
||||
private String remarks;
|
||||
}
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
package com.engine.salary.entity.agency.dto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 代缴机构列表
|
||||
* <p>Copyright: Copyright (c) 2022</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
//@ApiModel("")
|
||||
//@TableOperates(value = {
|
||||
// @Operates(index = 0, text = "编辑", labelId = 87058),
|
||||
// @Operates(index = 1, text = "删除", labelId = 87061)
|
||||
//})
|
||||
public class PaymentAgencyListDTO {
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
// @ApiModelProperty("主键id")
|
||||
// @JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 社保福利代缴机构
|
||||
*/
|
||||
// @WeaFormat(
|
||||
// label = "社保福利代缴机构",
|
||||
// labelId = 112448,
|
||||
// tableColumn = @TableColumn(width = "200")
|
||||
// )
|
||||
// @ApiModelProperty("社保福利代缴机构")
|
||||
private String agencyName;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
// @WeaFormat(
|
||||
// label = "备注",
|
||||
// labelId = 84961,
|
||||
// tableColumn = @TableColumn(width = "300")
|
||||
// )
|
||||
// @ApiModelProperty("备注")
|
||||
private String remarks;
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
package com.engine.salary.entity.agency.po;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
//hrsa_payment_agency
|
||||
public class PaymentAgencyPO {
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 机构名称
|
||||
*/
|
||||
private String agencyName;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remarks;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private Long creator;
|
||||
|
||||
/**
|
||||
* 是否已删除。0:未删除、1:已删除
|
||||
*/
|
||||
private Integer deleteType;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
private String tenantKey;
|
||||
}
|
||||
|
|
@ -83,6 +83,8 @@ public class DataCollectionEmployee {
|
|||
@SalaryFormulaVar(defaultLabel = "出生日期", labelId = 98624, dataType = "string")
|
||||
private String birthday;
|
||||
|
||||
private String idNo;
|
||||
|
||||
//是否是系统管理员
|
||||
private Boolean isAdmin;
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,52 @@
|
|||
package com.engine.salary.entity.datacollection.bo;
|
||||
|
||||
/**
|
||||
* @Description: 数据采集
|
||||
* @Author: wangxiangzhong
|
||||
* @Date: 2021/11/29 13:28
|
||||
*/
|
||||
public class DataCollectionBO {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "DataCollectionBO{}";
|
||||
}
|
||||
|
||||
// /**
|
||||
// * 添加日期范围
|
||||
// *
|
||||
// * @param weaSearchCondition
|
||||
// * @param employeeId
|
||||
// * @param tenantKey
|
||||
// */
|
||||
// public static void addDatePickerRangeOtherParams(WeaSearchCondition weaSearchCondition, String datePickerKey, Long employeeId, String tenantKey) {
|
||||
// WeaSearchConditionItem datePickerItem = weaSearchCondition.getItems().get(datePickerKey);
|
||||
// Map<String, Object> otherParams = Maps.newHashMap();
|
||||
// otherParams.put("isRange", true);
|
||||
// otherParams.put("type", "day");
|
||||
// otherParams.put("startPlaceholder", SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 90648, "开始日期"));
|
||||
// otherParams.put("endPlaceholder", SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 90649, "结束日期"));
|
||||
// datePickerItem.setOtherParams(otherParams);
|
||||
// weaSearchCondition.getItems().put(datePickerKey, datePickerItem);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 获取身份证号
|
||||
// *
|
||||
// * @param employeeId
|
||||
// * @param simpleUserInfos
|
||||
// */
|
||||
// public static String getIdNo(Long employeeId, List<DataCollectionEmployee> simpleUserInfos) {
|
||||
// if (employeeId == null || CollectionUtils.isEmpty(simpleUserInfos)) {
|
||||
// return StringUtils.EMPTY;
|
||||
// }
|
||||
// Optional<SimpleUserInfo> optionalSimpleUserInfo = simpleUserInfos.stream()
|
||||
// .filter(simpleUserInfo -> Objects.nonNull(simpleUserInfo) && Objects.nonNull(simpleUserInfo.getUser())).findFirst();
|
||||
// String idNo = StringUtils.EMPTY;
|
||||
// if (optionalSimpleUserInfo.isPresent()) {
|
||||
// SimpleUserInfo simpleUserInfo = optionalSimpleUserInfo.get();
|
||||
// idNo = Optional.of(simpleUserInfo).map(SimpleUserInfo::getIdNo).orElse(StringUtils.EMPTY);
|
||||
// }
|
||||
// return idNo;
|
||||
// }
|
||||
}
|
||||
|
|
@ -4,6 +4,7 @@ import com.cloudstore.eccom.pc.table.WeaTableType;
|
|||
import com.engine.salary.annotation.SalaryTable;
|
||||
import com.engine.salary.annotation.SalaryTableColumn;
|
||||
import com.engine.salary.annotation.SalaryTableOperate;
|
||||
import com.engine.salary.annotation.TableTitle;
|
||||
import com.engine.salary.util.excel.ExcelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
|
@ -44,6 +45,7 @@ public class AddUpDeductionDTO {
|
|||
*/
|
||||
@ExcelProperty(index = 0)
|
||||
@SalaryTableColumn(text = "姓名", width = "10%", column = "username")
|
||||
@TableTitle(title = "姓名", dataIndex = "username", key = "username")
|
||||
private String username;
|
||||
|
||||
/**
|
||||
|
|
@ -51,13 +53,20 @@ public class AddUpDeductionDTO {
|
|||
*/
|
||||
@ExcelProperty(index = 1)
|
||||
@SalaryTableColumn(text = "个税扣缴义务人", width = "10%", column = "taxAgentName")
|
||||
@TableTitle(title = "个税扣缴义务人", dataIndex = "taxAgentName", key = "taxAgentName")
|
||||
private String taxAgentName;
|
||||
|
||||
/**
|
||||
* 个税扣缴义务人id
|
||||
*/
|
||||
private Long taxAgentId;
|
||||
|
||||
/**
|
||||
* 部门
|
||||
*/
|
||||
@ExcelProperty(index = 2)
|
||||
@SalaryTableColumn(text = "部门", width = "10%", column = "departmentName")
|
||||
@TableTitle(title = "部门", dataIndex = "departmentName", key = "departmentName")
|
||||
private String departmentName;
|
||||
|
||||
/**
|
||||
|
|
@ -65,6 +74,7 @@ public class AddUpDeductionDTO {
|
|||
*/
|
||||
@ExcelProperty(index = 3)
|
||||
@SalaryTableColumn(text = "手机号", width = "10%", column = "mobile")
|
||||
@TableTitle(title = "手机号", dataIndex = "mobile", key = "mobile")
|
||||
private String mobile;
|
||||
|
||||
/**
|
||||
|
|
@ -72,6 +82,7 @@ public class AddUpDeductionDTO {
|
|||
*/
|
||||
@ExcelProperty(index = 4)
|
||||
@SalaryTableColumn(text = "工号", width = "10%", column = "jobNum")
|
||||
@TableTitle(title = "工号", dataIndex = "jobNum", key = "jobNum")
|
||||
private String jobNum;
|
||||
|
||||
/**
|
||||
|
|
@ -79,6 +90,7 @@ public class AddUpDeductionDTO {
|
|||
*/
|
||||
@ExcelProperty(index = 5)
|
||||
@SalaryTableColumn(text = "证件号码", width = "10%", column = "idNo")
|
||||
@TableTitle(title = "证件号码", dataIndex = "idNo", key = "idNo")
|
||||
private String idNo;
|
||||
|
||||
/**
|
||||
|
|
@ -87,6 +99,7 @@ public class AddUpDeductionDTO {
|
|||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@ExcelProperty(index = 6, msg = "第7列,入职日期解析错误,标准格式应为yyyy-MM-dd,例如:2022-01-01")
|
||||
@SalaryTableColumn(text = "入职日期", width = "10%", column = "hiredate")
|
||||
@TableTitle(title = "入职日期", dataIndex = "hiredate", key = "hiredate")
|
||||
private String hiredate;
|
||||
|
||||
/**
|
||||
|
|
@ -94,6 +107,7 @@ public class AddUpDeductionDTO {
|
|||
*/
|
||||
@ExcelProperty(index = 7, msg = "第8列,累计子女教育解析错误,请输入数字")
|
||||
@SalaryTableColumn(text = "累计子女教育", width = "10%", column = "addUpChildEducation")
|
||||
@TableTitle(title = "累计子女教育", dataIndex = "addUpChildEducation", key = "addUpChildEducation")
|
||||
private String addUpChildEducation;
|
||||
|
||||
/**
|
||||
|
|
@ -101,6 +115,7 @@ public class AddUpDeductionDTO {
|
|||
*/
|
||||
@ExcelProperty(index = 8, msg = "第9列,累计继续教育教育解析错误,请输入数字")
|
||||
@SalaryTableColumn(text = "累计继续教育", width = "10%", column = "addUpContinuingEducation")
|
||||
@TableTitle(title = "累计继续教育", dataIndex = "addUpContinuingEducation", key = "addUpContinuingEducation")
|
||||
private String addUpContinuingEducation;
|
||||
|
||||
/**
|
||||
|
|
@ -108,6 +123,7 @@ public class AddUpDeductionDTO {
|
|||
*/
|
||||
@ExcelProperty(index = 9, msg = "第10列,累计住房贷款利息解析错误,请输入数字")
|
||||
@SalaryTableColumn(text = "累计住房贷款利息", width = "10%", column = "addUpHousingLoanInterest")
|
||||
@TableTitle(title = "累计住房贷款利息", dataIndex = "addUpHousingLoanInterest", key = "addUpHousingLoanInterest")
|
||||
private String addUpHousingLoanInterest;
|
||||
|
||||
/**
|
||||
|
|
@ -115,6 +131,7 @@ public class AddUpDeductionDTO {
|
|||
*/
|
||||
@ExcelProperty(index = 10, msg = "第11列,累计住房租金解析错误,请输入数字")
|
||||
@SalaryTableColumn(text = "累计住房租金", width = "10%", column = "addUpHousingRent")
|
||||
@TableTitle(title = "累计住房租金", dataIndex = "addUpHousingRent", key = "addUpHousingRent")
|
||||
private String addUpHousingRent;
|
||||
|
||||
/**
|
||||
|
|
@ -122,6 +139,7 @@ public class AddUpDeductionDTO {
|
|||
*/
|
||||
@ExcelProperty(index = 11, msg = "第12列,累计赡养老人解析错误,请输入数字")
|
||||
@SalaryTableColumn(text = "累计赡养老人", width = "10%", column = "addUpSupportElderly")
|
||||
@TableTitle(title = "累计赡养老人", dataIndex = "addUpSupportElderly", key = "addUpSupportElderly")
|
||||
private String addUpSupportElderly;
|
||||
|
||||
/**
|
||||
|
|
@ -129,12 +147,15 @@ public class AddUpDeductionDTO {
|
|||
*/
|
||||
@ExcelProperty(index = 12, msg = "第13列,累计大病医疗解析错误,请输入数字")
|
||||
@SalaryTableColumn(text = "累计大病医疗", width = "10%", column = "addUpIllnessMedical")
|
||||
@TableTitle(title = "累计大病医疗", dataIndex = "addUpIllnessMedical", key = "addUpIllnessMedical")
|
||||
private String addUpIllnessMedical;
|
||||
|
||||
@ExcelProperty(index = 13, msg = "第14列,累计婴幼儿照护解析错误,请输入数字")
|
||||
@SalaryTableColumn(text = "累计婴幼儿照护", width = "10%", column = "addUpInfantCare")
|
||||
@TableTitle(title = "累计婴幼儿照护", dataIndex = "addUpInfantCare", key = "addUpInfantCare")
|
||||
private String addUpInfantCare;
|
||||
|
||||
@SalaryTableColumn(text = "操作", width = "20%", column = "operate")
|
||||
@TableTitle(title = "操作", dataIndex = "operate", key = "operate")
|
||||
private String operate;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,6 +42,11 @@ public class AddUpDeductionRecordDTO {
|
|||
@ExcelProperty(index = 2)
|
||||
private String taxAgentName;
|
||||
|
||||
/**
|
||||
* 个税扣缴义务人id
|
||||
*/
|
||||
private Long taxAgentId;
|
||||
|
||||
|
||||
//部门
|
||||
@SalaryTableColumn(text = "部门", width = "10%", column = "departmentName")
|
||||
|
|
|
|||
|
|
@ -50,6 +50,11 @@ public class AddUpSituationDTO {
|
|||
@ExcelProperty(index = 1)
|
||||
private String taxAgentName;
|
||||
|
||||
/**
|
||||
* 个税扣缴义务人id
|
||||
*/
|
||||
private Long taxAgentId;
|
||||
|
||||
//部门
|
||||
@SalaryTableColumn(text = "部门", width = "10%", column = "departmentName")
|
||||
@ExcelProperty(index = 2)
|
||||
|
|
|
|||
|
|
@ -45,6 +45,11 @@ public class AddUpSituationRecordDTO {
|
|||
@ExcelProperty(index = 2)
|
||||
private String taxAgentName;
|
||||
|
||||
/**
|
||||
* 个税扣缴义务人id
|
||||
*/
|
||||
private Long taxAgentId;
|
||||
|
||||
@SalaryTableColumn(text = "部门", width = "10%", column = "departmentName")
|
||||
@ExcelProperty(index = 3)
|
||||
private String departmentName;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.engine.salary.entity.datacollection.param;
|
||||
|
||||
import com.engine.salary.common.BaseQueryParam;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
|
@ -21,7 +22,7 @@ import java.util.List;
|
|||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class AddUpDeductionQueryParam {
|
||||
public class AddUpDeductionQueryParam extends BaseQueryParam {
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.engine.salary.entity.datacollection.param;
|
||||
|
||||
import com.engine.salary.common.BaseQueryParam;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
|
@ -16,7 +17,7 @@ import java.util.List;
|
|||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class AddUpSituationQueryParam{
|
||||
public class AddUpSituationQueryParam extends BaseQueryParam {
|
||||
|
||||
//主键id
|
||||
private Collection<Long> ids;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,32 @@
|
|||
package com.engine.salary.entity.datacollection.param;
|
||||
|
||||
import com.engine.salary.util.valid.DataCheck;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.YearMonth;
|
||||
|
||||
/**
|
||||
* 考勤引用是否可以操作参数
|
||||
* <p>Copyright: Copyright (c) 2022</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class AttendQuoteCheckOperationParam {
|
||||
|
||||
//薪资所属月
|
||||
@DataCheck(require = true, message = "薪资所属月必传")
|
||||
private YearMonth salaryYearMonth;
|
||||
|
||||
//关联账套id
|
||||
@DataCheck(require = true, message = "关联账套id必传")
|
||||
private Long salarySobId;
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package com.engine.salary.entity.hrm;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class HrmStatus {
|
||||
String id;
|
||||
|
||||
String name;
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package com.engine.salary.entity.hrm;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 分部信息
|
||||
* <p>Copyright: Copyright (c) 2022</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class SubCompanyInfo {
|
||||
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private String name;
|
||||
}
|
||||
|
|
@ -54,6 +54,7 @@ public class SalarySobBO {
|
|||
.updateTime(now)
|
||||
.deleteType(NumberUtils.INTEGER_ZERO)
|
||||
.tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY)
|
||||
.taxAgentId(saveParam.getTaxAgentId())
|
||||
.build();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -33,6 +33,12 @@ public class SalarySobBasicSaveParam {
|
|||
@DataCheck(require = true, max = 40, message = "名称不允许为空且不能超过40个字符长度")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 个税扣缴义务人的主键id
|
||||
*/
|
||||
@DataCheck(require = true, message = "个税扣缴义务人的主键id不允许为空")
|
||||
private Long taxAgentId;
|
||||
|
||||
/**
|
||||
* 薪资类型不允许为空
|
||||
*
|
||||
|
|
|
|||
|
|
@ -27,6 +27,12 @@ public class SalarySobPO {
|
|||
* 名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 个税扣缴义务人的主键id
|
||||
*/
|
||||
private Long taxAgentId;
|
||||
|
||||
/**
|
||||
* 应税项目。1:正常工资薪金所得
|
||||
*/
|
||||
|
|
@ -85,5 +91,6 @@ public class SalarySobPO {
|
|||
private String tenantKey;
|
||||
|
||||
Collection<Long> ids;
|
||||
Collection<Long> taxAgentIds;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,434 @@
|
|||
package com.engine.salary.entity.taxagent.bo;
|
||||
|
||||
import com.cloudstore.eccom.pc.table.WeaTable;
|
||||
import com.cloudstore.eccom.pc.table.WeaTableColumn;
|
||||
import com.cloudstore.eccom.pc.table.WeaTableOperate;
|
||||
import com.cloudstore.eccom.pc.table.WeaTableOperates;
|
||||
import com.engine.salary.constant.SalaryDefaultTenantConstant;
|
||||
import com.engine.salary.entity.agency.po.PaymentAgencyPO;
|
||||
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
||||
import com.engine.salary.entity.hrm.DeptInfo;
|
||||
import com.engine.salary.entity.hrm.HrmStatus;
|
||||
import com.engine.salary.entity.hrm.PositionInfo;
|
||||
import com.engine.salary.entity.hrm.SubCompanyInfo;
|
||||
import com.engine.salary.entity.taxagent.dto.TaxAgentEmployeeDTO;
|
||||
import com.engine.salary.entity.taxagent.dto.TaxAgentListDTO;
|
||||
import com.engine.salary.entity.taxagent.dto.TaxAgentManageRangeListDTO;
|
||||
import com.engine.salary.entity.taxagent.dto.TaxAgentSubAdminListDTO;
|
||||
import com.engine.salary.entity.taxagent.param.TaxAgentManageRangeSaveParam;
|
||||
import com.engine.salary.entity.taxagent.param.TaxAgentSaveParam;
|
||||
import com.engine.salary.entity.taxagent.param.TaxAgentSubAdminRangeSaveParam;
|
||||
import com.engine.salary.entity.taxagent.po.TaxAgentAdminPO;
|
||||
import com.engine.salary.entity.taxagent.po.TaxAgentManageRangePO;
|
||||
import com.engine.salary.entity.taxagent.po.TaxAgentPO;
|
||||
import com.engine.salary.entity.taxagent.po.TaxAgentSubAdminPO;
|
||||
import com.engine.salary.enums.salarysob.TargetTypeEnum;
|
||||
import com.engine.salary.enums.taxagent.TaxAgentRangeTypeEnum;
|
||||
import com.engine.salary.util.JsonUtil;
|
||||
import com.engine.salary.util.SalaryEntityUtil;
|
||||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
import com.google.common.base.Joiner;
|
||||
import com.google.common.collect.Lists;
|
||||
import dm.jdbc.util.IdGenerator;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 个税扣缴义务人
|
||||
* <p>Copyright: Copyright (c) 2022</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
public class TaxAgentBO {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "TaxAgentBO{}";
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据个税扣缴义务人id和用户id判断是否匹配
|
||||
*
|
||||
* @param taxAgentEmployees
|
||||
* @param taxAgentId
|
||||
* @param employeeId
|
||||
* @return
|
||||
*/
|
||||
public static boolean checkTaxAgentAndEmployee(List<TaxAgentEmployeeDTO> taxAgentEmployees, Long taxAgentId, Long employeeId) {
|
||||
if (CollectionUtils.isEmpty(taxAgentEmployees) && taxAgentId == null) {
|
||||
return false;
|
||||
}
|
||||
return taxAgentEmployees.stream().anyMatch(t -> t.getTaxAgentId().equals(taxAgentId) && employeeId.equals(t.getEmployeeId()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 构建表格
|
||||
*
|
||||
* @param weaTable
|
||||
* @param isOpenDevolution
|
||||
*/
|
||||
public static void buildTaxAgentTable(WeaTable weaTable, boolean isOpenDevolution) {
|
||||
// 表格表头
|
||||
List<WeaTableColumn> columns = new ArrayList<>();
|
||||
String name = SalaryI18nUtil.getI18nLabel(91558, "个税扣缴义务人名称");
|
||||
String employeeRange = SalaryI18nUtil.getI18nLabel(86125, "人员范围");
|
||||
String admins = SalaryI18nUtil.getI18nLabel(106259, "管理员");
|
||||
String subAdmins = SalaryI18nUtil.getI18nLabel(106283, "分管理员");
|
||||
// String paymentAgency = SalaryI18nUtil.getI18nLabel(112448, "社保福利代缴机构");
|
||||
String description = SalaryI18nUtil.getI18nLabel(84961, "备注");
|
||||
if (isOpenDevolution) {
|
||||
columns.add(new WeaTableColumn(name, "name", "20%"));
|
||||
columns.add(new WeaTableColumn(employeeRange, "employeeRange", "20%"));
|
||||
columns.add(new WeaTableColumn(admins, "admins", "20%"));
|
||||
// columns.add(new WeaTableColumn(subAdmins, "subAdmins", "20%"));
|
||||
// columns.add(new WeaTableColumn(paymentAgency, "paymentAgency", "30%"));
|
||||
columns.add(new WeaTableColumn(description, "description", "20%"));
|
||||
} else {
|
||||
columns.add(new WeaTableColumn(name, "name", "40%"));
|
||||
columns.add(new WeaTableColumn(employeeRange, "employeeRange", "20%"));
|
||||
// columns.add(new WeaTableColumn(paymentAgency, "paymentAgency", "30%"));
|
||||
columns.add(new WeaTableColumn(description, "description", "40%"));
|
||||
}
|
||||
weaTable.setColumns(columns);
|
||||
|
||||
WeaTableOperates operates = weaTable.getOperates();
|
||||
operates.getOperate().add(new WeaTableOperate(SalaryI18nUtil.getI18nLabel(59943, "编辑"), null, "0"));
|
||||
operates.getOperate().add(new WeaTableOperate(SalaryI18nUtil.getI18nLabel(59942, "删除"), null, "1"));
|
||||
// if (isOpenDevolution) {
|
||||
// operates.add(new WeaTableOperate(SalaryI18nUtil.getI18nLabel( 106247, "管理范围及分权设置"), 2));
|
||||
// }
|
||||
// weaTable.setOperatesPermission(getDefaultOperatesPermission(operates.getOperate().size(), size));
|
||||
// weaTable.setCheckBoxPermission(getDefaultCheckBoxPermission(size));
|
||||
//
|
||||
// weaTable.setTableType(WeaTableTypeEnum.CHECKBOX);
|
||||
}
|
||||
|
||||
// private static List<List<Permission>> getDefaultOperatesPermission(int operateSize, int recordSize) {
|
||||
// List<List<Permission>> permissionList = Lists.newArrayList();
|
||||
// for (int i = 0; i < recordSize; i++) {
|
||||
// List<Permission> permissions = Lists.newArrayList();
|
||||
// for (int j = 0; j < operateSize; j++) {
|
||||
// permissions.add(new Permission(true, false));
|
||||
// }
|
||||
// permissionList.add(permissions);
|
||||
// }
|
||||
// return permissionList;
|
||||
// }
|
||||
//
|
||||
// private static List<Permission> getDefaultCheckBoxPermission(int recordSize) {
|
||||
// List<Permission> permissionList = Lists.newArrayList();
|
||||
// for (int i = 0; i < recordSize; i++) {
|
||||
// permissionList.add(new Permission(true, false));
|
||||
// }
|
||||
// return permissionList;
|
||||
// }
|
||||
|
||||
/**
|
||||
* 表数据转列表数据
|
||||
*
|
||||
* @param taxAgents
|
||||
* @return
|
||||
*/
|
||||
public static List<TaxAgentListDTO> convertToListDTO(Collection<TaxAgentPO> taxAgents) {
|
||||
if (CollectionUtils.isEmpty(taxAgents)) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
return taxAgents.stream()
|
||||
.map(e -> TaxAgentListDTO.builder()
|
||||
.id(e.getId())
|
||||
.name(e.getName())
|
||||
.description(e.getDescription())
|
||||
.build())
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
/**
|
||||
* 表数据转列表数据
|
||||
*
|
||||
* @param taxAgents
|
||||
* @return
|
||||
*/
|
||||
public static List<Map<String, Object>> convertToTableListDTO(List<TaxAgentPO> taxAgents, List<PaymentAgencyPO> paymentAgencyPOS, String setLabel) {
|
||||
return convertToTableListDTO(Boolean.FALSE, taxAgents, paymentAgencyPOS, null, null, setLabel);
|
||||
}
|
||||
|
||||
/**
|
||||
* 表数据转列表数据
|
||||
*
|
||||
* @param taxAgents
|
||||
* @return
|
||||
*/
|
||||
public static List<Map<String, Object>> convertToTableListDTO(List<TaxAgentPO> taxAgents, List<PaymentAgencyPO> paymentAgencyPOS, List<TaxAgentAdminPO> taxAgentAdmins,
|
||||
List<DataCollectionEmployee> adminList,
|
||||
String setLabel) {
|
||||
return convertToTableListDTO(Boolean.TRUE, taxAgents, paymentAgencyPOS, taxAgentAdmins, adminList, setLabel);
|
||||
}
|
||||
|
||||
/**
|
||||
* 表数据转列表数据
|
||||
*
|
||||
* @param taxAgents
|
||||
* @param adminList
|
||||
* @return
|
||||
*/
|
||||
public static List<Map<String, Object>> convertToTableListDTO(Boolean isDevolution, List<TaxAgentPO> taxAgents, List<PaymentAgencyPO> paymentAgencyPOS,
|
||||
List<TaxAgentAdminPO> taxAgentAdmins,
|
||||
List<DataCollectionEmployee> adminList, String setLabel) {
|
||||
if (CollectionUtils.isEmpty(taxAgents)) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
return taxAgents.stream()
|
||||
.map(e -> {
|
||||
Map<String, Object> map = new LinkedHashMap<>();
|
||||
map.put("id", e.getId());
|
||||
map.put("name", e.getName());
|
||||
map.put("employeeRange", setLabel);
|
||||
if (isDevolution) {
|
||||
List<Long> empIds = taxAgentAdmins.stream().filter(t -> t.getTaxAgentId().equals(e.getId())).map(TaxAgentAdminPO::getEmployeeId).collect(Collectors.toList());
|
||||
List<String> admins = adminList.stream().filter(a -> empIds.contains(a.getEmployeeId())).map(DataCollectionEmployee::getUsername).collect(Collectors.toList());
|
||||
map.put("admins", CollectionUtils.isEmpty(admins) ? "" : Joiner.on(",").join((Iterable<?>) admins));
|
||||
map.put("subAdmins", setLabel);
|
||||
}
|
||||
map.put("paymentAgency", buildPaymentAgency(e.getPaymentAgency(), paymentAgencyPOS));
|
||||
map.put("description", e.getDescription());
|
||||
return map;
|
||||
}).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
public static List<Map<String, Object>> buildPaymentAgency(String originStr, List<PaymentAgencyPO> paymentAgencyPOS) {
|
||||
List<Map<String, Object>> paymentAgencyList = new ArrayList<>();
|
||||
if (CollectionUtils.isEmpty(paymentAgencyPOS)) {
|
||||
return paymentAgencyList;
|
||||
}
|
||||
originStr = StringUtils.isBlank(originStr) ? "" : originStr;
|
||||
String finalOriginStr = originStr;
|
||||
return paymentAgencyPOS.stream().map(e -> {
|
||||
HashMap<String, Object> temp = new HashMap<>();
|
||||
temp.put("id", e.getId());
|
||||
temp.put("agencyName", e.getAgencyName());
|
||||
if (finalOriginStr.contains(String.valueOf(e.getId()))) {
|
||||
temp.put("status", true);
|
||||
} else {
|
||||
temp.put("status", false);
|
||||
}
|
||||
return temp;
|
||||
}).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存参数转表数据
|
||||
*
|
||||
* @param saveParam
|
||||
* @param employeeId
|
||||
* @return
|
||||
*/
|
||||
public static TaxAgentPO convertToPO(TaxAgentSaveParam saveParam, Long employeeId) {
|
||||
if (saveParam == null) {
|
||||
return null;
|
||||
}
|
||||
Date now = new Date();
|
||||
return TaxAgentPO.builder()
|
||||
.id(saveParam.getId())
|
||||
.name(saveParam.getName())
|
||||
.description(saveParam.getDescription())
|
||||
.createTime(now)
|
||||
.updateTime(now)
|
||||
.creator(employeeId)
|
||||
.deleteType(0)
|
||||
.tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY)
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 表数据转列表数据(分管理员)
|
||||
*
|
||||
* @param list
|
||||
* @param range
|
||||
* @param subAdminList
|
||||
* @return
|
||||
*/
|
||||
public static List<TaxAgentSubAdminListDTO> convertToSubAdminListDTO(List<TaxAgentSubAdminPO> list, String range, List<DataCollectionEmployee> subAdminList) {
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
return list.stream()
|
||||
.map(e -> {
|
||||
Optional<String> optionalUsername = subAdminList.stream().filter(a -> e.getEmployeeId().equals(a.getEmployeeId())).map(DataCollectionEmployee::getUsername).findFirst();
|
||||
return TaxAgentSubAdminListDTO.builder()
|
||||
.id(e.getId())
|
||||
.subAdmin(optionalUsername.isPresent() ? optionalUsername.get() : "")
|
||||
.range(range)
|
||||
.description(e.getRemark())
|
||||
.build();
|
||||
})
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
/**
|
||||
* 管理范围列表转换
|
||||
*
|
||||
* @param taxAgentManageRanges
|
||||
* @param employeeComInfos
|
||||
* @param departmentComInfos
|
||||
* @param subDepartmentComInfos
|
||||
* @param positionComInfos
|
||||
* @param hrmStatusList
|
||||
* @return
|
||||
*/
|
||||
public static List<TaxAgentManageRangeListDTO> convert2ListDTO(List<TaxAgentManageRangePO> taxAgentManageRanges, List<DataCollectionEmployee> employeeComInfos,
|
||||
List<DeptInfo> departmentComInfos, List<SubCompanyInfo> subDepartmentComInfos,
|
||||
List<PositionInfo> positionComInfos, List<HrmStatus> hrmStatusList) {
|
||||
if (CollectionUtils.isEmpty(taxAgentManageRanges)) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
Map<Long, String> employeeComInfoMap = SalaryEntityUtil.convert2Map(employeeComInfos, DataCollectionEmployee::getEmployeeId, DataCollectionEmployee::getUsername);
|
||||
Map<Long, String> departmentComInfoMap = SalaryEntityUtil.convert2Map(departmentComInfos, DeptInfo::getId, DeptInfo::getName);
|
||||
Map<Long, String> subDepartmentComInfoMap = SalaryEntityUtil.convert2Map(subDepartmentComInfos, SubCompanyInfo::getId, SubCompanyInfo::getName);
|
||||
Map<Long, String> positionComInfoMap = SalaryEntityUtil.convert2Map(positionComInfos, PositionInfo::getId, PositionInfo::getName);
|
||||
|
||||
Map<String, String> hrmStatusNameMap = SalaryEntityUtil.convert2Map(hrmStatusList, hrmStatus -> String.valueOf(hrmStatus.getId()), HrmStatus::getName);
|
||||
|
||||
return taxAgentManageRanges.stream()
|
||||
.map(taxAgentManageRange -> {
|
||||
TargetTypeEnum targetTypeEnum = TargetTypeEnum.parseByValue(taxAgentManageRange.getTargetType());
|
||||
return TaxAgentManageRangeListDTO.builder()
|
||||
.id(taxAgentManageRange.getId())
|
||||
.targetType(targetTypeEnum)
|
||||
.targetTypeName(Optional.ofNullable(targetTypeEnum)
|
||||
.map(e -> SalaryI18nUtil.getI18nLabel(e.getLabelId(), e.getDefaultLabel()))
|
||||
.orElse(StringUtils.EMPTY))
|
||||
.targetId(taxAgentManageRange.getTargetId())
|
||||
.targetName(buildTargetName(taxAgentManageRange, employeeComInfoMap, departmentComInfoMap, subDepartmentComInfoMap, positionComInfoMap))
|
||||
.employeeStatus(buildEmployeeStatus(hrmStatusNameMap, taxAgentManageRange.getEmployeeStatus()))
|
||||
.build();
|
||||
})
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
private static String buildEmployeeStatus(Map<String, String> hrmStatusNameMap, String employeeStatus) {
|
||||
List<String> employeeStatusList = JsonUtil.parseList(employeeStatus, String.class);
|
||||
if (CollectionUtils.isEmpty(employeeStatusList)) {
|
||||
return StringUtils.EMPTY;
|
||||
}
|
||||
return employeeStatusList.stream()
|
||||
.map(hrmStatusNameMap::get)
|
||||
.collect(Collectors.joining(","));
|
||||
}
|
||||
|
||||
/**
|
||||
* 构建对象名
|
||||
*
|
||||
* @param taxAgentManageRange
|
||||
* @param employeeComInfoMap
|
||||
* @param departmentComInfoMap
|
||||
* @param subDepartmentComInfoMap
|
||||
* @param positionComInfoMap
|
||||
* @return
|
||||
*/
|
||||
private static String buildTargetName(TaxAgentManageRangePO taxAgentManageRange, Map<Long, String> employeeComInfoMap, Map<Long, String> departmentComInfoMap,
|
||||
Map<Long, String> subDepartmentComInfoMap, Map<Long, String> positionComInfoMap) {
|
||||
TargetTypeEnum targetTypeEnum = TargetTypeEnum.parseByValue(taxAgentManageRange.getTargetType());
|
||||
if (Objects.isNull(targetTypeEnum)) {
|
||||
return StringUtils.EMPTY;
|
||||
}
|
||||
switch (targetTypeEnum) {
|
||||
case EMPLOYEE:
|
||||
return employeeComInfoMap.getOrDefault(taxAgentManageRange.getTargetId(), StringUtils.EMPTY);
|
||||
case DEPT:
|
||||
return departmentComInfoMap.getOrDefault(taxAgentManageRange.getTargetId(), StringUtils.EMPTY);
|
||||
case SUBCOMPANY:
|
||||
return subDepartmentComInfoMap.getOrDefault(taxAgentManageRange.getTargetId(), StringUtils.EMPTY);
|
||||
case POSITION:
|
||||
return positionComInfoMap.getOrDefault(taxAgentManageRange.getTargetId(), StringUtils.EMPTY);
|
||||
default:
|
||||
return StringUtils.EMPTY;
|
||||
}
|
||||
}
|
||||
|
||||
public static Result handleTaxAgentRange(List<TaxAgentManageRangePO> taxAgentManageRanges, TaxAgentManageRangeSaveParam saveParam, Long taxAgentId, Long employeeId
|
||||
) {
|
||||
return handleManageRange(taxAgentManageRanges, saveParam, TaxAgentRangeTypeEnum.TAXAGENT, taxAgentId, 0L, employeeId);
|
||||
}
|
||||
|
||||
public static Result handleSubAdminRange(List<TaxAgentManageRangePO> taxAgentManageRanges, TaxAgentManageRangeSaveParam saveParam, Long taxAgentId, Long subAdminId,
|
||||
Long employeeId) {
|
||||
return handleManageRange(taxAgentManageRanges, saveParam, TaxAgentRangeTypeEnum.SUBADMIN, taxAgentId, subAdminId, employeeId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理前端传回的保存参数,转换成对应的po(如果保存参数中的人员、部门、岗位等之前就已经添加过了,就不需要再次保存了)
|
||||
*
|
||||
* @param taxAgentManageRanges
|
||||
* @param saveParam
|
||||
* @param taxAgentId
|
||||
* @param subAdminId
|
||||
* @param employeeId
|
||||
* @return
|
||||
*/
|
||||
private static Result handleManageRange(List<TaxAgentManageRangePO> taxAgentManageRanges, TaxAgentManageRangeSaveParam saveParam,
|
||||
TaxAgentRangeTypeEnum rangeTypeEnum, Long taxAgentId, Long subAdminId, Long employeeId) {
|
||||
Date now = new Date();
|
||||
Result handleResult = Result.builder()
|
||||
.needInsertTaxAgentManageRanges(Lists.newArrayList())
|
||||
.needUpdateTaxAgentManageRanges(Lists.newArrayList())
|
||||
.build();
|
||||
if (CollectionUtils.isEmpty(saveParam.getTargetParams())) {
|
||||
return handleResult;
|
||||
}
|
||||
Map<String, TaxAgentManageRangePO> taxAgentManageRangeMap = SalaryEntityUtil.convert2Map(taxAgentManageRanges,
|
||||
e -> e.getIncludeType() + "-" + e.getTargetType() + "-" + e.getTargetId() + "-" + e.getRangeType());
|
||||
for (TaxAgentSubAdminRangeSaveParam.TaxAgentSubAdminRangeTargetParam targetParam : saveParam.getTargetParams()) {
|
||||
String key = saveParam.getIncludeType() + "-" + targetParam.getTargetType().getValue() + "-" + targetParam.getTargetId() + "-" + rangeTypeEnum.getValue();
|
||||
if (taxAgentManageRangeMap.containsKey(key)) {
|
||||
TaxAgentManageRangePO taxAgentManageRange = taxAgentManageRangeMap.get(key);
|
||||
taxAgentManageRange.setEmployeeStatus(JsonUtil.toJsonString(saveParam.getEmployeeStatus()));
|
||||
taxAgentManageRange.setUpdateTime(now);
|
||||
handleResult.getNeedUpdateTaxAgentManageRanges().add(taxAgentManageRange);
|
||||
continue;
|
||||
}
|
||||
TaxAgentManageRangePO taxAgentManageRange = TaxAgentManageRangePO.builder()
|
||||
.id(IdGenerator.generate())
|
||||
.taxAgentId(taxAgentId)
|
||||
.taxAgentSubAdminId(subAdminId)
|
||||
.rangeType(rangeTypeEnum.getValue())
|
||||
.targetType(targetParam.getTargetType().getValue())
|
||||
.targetId(targetParam.getTargetId())
|
||||
.employeeStatus(JsonUtil.toJsonString(saveParam.getEmployeeStatus()))
|
||||
.includeType(saveParam.getIncludeType())
|
||||
.creator(employeeId)
|
||||
.createTime(now)
|
||||
.updateTime(now)
|
||||
.tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY)
|
||||
.deleteType(0)
|
||||
.build();
|
||||
handleResult.getNeedInsertTaxAgentManageRanges().add(taxAgentManageRange);
|
||||
}
|
||||
return handleResult;
|
||||
}
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public static class Result {
|
||||
|
||||
/**
|
||||
* 需要更新的人员范围
|
||||
*/
|
||||
private Collection<TaxAgentManageRangePO> needUpdateTaxAgentManageRanges;
|
||||
|
||||
/**
|
||||
* 需要新增的人员范围
|
||||
*/
|
||||
private Collection<TaxAgentManageRangePO> needInsertTaxAgentManageRanges;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,99 @@
|
|||
//package com.engine.salary.entity.taxagent.dto;
|
||||
//
|
||||
//import com.weaver.common.component.search.item.WeaSearchConditionItemType;
|
||||
//import com.weaver.common.component.search.item.WeaSearchConditionOption;
|
||||
//import com.weaver.hrm.salary.annotation.SalarySearchCondition;
|
||||
//import com.weaver.hrm.salary.annotation.SalarySearchConditionItem;
|
||||
//import com.weaver.hrm.salary.enums.SalaryUserStatusEnum;
|
||||
//import com.weaver.hrm.salary.enums.salaryarchive.SalaryArchiveTaxAgentAdjustReasonEnum;
|
||||
//import com.weaver.hrm.salary.util.SalaryI18nUtil;
|
||||
//import com.weaver.teams.security.context.TenantContext;
|
||||
//import com.weaver.teams.security.context.UserContext;
|
||||
//import lombok.AllArgsConstructor;
|
||||
//import lombok.Builder;
|
||||
//import lombok.Data;
|
||||
//import lombok.NoArgsConstructor;
|
||||
//
|
||||
//import java.util.Arrays;
|
||||
//import java.util.List;
|
||||
//import java.util.stream.Collectors;
|
||||
//
|
||||
///**
|
||||
// * @Description: 薪资档案操作记录
|
||||
// * @Author: wangxiangzhong
|
||||
// * @Date: 2021/11/24 17:09
|
||||
// */
|
||||
//@Data
|
||||
//@Builder
|
||||
//@NoArgsConstructor
|
||||
//@AllArgsConstructor
|
||||
//public class TaxAgentAdjustRecordForFormSearchConditionDTO {
|
||||
//
|
||||
// @SalarySearchCondition(
|
||||
// label = "个税扣缴义务人",
|
||||
// labelId = 86184,
|
||||
// needQuickSearch = true,
|
||||
// items = {
|
||||
// @SalarySearchConditionItem(itemType = WeaSearchConditionItemType.SELECT, name = "taxAgent", options = "getTaxAgentOptions()"),
|
||||
// }
|
||||
// )
|
||||
// private String taxAgent;
|
||||
//
|
||||
// /**
|
||||
// * 个税扣缴义务人选项
|
||||
// */
|
||||
// private List<WeaSearchConditionOption> taxAgentOptions;
|
||||
//
|
||||
// @SalarySearchCondition(
|
||||
// label = "调整原因",
|
||||
// labelId = 85431,
|
||||
// items = {
|
||||
// @SalarySearchConditionItem(itemType = WeaSearchConditionItemType.SELECT, name = "adjustReason", options = "getAdjustReasonOptions()"),
|
||||
// }
|
||||
// )
|
||||
// private SalaryArchiveTaxAgentAdjustReasonEnum adjustReason;
|
||||
//
|
||||
// @SalarySearchCondition(
|
||||
// label = "生效日期",
|
||||
// labelId = 85904,
|
||||
// items = {
|
||||
// @SalarySearchConditionItem(itemType = WeaSearchConditionItemType.DATEPICKER, name = "effectiveTime")
|
||||
// }
|
||||
// )
|
||||
// private String effectiveTime;
|
||||
//
|
||||
// @SalarySearchCondition(
|
||||
// label = "操作日期",
|
||||
// labelId = 91058,
|
||||
// items = {
|
||||
// @SalarySearchConditionItem(itemType = WeaSearchConditionItemType.DATEPICKER, name = "operateTime")
|
||||
// }
|
||||
// )
|
||||
// private String operateTime;
|
||||
//
|
||||
// @SalarySearchCondition(
|
||||
// label = "操作人",
|
||||
// labelId = 85435,
|
||||
// items = {
|
||||
// @SalarySearchConditionItem(itemType = WeaSearchConditionItemType.BROWSER, browserType = "resource", browserMultiple = true, name = "operator", browserModule = "hrmsalary")
|
||||
// }
|
||||
// )
|
||||
// private String operator;
|
||||
//
|
||||
// @SalarySearchCondition(
|
||||
// label = "备注",
|
||||
// labelId = 84961,
|
||||
// items = {
|
||||
// @SalarySearchConditionItem(itemType = WeaSearchConditionItemType.INPUT, name = "description"),
|
||||
// }
|
||||
// )
|
||||
// private String description;
|
||||
//
|
||||
// private List<WeaSearchConditionOption> getUserStatus(){
|
||||
// return Arrays.stream(SalaryUserStatusEnum.values()).map(m->new WeaSearchConditionOption(m.name(), SalaryI18nUtil.getI18nLabel(TenantContext.getCurrentTenantKey(), UserContext.getCurrentEmployeeId(), m.getLabelId(), m.getDefaultLabel()))).collect(Collectors.toList());
|
||||
// }
|
||||
//
|
||||
// private List<WeaSearchConditionOption> getAdjustReasonOptions(){
|
||||
// return Arrays.stream(SalaryArchiveTaxAgentAdjustReasonEnum.values()).map(m->new WeaSearchConditionOption(m.name(), SalaryI18nUtil.getI18nLabel(TenantContext.getCurrentTenantKey(), UserContext.getCurrentEmployeeId(), m.getLabelId(), m.getDefaultLabel()))).collect(Collectors.toList());
|
||||
// }
|
||||
//}
|
||||
|
|
@ -0,0 +1,136 @@
|
|||
//package com.engine.salary.entity.taxagent.dto;
|
||||
//
|
||||
//import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
//import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
//import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
//import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
//import com.weaver.common.authority.format.TableColumn;
|
||||
//import com.weaver.common.authority.format.TableOperates;
|
||||
//import com.weaver.common.authority.format.WeaFormat;
|
||||
//import com.weaver.common.component.table.type.WeaTableTypeEnum;
|
||||
//import io.swagger.annotations.ApiModel;
|
||||
//import io.swagger.annotations.ApiModelProperty;
|
||||
//import lombok.AllArgsConstructor;
|
||||
//import lombok.Builder;
|
||||
//import lombok.Data;
|
||||
//import lombok.NoArgsConstructor;
|
||||
//
|
||||
//import java.time.LocalDate;
|
||||
//import java.util.Date;
|
||||
//
|
||||
///**
|
||||
// * @Description: 个税扣缴义务人调整记录列表
|
||||
// * @Author: wangxiangzhong
|
||||
// * @Date: 2021/11/1 16:34
|
||||
// */
|
||||
//@Data
|
||||
//@Builder
|
||||
//@NoArgsConstructor
|
||||
//@AllArgsConstructor
|
||||
//@ApiModel("个税扣缴义务人调整记录列表")
|
||||
//@TableOperates(tableType = WeaTableTypeEnum.CHECKBOX)
|
||||
//public class TaxAgentAdjustRecordListDTO {
|
||||
// @ApiModelProperty("主键id")
|
||||
// @JsonSerialize(using = ToStringSerializer.class)
|
||||
// private Long id;
|
||||
//
|
||||
// /**
|
||||
// * 人员信息表的主键id
|
||||
// */
|
||||
// private Long employeeId;
|
||||
//
|
||||
// @ApiModelProperty("姓名")
|
||||
// @WeaFormat(
|
||||
// label = "姓名",
|
||||
// labelId = 85429,
|
||||
// tableColumn = @TableColumn(width = "100")
|
||||
// )
|
||||
// private String username;
|
||||
//
|
||||
// @ApiModelProperty("部门")
|
||||
// @WeaFormat(
|
||||
// label = "部门",
|
||||
// labelId = 86185,
|
||||
// tableColumn = @TableColumn(width = "100")
|
||||
// )
|
||||
// private String departmentName;
|
||||
//
|
||||
// @ApiModelProperty("员工状态")
|
||||
// @WeaFormat(
|
||||
// label = "员工状态",
|
||||
// labelId = 86187,
|
||||
// tableColumn = @TableColumn(width = "100")
|
||||
// )
|
||||
// private String employeeStatus;
|
||||
//
|
||||
// @ApiModelProperty("调整前")
|
||||
// @WeaFormat(
|
||||
// label = "调整前",
|
||||
// labelId = 85433,
|
||||
// tableColumn = @TableColumn(width = "100")
|
||||
// )
|
||||
// private String adjustBefore;
|
||||
//
|
||||
// @ApiModelProperty("调整后")
|
||||
// @WeaFormat(
|
||||
// label = "调整后",
|
||||
// labelId = 85434,
|
||||
// tableColumn = @TableColumn(width = "100")
|
||||
// )
|
||||
// private String adjustAfter;
|
||||
//
|
||||
// @ApiModelProperty("调整原因")
|
||||
// @WeaFormat(
|
||||
// label = "调整原因",
|
||||
// labelId = 85431,
|
||||
// tableColumn = @TableColumn(width = "100")
|
||||
// )
|
||||
// private String adjustReason;
|
||||
//
|
||||
// @ApiModelProperty("生效日期")
|
||||
// @WeaFormat(
|
||||
// label = "生效日期",
|
||||
// labelId = 85904,
|
||||
// tableColumn = @TableColumn(width = "100")
|
||||
// )
|
||||
// @JsonFormat(pattern = "yyyy-MM-dd")
|
||||
// private LocalDate effectiveTime;
|
||||
//
|
||||
// @ApiModelProperty("操作人")
|
||||
// @WeaFormat(
|
||||
// label = "操作人",
|
||||
// labelId = 85435,
|
||||
// tableColumn = @TableColumn(width = "100")
|
||||
// )
|
||||
// private String operator;
|
||||
//
|
||||
// @ApiModelProperty("操作时间")
|
||||
// @WeaFormat(
|
||||
// label = "操作时间",
|
||||
// labelId = 85436,
|
||||
// tableColumn = @TableColumn(width = "150")
|
||||
// )
|
||||
// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
// private Date operateTime;
|
||||
//
|
||||
// @ApiModelProperty("备注")
|
||||
// @WeaFormat(
|
||||
// label = "备注",
|
||||
// labelId = 84961,
|
||||
// tableColumn = @TableColumn(width = "100")
|
||||
// )
|
||||
// private String description;
|
||||
//
|
||||
// /**
|
||||
// * 薪资档案id
|
||||
// */
|
||||
// @JsonIgnore
|
||||
// private Long salaryArchiveId;
|
||||
//
|
||||
// /**
|
||||
// * 个税扣缴义务人id
|
||||
// */
|
||||
// @JsonIgnore
|
||||
// private Long taxAgentId;
|
||||
//
|
||||
//}
|
||||
|
|
@ -0,0 +1,139 @@
|
|||
//package com.engine.salary.entity.taxagent.dto;
|
||||
//
|
||||
//import com.weaver.common.component.search.item.WeaSearchConditionItemType;
|
||||
//import com.weaver.common.component.search.item.WeaSearchConditionOption;
|
||||
//import com.weaver.hrm.salary.annotation.SalarySearchCondition;
|
||||
//import com.weaver.hrm.salary.annotation.SalarySearchConditionItem;
|
||||
//import com.weaver.hrm.salary.enums.SalaryUserStatusEnum;
|
||||
//import com.weaver.hrm.salary.enums.salaryarchive.SalaryArchiveTaxAgentAdjustReasonEnum;
|
||||
//import com.weaver.hrm.salary.util.SalaryI18nUtil;
|
||||
//import com.weaver.teams.api.user.UserStatus;
|
||||
//import com.weaver.teams.security.context.TenantContext;
|
||||
//import com.weaver.teams.security.context.UserContext;
|
||||
//import lombok.AllArgsConstructor;
|
||||
//import lombok.Builder;
|
||||
//import lombok.Data;
|
||||
//import lombok.NoArgsConstructor;
|
||||
//
|
||||
//import java.util.Arrays;
|
||||
//import java.util.List;
|
||||
//import java.util.stream.Collectors;
|
||||
//
|
||||
///**
|
||||
// * @Description: 薪资档案操作记录
|
||||
// * @Author: wangxiangzhong
|
||||
// * @Date: 2021/11/24 17:09
|
||||
// */
|
||||
//@Data
|
||||
//@Builder
|
||||
//@NoArgsConstructor
|
||||
//@AllArgsConstructor
|
||||
//public class TaxAgentAdjustRecordSearchConditionDTO {
|
||||
//
|
||||
// @SalarySearchCondition(
|
||||
// label = "姓名",
|
||||
// labelId = 85429,
|
||||
// needQuickSearch = true,
|
||||
// quickSearchKey = "username",
|
||||
// items = {
|
||||
// @SalarySearchConditionItem(itemType = WeaSearchConditionItemType.INPUT, name = "username"),
|
||||
// }
|
||||
// )
|
||||
// private String username;
|
||||
//
|
||||
// @SalarySearchCondition(
|
||||
// label = "岗位",
|
||||
// labelId = 90633,
|
||||
// items = {
|
||||
// @SalarySearchConditionItem(itemType = WeaSearchConditionItemType.BROWSER, browserType = "position", browserMultiple = true, name = "position", browserModule = "hrmsalary")
|
||||
// }
|
||||
// )
|
||||
// private String position;
|
||||
//
|
||||
// @SalarySearchCondition(
|
||||
// label = "状态",
|
||||
// labelId = 91075,
|
||||
// items = {
|
||||
// @SalarySearchConditionItem(itemType = WeaSearchConditionItemType.SELECT, name = "status", options = "getUserStatus()")
|
||||
// }
|
||||
// )
|
||||
// private UserStatus status;
|
||||
//
|
||||
// @SalarySearchCondition(
|
||||
// label = "部门",
|
||||
// labelId = 86185,
|
||||
// needQuickSearch = true,
|
||||
// items = {
|
||||
// @SalarySearchConditionItem(itemType = WeaSearchConditionItemType.BROWSER, browserType = "department", browserMultiple = true, name = "department", browserModule = "hrmsalary")
|
||||
// }
|
||||
// )
|
||||
// private String department;
|
||||
//
|
||||
// @SalarySearchCondition(
|
||||
// label = "个税扣缴义务人",
|
||||
// labelId = 86184,
|
||||
// needQuickSearch = true,
|
||||
// items = {
|
||||
// @SalarySearchConditionItem(itemType = WeaSearchConditionItemType.SELECT, name = "taxAgent", options = "getTaxAgentOptions()"),
|
||||
// }
|
||||
// )
|
||||
// private String taxAgent;
|
||||
//
|
||||
// /**
|
||||
// * 个税扣缴义务人选项
|
||||
// */
|
||||
// private List<WeaSearchConditionOption> taxAgentOptions;
|
||||
//
|
||||
// @SalarySearchCondition(
|
||||
// label = "调整原因",
|
||||
// labelId = 85431,
|
||||
// items = {
|
||||
// @SalarySearchConditionItem(itemType = WeaSearchConditionItemType.SELECT, name = "adjustReason", options = "getAdjustReasonOptions()"),
|
||||
// }
|
||||
// )
|
||||
// private SalaryArchiveTaxAgentAdjustReasonEnum adjustReason;
|
||||
//
|
||||
// @SalarySearchCondition(
|
||||
// label = "生效日期",
|
||||
// labelId = 85904,
|
||||
// items = {
|
||||
// @SalarySearchConditionItem(itemType = WeaSearchConditionItemType.DATEPICKER, name = "effectiveTime")
|
||||
// }
|
||||
// )
|
||||
// private String effectiveTime;
|
||||
//
|
||||
// @SalarySearchCondition(
|
||||
// label = "操作日期",
|
||||
// labelId = 91058,
|
||||
// items = {
|
||||
// @SalarySearchConditionItem(itemType = WeaSearchConditionItemType.DATEPICKER, name = "operateTime")
|
||||
// }
|
||||
// )
|
||||
// private String operateTime;
|
||||
//
|
||||
// @SalarySearchCondition(
|
||||
// label = "操作人",
|
||||
// labelId = 85435,
|
||||
// items = {
|
||||
// @SalarySearchConditionItem(itemType = WeaSearchConditionItemType.BROWSER, browserType = "resource", browserMultiple = true, name = "operator", browserModule = "hrmsalary")
|
||||
// }
|
||||
// )
|
||||
// private String operator;
|
||||
//
|
||||
// @SalarySearchCondition(
|
||||
// label = "备注",
|
||||
// labelId = 84961,
|
||||
// items = {
|
||||
// @SalarySearchConditionItem(itemType = WeaSearchConditionItemType.INPUT, name = "description"),
|
||||
// }
|
||||
// )
|
||||
// private String description;
|
||||
//
|
||||
// private List<WeaSearchConditionOption> getUserStatus(){
|
||||
// return Arrays.stream(SalaryUserStatusEnum.values()).map(m->new WeaSearchConditionOption(m.name(), SalaryI18nUtil.getI18nLabel(TenantContext.getCurrentTenantKey(), UserContext.getCurrentEmployeeId(), m.getLabelId(), m.getDefaultLabel()))).collect(Collectors.toList());
|
||||
// }
|
||||
//
|
||||
// private List<WeaSearchConditionOption> getAdjustReasonOptions(){
|
||||
// return Arrays.stream(SalaryUserStatusEnum.values()).map(m->new WeaSearchConditionOption(m.name(), SalaryI18nUtil.getI18nLabel(TenantContext.getCurrentTenantKey(), UserContext.getCurrentEmployeeId(), m.getLabelId(), m.getDefaultLabel()))).collect(Collectors.toList());
|
||||
// }
|
||||
//}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package com.engine.salary.entity.taxagent.dto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 个税扣缴义务人基础信息表单
|
||||
* <p>Copyright: Copyright (c) 2022</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class TaxAgentBaseFormDTO {
|
||||
|
||||
// @SalaryForm(
|
||||
// label = "启用分权",
|
||||
// labelId = 106270,
|
||||
// items = {
|
||||
// @SalaryFormItem(itemType = WeaFormItemType.SWITCH)
|
||||
// }
|
||||
// )
|
||||
private Boolean devolutionStatus;
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
package com.engine.salary.entity.taxagent.dto;
|
||||
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 个税扣缴义务人以及管理范围中的人员
|
||||
* <p>Copyright: Copyright (c) 2022</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
@Data
|
||||
@Builder
|
||||
public class TaxAgentEmployeeDTO {
|
||||
|
||||
/**
|
||||
* 个税扣缴义务人id
|
||||
*/
|
||||
private Long taxAgentId;
|
||||
|
||||
/**
|
||||
* 个税扣缴义务人名称
|
||||
*/
|
||||
private String taxAgentName;
|
||||
|
||||
/**
|
||||
* 人员id
|
||||
*/
|
||||
private Long employeeId;
|
||||
|
||||
/**
|
||||
* 名字
|
||||
*/
|
||||
private String username;
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
package com.engine.salary.entity.taxagent.dto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 个税扣缴义务人人员选项
|
||||
* <p>Copyright: Copyright (c) 2022</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class TaxAgentEmployeeOptionDTO {
|
||||
|
||||
private Long id;
|
||||
|
||||
private String content;
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package com.engine.salary.entity.taxagent.dto;
|
||||
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 管理范围的人员与个税扣缴义务人的关联数据
|
||||
* <p>Copyright: Copyright (c) 2022</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
@Data
|
||||
@Builder
|
||||
public class TaxAgentEmployeeTaxAgentDTO {
|
||||
|
||||
/**
|
||||
* 人员id
|
||||
*/
|
||||
private Long employeeId;
|
||||
|
||||
/**
|
||||
* 个税扣缴义务人id列表
|
||||
*/
|
||||
private List<Long> taxAgentIds;
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
package com.engine.salary.entity.taxagent.dto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 个税扣缴义务人表单
|
||||
* <p>Copyright: Copyright (c) 2022</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class TaxAgentFormDTO {
|
||||
|
||||
private Long id;
|
||||
|
||||
//名称
|
||||
private String name;
|
||||
|
||||
//管理员
|
||||
private List<TaxAgentEmployeeOptionDTO> adminUser;
|
||||
|
||||
//备注
|
||||
private String description;
|
||||
}
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
package com.engine.salary.entity.taxagent.dto;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @Description: 个税扣缴义务人列表
|
||||
* @Author: wangxiangzhong
|
||||
* @Date: 2021/10/29 15:39
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
//@ApiModel("个税扣缴义务人列表")
|
||||
//@TableOperates(value = {
|
||||
// @Operates(index = 0, text = "编辑" ,labelId = 59943),
|
||||
// @Operates(index = 1, text = "删除" ,labelId = 59942)
|
||||
//}, tableType = WeaTableTypeEnum.NONE)
|
||||
public class TaxAgentListDTO {
|
||||
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
// @WeaFormat(
|
||||
// label = "个税扣缴义务人名称",
|
||||
// labelId = 91558,
|
||||
// tableColumn = @TableColumn(width = "40%")
|
||||
// )
|
||||
private String name;
|
||||
|
||||
// @WeaFormat(
|
||||
// label = "备注",
|
||||
// labelId = 84961,
|
||||
// tableColumn = @TableColumn(width = "40%")
|
||||
// )
|
||||
private String description;
|
||||
}
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
package com.engine.salary.entity.taxagent.dto;
|
||||
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 个税扣缴义务人以及管理范围中的人员
|
||||
* <p>Copyright: Copyright (c) 2022</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
@Data
|
||||
@Builder
|
||||
public class TaxAgentManageRangeEmployeeDTO {
|
||||
|
||||
/**
|
||||
* 个税扣缴义务人id
|
||||
*/
|
||||
private Long taxAgentId;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private String taxAgentName;
|
||||
|
||||
/**
|
||||
* 人员列表
|
||||
*/
|
||||
private List<TaxAgentEmployee> employeeList;
|
||||
|
||||
@Data
|
||||
public static class TaxAgentEmployee {
|
||||
/**
|
||||
* 人员id
|
||||
*/
|
||||
private Long employeeId;
|
||||
|
||||
/**
|
||||
* 名字
|
||||
*/
|
||||
private String username;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
package com.engine.salary.entity.taxagent.dto;
|
||||
|
||||
import com.engine.salary.entity.hrm.HrmStatus;
|
||||
import com.engine.salary.enums.salarysob.TargetTypeEnum;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 范围表单
|
||||
* <p>Copyright: Copyright (c) 2022</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class TaxAgentManageRangeFormDTO {
|
||||
|
||||
//对象类型
|
||||
private TargetTypeEnum targetType;
|
||||
|
||||
// private List<TypesBrowserOption> targetOptions;
|
||||
|
||||
//对象id")
|
||||
private Long targetId;
|
||||
|
||||
private Collection<HrmStatus> employeeStatus;
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
package com.engine.salary.entity.taxagent.dto;
|
||||
|
||||
import com.engine.salary.annotation.SalaryTableColumn;
|
||||
import com.engine.salary.annotation.TableTitle;
|
||||
import com.engine.salary.enums.salarysob.TargetTypeEnum;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 个税扣缴义务人管理范围列表
|
||||
* <p>Copyright: Copyright (c) 2022</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class TaxAgentManageRangeListDTO {
|
||||
|
||||
//主键id
|
||||
private Long id;
|
||||
|
||||
//对象类型
|
||||
private TargetTypeEnum targetType;
|
||||
|
||||
@SalaryTableColumn(
|
||||
text = "对象类型",
|
||||
labelId = 90394,
|
||||
width = "30%",
|
||||
column="targetTypeName"
|
||||
)
|
||||
//对象类型")
|
||||
@TableTitle(title ="对象类型",key = "targetTypeName",dataIndex = "targetTypeName")
|
||||
private String targetTypeName;
|
||||
|
||||
@SalaryTableColumn(
|
||||
text = "对象",
|
||||
labelId = 90396,
|
||||
width = "30%",
|
||||
column="targetName"
|
||||
)
|
||||
@TableTitle(title ="对象",key = "targetName",dataIndex = "targetName")
|
||||
private String targetName;
|
||||
|
||||
//对象id")
|
||||
private Long targetId;
|
||||
|
||||
@SalaryTableColumn(
|
||||
text = "员工状态",
|
||||
labelId = 86187,
|
||||
width = "30%",
|
||||
column="employeeStatus"
|
||||
)
|
||||
@TableTitle(title ="员工状态",key = "employeeStatus",dataIndex = "employeeStatus")
|
||||
private String employeeStatus;
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
package com.engine.salary.entity.taxagent.dto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 个税扣缴义务人分管理员基础设置表单
|
||||
* <p>Copyright: Copyright (c) 2022</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class TaxAgentSubAdminBaseFormDTO {
|
||||
|
||||
//主键id
|
||||
private Long id;
|
||||
|
||||
|
||||
//分管理员
|
||||
private List<TaxAgentEmployeeOptionDTO> subAdminUser;
|
||||
|
||||
//备注
|
||||
private String description;
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
package com.engine.salary.entity.taxagent.dto;
|
||||
|
||||
import com.engine.salary.annotation.TableTitle;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 个税扣缴义务人分管理员列表
|
||||
* <p>Copyright: Copyright (c) 2022</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class TaxAgentSubAdminListDTO {
|
||||
|
||||
//主键id
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
//分管理员
|
||||
@TableTitle(title = "分管理员", key = "subAdmin", dataIndex = "subAdmin")
|
||||
private String subAdmin;
|
||||
|
||||
//管理范围
|
||||
@TableTitle(title = "管理范围", key = "range", dataIndex = "range")
|
||||
private String range;
|
||||
|
||||
//备注
|
||||
@TableTitle(title = "备注", key = "description", dataIndex = "description")
|
||||
private String description;
|
||||
}
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
package com.engine.salary.entity.taxagent.param;
|
||||
|
||||
import com.engine.salary.common.BaseQueryParam;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 个税扣缴义务人调整记录查询参数
|
||||
* <p>Copyright: Copyright (c) 2022</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class TaxAgentAdjustRecordQueryParam extends BaseQueryParam {
|
||||
|
||||
//主键id
|
||||
private Collection<Long> ids;
|
||||
|
||||
//薪资档案id
|
||||
private Long salaryArchiveId;
|
||||
|
||||
//关键字(姓名、部门、个税扣缴义务人)
|
||||
private String keyword;
|
||||
|
||||
//姓名
|
||||
private String username;
|
||||
|
||||
//部门id
|
||||
private List<Long> departmentIds;
|
||||
|
||||
//岗位id
|
||||
private List<Long> positionIds;
|
||||
|
||||
//状态
|
||||
private String userstatus;
|
||||
|
||||
//个税扣缴义务人id
|
||||
private Long taxAgentId;
|
||||
|
||||
//调整原因
|
||||
private String adjustReason;
|
||||
|
||||
//生效日期
|
||||
private List<Date> effectiveTime;
|
||||
|
||||
//操作日期
|
||||
private List<Date> operateTime;
|
||||
|
||||
//操作人id
|
||||
private List<Long> operatorIds;
|
||||
|
||||
//备注
|
||||
private String description;
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package com.engine.salary.entity.taxagent.param;
|
||||
|
||||
import com.engine.salary.util.valid.DataCheck;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 个税扣缴义务人保存参数
|
||||
* <p>Copyright: Copyright (c) 2022</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class TaxAgentAdminChangeCheckParam {
|
||||
|
||||
//个税扣缴义务人id
|
||||
@DataCheck(require = true,message = "个税扣缴义务人id为空")
|
||||
private Long taxAgentId;
|
||||
|
||||
//管理员主键id
|
||||
@DataCheck(require = true,message = "管理员主键为空")
|
||||
private Long adminUserId;
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package com.engine.salary.entity.taxagent.param;
|
||||
|
||||
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 个税扣缴义务人的关联人员保存参数
|
||||
* <p>Copyright: Copyright (c) 2022</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class TaxAgentEmpSaveParam {
|
||||
|
||||
//个税口角义务人的主键id
|
||||
private Long taxAgentId;
|
||||
|
||||
//关联人员列表
|
||||
private List<DataCollectionEmployee> salaryEmployeeList;
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
package com.engine.salary.entity.taxagent.param;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 管理范围转人员-查询参数
|
||||
* <p>Copyright: Copyright (c) 2022</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class TaxAgentManageRangeEmpQueryParam {
|
||||
|
||||
//对象类型
|
||||
private String targetType;
|
||||
|
||||
//对象id
|
||||
private Collection<Long> targetIds;
|
||||
|
||||
//人员状态
|
||||
private Collection<String> employeeStatus;
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package com.engine.salary.entity.taxagent.param;
|
||||
|
||||
import com.engine.salary.common.BaseQueryParam;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 管理范围查询参数
|
||||
* <p>Copyright: Copyright (c) 2022</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
@Data
|
||||
//@Builder
|
||||
//@NoArgsConstructor
|
||||
//@AllArgsConstructor
|
||||
public class TaxAgentManageRangeQueryParam extends BaseQueryParam {
|
||||
|
||||
//对象")
|
||||
private String targetName;
|
||||
}
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
package com.engine.salary.entity.taxagent.param;
|
||||
|
||||
import com.engine.salary.enums.salarysob.TargetTypeEnum;
|
||||
import com.engine.salary.util.valid.DataCheck;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 管理范围保存参数
|
||||
* <p>Copyright: Copyright (c) 2022</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
@Data
|
||||
public class TaxAgentManageRangeSaveParam {
|
||||
|
||||
/**
|
||||
* 只能选择 关联人员范围/从范围中排除
|
||||
*/
|
||||
@DataCheck(require = true, max = 1, min = 0, message = "只能选择。0:排除、1:包含")
|
||||
private Integer includeType;
|
||||
|
||||
/**
|
||||
* 对象不能为空
|
||||
*/
|
||||
@DataCheck(require = true, message = "对象不能为空")
|
||||
private List<TaxAgentSubAdminRangeTargetParam> targetParams;
|
||||
|
||||
/**
|
||||
* 员工状态不允许为空
|
||||
*/
|
||||
@DataCheck(require = true,message = "员工状态不允许为空")
|
||||
private Collection<String> employeeStatus;
|
||||
|
||||
/**
|
||||
* 个税扣缴义务人分管理员管理范围保存参数中的对象
|
||||
*/
|
||||
@Data
|
||||
public static class TaxAgentSubAdminRangeTargetParam {
|
||||
|
||||
/**
|
||||
* 对象类型不能为空
|
||||
*/
|
||||
@DataCheck(require = true,message = "对象类型不能为空")
|
||||
private TargetTypeEnum targetType;
|
||||
|
||||
/**
|
||||
* 对象不能为空
|
||||
*/
|
||||
@DataCheck(require = true,message = "对象不能为空")
|
||||
private Long targetId;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package com.engine.salary.entity.taxagent.param;
|
||||
|
||||
import com.engine.salary.common.BaseQueryParam;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 个税扣缴义务人查询参数
|
||||
* <p>Copyright: Copyright (c) 2022</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class TaxAgentQueryParam extends BaseQueryParam {
|
||||
|
||||
private Collection<Long> ids;
|
||||
|
||||
//个税扣缴义务人名称
|
||||
private String name;
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
package com.engine.salary.entity.taxagent.param;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 个税扣缴义务人人员范围查询参数
|
||||
* <p>Copyright: Copyright (c) 2022</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
//个税扣缴义务人人员范围查询参数
|
||||
public class TaxAgentRangeQueryParam extends TaxAgentManageRangeQueryParam {
|
||||
|
||||
//个税扣缴义务人id
|
||||
private Long taxAgentId;
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package com.engine.salary.entity.taxagent.param;
|
||||
|
||||
import com.engine.salary.util.valid.DataCheck;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 个税扣缴义务人的人员范围保存参数
|
||||
* <p>Copyright: Copyright (c) 2022</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
@Data
|
||||
public class TaxAgentRangeSaveParam extends TaxAgentManageRangeSaveParam {
|
||||
|
||||
/**
|
||||
* 个税扣缴义务人的id不允许为空
|
||||
*/
|
||||
@DataCheck(require = true,message = "个税扣缴义务人的id不允许为空")
|
||||
private Long taxAgentId;
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package com.engine.salary.entity.taxagent.param;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @Description: 个税扣缴义务人基础信息保存参数
|
||||
* @Author: wangxiangzhong
|
||||
* @Date: 2022/3/21 9:55
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
//个税扣缴义务人基础信息保存参数")
|
||||
public class TaxAgentSaveBaseParam {
|
||||
|
||||
//"启用分权"
|
||||
private Boolean devolutionStatus;
|
||||
}
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
package com.engine.salary.entity.taxagent.param;
|
||||
|
||||
import com.engine.salary.util.valid.DataCheck;
|
||||
import com.engine.salary.util.valid.RuntimeTypeEnum;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 个税扣缴义务人保存参数
|
||||
* <p>Copyright: Copyright (c) 2022</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class TaxAgentSaveParam {
|
||||
|
||||
//主键id
|
||||
@DataCheck(require = true, message = "id为空", runtime = {RuntimeTypeEnum.UPDATE})
|
||||
private Long id;
|
||||
|
||||
//名称
|
||||
@DataCheck(require = true, message = "名称必填")
|
||||
private String name;
|
||||
|
||||
//管理员主键id
|
||||
private List<Long> adminUserIds;
|
||||
|
||||
//代缴机构
|
||||
private String paymentAgency;
|
||||
|
||||
//备注
|
||||
private String description;
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package com.engine.salary.entity.taxagent.param;
|
||||
|
||||
import com.engine.salary.util.valid.DataCheck;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 分管理员基础设置表单参数
|
||||
* <p>Copyright: Copyright (c) 2022</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
//分管理员基础设置表单参数
|
||||
public class TaxAgentSubAdminBaseFormParam {
|
||||
|
||||
//分管理员的id
|
||||
private Long id;
|
||||
|
||||
//个税扣缴义务人的id
|
||||
@DataCheck(require = true, message = "个税扣缴义务人的id为空")
|
||||
private Long taxAgentId;
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
package com.engine.salary.entity.taxagent.param;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 分管理员基础设置保存参数
|
||||
* <p>Copyright: Copyright (c) 2022</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class TaxAgentSubAdminBaseSaveParam {
|
||||
|
||||
//主键id
|
||||
private Long id;
|
||||
|
||||
//个税扣缴义务人的id
|
||||
private Long taxAgentId;
|
||||
|
||||
//分管理员的id
|
||||
private Long subAdminUserId;
|
||||
|
||||
//备注
|
||||
private String description;
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
package com.engine.salary.entity.taxagent.param;
|
||||
|
||||
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 个税扣缴义务人分管理员的关联人员保存参数
|
||||
* <p>Copyright: Copyright (c) 2022</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class TaxAgentSubAdminEmpSaveParam {
|
||||
|
||||
//个税口角义务人的主键id
|
||||
private Long taxAgentId;
|
||||
|
||||
//分管理员的主键id
|
||||
private Long subAdminId;
|
||||
|
||||
//关联人员列表
|
||||
private List<DataCollectionEmployee> salaryEmployeeList;
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package com.engine.salary.entity.taxagent.param;
|
||||
|
||||
import com.engine.salary.common.BaseQueryParam;
|
||||
import com.engine.salary.util.valid.DataCheck;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 个税扣缴义务人分管理员查询参数
|
||||
* <p>Copyright: Copyright (c) 2022</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class TaxAgentSubAdminQueryParam extends BaseQueryParam {
|
||||
|
||||
//个税扣缴义务人id
|
||||
@DataCheck(require = true,message = "个税扣缴义务人id为空")
|
||||
private Long taxAgentId;
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
package com.engine.salary.entity.taxagent.param;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 个税扣缴义务人分管理员管理范围查询参数
|
||||
* <p>Copyright: Copyright (c) 2022</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class TaxAgentSubAdminRangeQueryParam extends TaxAgentManageRangeQueryParam {
|
||||
|
||||
//分管理员id
|
||||
private Long subAdminId;
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package com.engine.salary.entity.taxagent.param;
|
||||
|
||||
import com.engine.salary.util.valid.DataCheck;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 个税扣缴义务人分管理员管理范围保存参数
|
||||
* <p>Copyright: Copyright (c) 2022</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
@Data
|
||||
public class TaxAgentSubAdminRangeSaveParam extends TaxAgentManageRangeSaveParam {
|
||||
|
||||
/**
|
||||
* 分管理员的id不允许为空
|
||||
*/
|
||||
@DataCheck(require = true, message = "分管理员的id不允许为空")
|
||||
private Long subAdminId;
|
||||
}
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
package com.engine.salary.entity.taxagent.po;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 个税扣缴义务人管理员
|
||||
* <p>Copyright: Copyright (c) 2022</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
//hrsa_tax_agent_admin")
|
||||
public class TaxAgentAdminPO {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 个税扣缴义务人的主键id
|
||||
*/
|
||||
private Long taxAgentId;
|
||||
|
||||
/**
|
||||
* 人员信息表的主键id
|
||||
*/
|
||||
private Long employeeId;
|
||||
|
||||
/**
|
||||
* 租户key
|
||||
*/
|
||||
private String tenantKey;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
private Long creator;
|
||||
|
||||
/**
|
||||
* 是否删除
|
||||
*/
|
||||
private Integer deleteType;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
|
||||
|
||||
private Collection<Long> taxAgentIds;
|
||||
private Collection<Long> ids;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
package com.engine.salary.entity.taxagent.po;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 个税扣缴义务人基础信息
|
||||
* <p>Copyright: Copyright (c) 2022</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
//hrsa_tax_agent_base")
|
||||
public class TaxAgentBasePO {
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 分权开关
|
||||
*/
|
||||
private Integer devolutionStatus;
|
||||
|
||||
/**
|
||||
* 租户key
|
||||
*/
|
||||
private String tenantKey;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
private Long creator;
|
||||
|
||||
/**
|
||||
* 是否删除
|
||||
*/
|
||||
private Integer deleteType;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
private Collection<Long> ids;
|
||||
}
|
||||
|
|
@ -0,0 +1,88 @@
|
|||
package com.engine.salary.entity.taxagent.po;
|
||||
|
||||
import com.engine.salary.enums.taxagent.TaxAgentEmpChangeModuleEnum;
|
||||
import com.engine.salary.enums.taxagent.TaxAgentEmpChangeTypeEnum;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 个税扣缴义务人管理范围的增量人员
|
||||
* <p>Copyright: Copyright (c) 2022</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
//hrsa_tax_agent_emp_change")
|
||||
public class TaxAgentEmpChangePO {
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 个税扣缴义务人的主键id
|
||||
*/
|
||||
private Long taxAgentId;
|
||||
|
||||
/**
|
||||
* 人员信息表的主键id
|
||||
*/
|
||||
private Long employeeId;
|
||||
|
||||
/**
|
||||
* 人员姓名
|
||||
*/
|
||||
private String employeeName;
|
||||
|
||||
/**
|
||||
* 增量类型
|
||||
*
|
||||
* @see TaxAgentEmpChangeTypeEnum
|
||||
*/
|
||||
private Integer changeType;
|
||||
|
||||
/**
|
||||
* 增量类型
|
||||
*
|
||||
* @see TaxAgentEmpChangeModuleEnum
|
||||
*/
|
||||
private Integer moduleType;
|
||||
|
||||
/**
|
||||
* 租户key
|
||||
*/
|
||||
private String tenantKey;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
private Long creator;
|
||||
|
||||
/**
|
||||
* 是否删除
|
||||
*/
|
||||
private Integer deleteType;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
private Collection<Long> ids;
|
||||
}
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
package com.engine.salary.entity.taxagent.po;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 个税扣缴义务人管理范围的人员
|
||||
* <p>Copyright: Copyright (c) 2022</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
//hrsa_tax_agent_emp", autoResultMap = true)
|
||||
public class TaxAgentEmpPO {
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 个税扣缴义务人的主键id
|
||||
*/
|
||||
private Long taxAgentId;
|
||||
|
||||
/**
|
||||
* 人员信息表的主键id
|
||||
*/
|
||||
private Long employeeId;
|
||||
|
||||
/**
|
||||
* 人员姓名
|
||||
*/
|
||||
private String employeeName;
|
||||
|
||||
/**
|
||||
* 租户key
|
||||
*/
|
||||
private String tenantKey;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
private Long creator;
|
||||
|
||||
/**
|
||||
* 是否删除
|
||||
*/
|
||||
private Integer deleteType;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
private Collection<Long> taxAgentIds;
|
||||
private Collection<Long> ids;
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
package com.engine.salary.entity.taxagent.po;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 员工基本信息
|
||||
* <p>Copyright: Copyright (c) 2022</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class TaxAgentEmployeePO {
|
||||
|
||||
//员工id")
|
||||
private Long employeeId;
|
||||
|
||||
//姓名")
|
||||
private String username;
|
||||
|
||||
//部门")
|
||||
private String departmentName;
|
||||
|
||||
//状态")
|
||||
private String status;
|
||||
|
||||
//人事状态")
|
||||
// private String personnelStatus;
|
||||
|
||||
private Collection<Long> ids;
|
||||
}
|
||||
|
|
@ -0,0 +1,99 @@
|
|||
package com.engine.salary.entity.taxagent.po;
|
||||
|
||||
import com.engine.salary.enums.salarysob.TargetTypeEnum;
|
||||
import com.engine.salary.enums.taxagent.TaxAgentRangeTypeEnum;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 个税扣缴义务人的管理范围表
|
||||
* <p>Copyright: Copyright (c) 2022</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
//hrsa_tax_agent_manage_range
|
||||
public class TaxAgentManageRangePO {
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 分管理员的id
|
||||
*/
|
||||
private Long taxAgentSubAdminId;
|
||||
|
||||
/**
|
||||
* 个税扣缴义务人的主键id
|
||||
*/
|
||||
private Long taxAgentId;
|
||||
|
||||
/**
|
||||
* 范围类型
|
||||
* @see TaxAgentRangeTypeEnum
|
||||
*/
|
||||
private Integer rangeType;
|
||||
|
||||
/**
|
||||
* 对象类型
|
||||
* @see TargetTypeEnum
|
||||
*/
|
||||
private Integer targetType;
|
||||
|
||||
/**
|
||||
* 对象id
|
||||
*/
|
||||
private Long targetId;
|
||||
|
||||
/**
|
||||
* 人员状态
|
||||
*/
|
||||
private String employeeStatus;
|
||||
|
||||
/**
|
||||
* 是包含还是排除 0:排除、1:包含
|
||||
*/
|
||||
private Integer includeType;
|
||||
|
||||
/**
|
||||
* 租户key
|
||||
*/
|
||||
private String tenantKey;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
private Long creator;
|
||||
|
||||
/**
|
||||
* 是否删除
|
||||
*/
|
||||
private Integer deleteType;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
|
||||
private Collection<Long> taxAgentIds;
|
||||
private Collection<Long> ids;
|
||||
private Collection<Long> taxAgentSubAdminIds;
|
||||
}
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
package com.engine.salary.entity.taxagent.po;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 个税扣缴义务人
|
||||
* <p>Copyright: Copyright (c) 2022</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
//hrsa_tax_agent")
|
||||
//个税扣缴义务人表")
|
||||
public class TaxAgentPO {
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 代缴机构
|
||||
*/
|
||||
private String paymentAgency;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 租户key
|
||||
*/
|
||||
private String tenantKey;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
private Long creator;
|
||||
|
||||
/**
|
||||
* 是否删除
|
||||
*/
|
||||
private Integer deleteType;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
private Collection<Long> ids;
|
||||
}
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
package com.engine.salary.entity.taxagent.po;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 个税扣缴义务人管理范围的人员
|
||||
* <p>Copyright: Copyright (c) 2022</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
//hrsa_tax_agent_sub_admin_emp", autoResultMap = true)
|
||||
public class TaxAgentSubAdminEmpPO {
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 个税扣缴义务人的主键id
|
||||
*/
|
||||
private Long taxAgentId;
|
||||
|
||||
/**
|
||||
* 分管理员的id
|
||||
*/
|
||||
private Long taxAgentSubAdminId;
|
||||
|
||||
/**
|
||||
* 人员信息表的主键id
|
||||
*/
|
||||
private Long employeeId;
|
||||
|
||||
/**
|
||||
* 人员姓名
|
||||
*/
|
||||
private String employeeName;
|
||||
|
||||
/**
|
||||
* 租户key
|
||||
*/
|
||||
private String tenantKey;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
private Long creator;
|
||||
|
||||
/**
|
||||
* 是否删除
|
||||
*/
|
||||
private Integer deleteType;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
private Collection<Long> ids;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
package com.engine.salary.entity.taxagent.po;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 个税扣缴义务人分管理员
|
||||
* <p>Copyright: Copyright (c) 2022</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
//hrsa_tax_agent_sub_admin")
|
||||
//个税扣缴义务人分管理员")
|
||||
public class TaxAgentSubAdminPO {
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 个税扣缴义务人的主键id
|
||||
*/
|
||||
private Long taxAgentId;
|
||||
|
||||
/**
|
||||
* 人员信息表的主键id
|
||||
*/
|
||||
private Long employeeId;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 租户key
|
||||
*/
|
||||
private String tenantKey;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
private Long creator;
|
||||
|
||||
/**
|
||||
* 是否删除
|
||||
*/
|
||||
private Integer deleteType;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
private Collection<Long> ids;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package com.engine.salary.enums;
|
||||
|
||||
/**
|
||||
* 个税扣缴义务人角色类型
|
||||
* <p>Copyright: Copyright (c) 2022</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
public enum SalaryJobFlagEnum {
|
||||
normal("normal", "在职"),
|
||||
unavailable("unavailable", "非在职");
|
||||
|
||||
private String value;
|
||||
|
||||
private String defaultLabel;
|
||||
|
||||
SalaryJobFlagEnum(String value, String defaultLabel) {
|
||||
this.value = value;
|
||||
this.defaultLabel = defaultLabel;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public String getDefaultLabel() {
|
||||
return defaultLabel;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,5 +1,7 @@
|
|||
package com.engine.salary.enums;
|
||||
|
||||
import com.engine.salary.entity.hrm.HrmStatus;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
|
@ -83,4 +85,11 @@ public enum UserStatusEnum {
|
|||
return Arrays.stream(UserStatusEnum.values()).filter(v -> v != INVALID).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
public static List<HrmStatus> getHrmStatusList() {
|
||||
return Arrays.stream(UserStatusEnum.values())
|
||||
.filter(v -> v != INVALID)
|
||||
.map(v -> HrmStatus.builder().id(v.value.toString()).name(v.description).build()).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,9 +16,10 @@ import java.util.Objects;
|
|||
public enum TargetTypeEnum implements BaseEnum<Integer> {
|
||||
EMPLOYEE(1, "人员", 100133),
|
||||
DEPT(2, "部门", 86185),
|
||||
SUBCOMPANY(3, "分部", 107369),
|
||||
POSITION(4, "岗位", 90633),
|
||||
;
|
||||
|
||||
ALL(5, "所有人", 107729),
|
||||
EXT_EMPLOYEE(100, "外部人员", 0);
|
||||
private int value;
|
||||
|
||||
private String defaultLabel;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,32 @@
|
|||
package com.engine.salary.enums.taxagent;
|
||||
|
||||
/**
|
||||
* 模块类型
|
||||
* <p>Copyright: Copyright (c) 2022</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
public enum TaxAgentEmpChangeModuleEnum {
|
||||
|
||||
SALARY_ARCHIVE(1, "薪资档案"),
|
||||
INSURANCE_ARCHIVE(2, "社保档案");
|
||||
|
||||
private int value;
|
||||
|
||||
private String defaultLabel;
|
||||
|
||||
TaxAgentEmpChangeModuleEnum(int value, String defaultLabel) {
|
||||
this.value = value;
|
||||
this.defaultLabel = defaultLabel;
|
||||
}
|
||||
|
||||
public int getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public String getDefaultLabel() {
|
||||
return defaultLabel;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package com.engine.salary.enums.taxagent;
|
||||
|
||||
/**
|
||||
* @Description: 增量类型
|
||||
* @Author: wangxiangzhong
|
||||
* @Date: 2021-11-17 14:37
|
||||
*/
|
||||
public enum TaxAgentEmpChangeTypeEnum {
|
||||
|
||||
ADD(1, "新增"),
|
||||
DEL(2, "删除");
|
||||
|
||||
private int value;
|
||||
|
||||
private String defaultLabel;
|
||||
|
||||
TaxAgentEmpChangeTypeEnum(int value, String defaultLabel) {
|
||||
this.value = value;
|
||||
this.defaultLabel = defaultLabel;
|
||||
}
|
||||
|
||||
public int getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public String getDefaultLabel() {
|
||||
return defaultLabel;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
package com.engine.salary.enums.taxagent;
|
||||
|
||||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* 范围类型
|
||||
* <p>Copyright: Copyright (c) 2022</p>
|
||||
* <p>Company: 泛微软件</p>
|
||||
*
|
||||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
public enum TaxAgentRangeTypeEnum {
|
||||
|
||||
TAXAGENT(1, "个税扣缴义务人", 86184),
|
||||
SUBADMIN(2, "分管理员", 106283);
|
||||
|
||||
private int value;
|
||||
|
||||
private String defaultLabel;
|
||||
|
||||
private int labelId;
|
||||
|
||||
TaxAgentRangeTypeEnum(int value, String defaultLabel, int labelId) {
|
||||
this.value = value;
|
||||
this.defaultLabel = defaultLabel;
|
||||
this.labelId = labelId;
|
||||
}
|
||||
|
||||
public int getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public String getDefaultLabel() {
|
||||
return defaultLabel;
|
||||
}
|
||||
|
||||
public int getLabelId() {
|
||||
return labelId;
|
||||
}
|
||||
|
||||
public static String getDefaultLabelByValue(Integer value, Long employeeId, String tenantKey) {
|
||||
Optional<TaxAgentRangeTypeEnum> optional = Arrays.stream(TaxAgentRangeTypeEnum.values()).filter(r -> Integer.valueOf(r.getValue()).equals(value)).findFirst();
|
||||
return optional.isPresent() ? SalaryI18nUtil.getI18nLabel(optional.get().getLabelId(), optional.get().getDefaultLabel()) : "";
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package com.engine.salary.enums.taxagent;
|
||||
|
||||
/**
|
||||
* @Description: 个税扣缴义务人角色类型
|
||||
* @Author: wangxiangzhong
|
||||
* @Date: 2022-04-22 14:37
|
||||
*/
|
||||
public enum TaxAgentRoleTypeEnum {
|
||||
|
||||
CHIEF(0, "总管理员"),
|
||||
ADMIN(1, "管理员"),
|
||||
SUBADMIN(2, "分管理员"),
|
||||
NONE(3, "其他");
|
||||
|
||||
private int value;
|
||||
|
||||
private String defaultLabel;
|
||||
|
||||
TaxAgentRoleTypeEnum(int value, String defaultLabel) {
|
||||
this.value = value;
|
||||
this.defaultLabel = defaultLabel;
|
||||
}
|
||||
|
||||
public int getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public String getDefaultLabel() {
|
||||
return defaultLabel;
|
||||
}
|
||||
}
|
||||
|
|
@ -63,7 +63,7 @@
|
|||
<select id="listEmployee" resultType="com.engine.salary.entity.datacollection.DataCollectionEmployee">
|
||||
select e.ID as employeeId,
|
||||
e.LASTNAME as username,
|
||||
d.DEPARTMENTNAME as deparmentName
|
||||
d.DEPARTMENTNAME as departmentName
|
||||
from hrmresource e
|
||||
left join hrmdepartment d on e.departmentid = d.id
|
||||
where e.status not in (7)
|
||||
|
|
@ -81,11 +81,13 @@
|
|||
t1.declare_month,
|
||||
t1.employee_id,
|
||||
e.lastname as username,
|
||||
e.certificatenum as idNo,
|
||||
d.departmentname AS departmentName,
|
||||
e.mobile,
|
||||
e.workcode as job_num,
|
||||
e.companystartdate as hiredate,
|
||||
t2.name AS tax_agent_name,
|
||||
t2.name AS taxAgentName,
|
||||
t2.id AS taxAgentId,
|
||||
t1.add_up_child_education,
|
||||
t1.add_up_continuing_education,
|
||||
t1.add_up_housing_loan_interest,
|
||||
|
|
|
|||
|
|
@ -93,7 +93,9 @@
|
|||
e.mobile,
|
||||
e.workcode as job_num,
|
||||
e.companystartdate as hiredate,
|
||||
e.certificatenum as idNo,
|
||||
t2.name AS tax_agent_name,
|
||||
t2.id AS tax_agent_id,
|
||||
t1.add_up_income,
|
||||
t1.add_up_subtraction,
|
||||
t1.add_up_social_security_total,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
package com.engine.salary.mapper.datacollection;
|
||||
|
||||
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
||||
import com.engine.salary.entity.hrm.DeptInfo;
|
||||
import com.engine.salary.entity.hrm.PositionInfo;
|
||||
import com.engine.salary.entity.hrm.SubCompanyInfo;
|
||||
import com.engine.salary.entity.salarysob.param.SalarySobRangeEmpQueryParam;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
|
@ -11,29 +13,36 @@ import java.util.List;
|
|||
|
||||
@Mapper
|
||||
public interface EmployMapper {
|
||||
/**
|
||||
* 获取所有员工
|
||||
* @return
|
||||
*/
|
||||
List<DataCollectionEmployee> listEmployee();
|
||||
/**
|
||||
* 获取所有员工
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<DataCollectionEmployee> listEmployee();
|
||||
|
||||
List<DataCollectionEmployee> getEmployeeByIds(@Param("collection") List<Long> ids);
|
||||
List<DataCollectionEmployee> getEmployeeByIds(@Param("collection") List<Long> ids);
|
||||
|
||||
List<DataCollectionEmployee> getEmployeeByIdsAll(@Param("collection") List<Long> ids);
|
||||
List<DataCollectionEmployee> getEmployeeByIdsAll(@Param("collection") List<Long> ids);
|
||||
|
||||
List<PositionInfo> listPositionInfo(@Param("collection") List<Long> ids);
|
||||
List<DataCollectionEmployee> getAdminEmployeeByIds(@Param("collection") List<Long> list);
|
||||
|
||||
List<DataCollectionEmployee> getAdminEmployeeByIds(@Param("collection") List<Long> list);
|
||||
List<DataCollectionEmployee> getEmployeeIdsByUserName(@Param("userName") String userName);
|
||||
|
||||
List<DataCollectionEmployee> getEmployeeIdsByUserName(@Param("userName") String userName);
|
||||
/**
|
||||
* 根据薪资账套的人员范围转换而成的查询参数查询人员
|
||||
*
|
||||
* @param queryParams 薪资账套的人员范围转换而成的查询参数
|
||||
* @return
|
||||
*/
|
||||
List<DataCollectionEmployee> listByParams(@Param("params") Collection<SalarySobRangeEmpQueryParam> queryParams);
|
||||
|
||||
/**
|
||||
* 根据薪资账套的人员范围转换而成的查询参数查询人员
|
||||
*
|
||||
* @param queryParams 薪资账套的人员范围转换而成的查询参数
|
||||
* @return
|
||||
*/
|
||||
List<DataCollectionEmployee> listByParams(@Param("params") Collection<SalarySobRangeEmpQueryParam> queryParams);
|
||||
DataCollectionEmployee getEmployeeById(Long employeeId);
|
||||
|
||||
DataCollectionEmployee getEmployeeById(Long employeeId);
|
||||
List<DataCollectionEmployee> listAll();
|
||||
|
||||
List<PositionInfo> listPositionInfo(@Param("collection") List<Long> ids);
|
||||
|
||||
List<DeptInfo> getDeptInfoList(@Param("departmentIds") List<Long> departmentIds);
|
||||
|
||||
List<SubCompanyInfo> getSubCompanyInfoList(List<Long> subDepartmentIds);
|
||||
}
|
||||
|
|
@ -39,6 +39,7 @@
|
|||
e.lastname as username,
|
||||
e.status as status,
|
||||
e.workcode as workcode,
|
||||
e.certificatenum as idNo,
|
||||
d.departmentname as departmentName,
|
||||
d.id as departmentId,
|
||||
c.jobtitlename as jobtitleName,
|
||||
|
|
@ -90,6 +91,7 @@
|
|||
select e.id as employeeId,
|
||||
e.lastname as username,
|
||||
e.status as status,
|
||||
e.certificatenum as idNo,
|
||||
e.workcode as workcode,
|
||||
d.departmentname as departmentName,
|
||||
d.id as departmentId,
|
||||
|
|
@ -149,6 +151,7 @@
|
|||
select e.id as employeeId,
|
||||
e.lastname as username,
|
||||
e.status as status,
|
||||
e.certificatenum as idNo,
|
||||
e.workcode as workcode,
|
||||
d.departmentname as departmentName,
|
||||
d.id as departmentId,
|
||||
|
|
@ -179,7 +182,7 @@
|
|||
<if test="userName != null and userName != ''">
|
||||
AND
|
||||
(
|
||||
a.lastname like '%'||#{userName}||'%'
|
||||
a.lastname like '%'||#{userName}||'%'
|
||||
)
|
||||
</if>
|
||||
</sql>
|
||||
|
|
@ -194,11 +197,60 @@
|
|||
|
||||
<select id="getEmployeeIdsByUserName" resultType="com.engine.salary.entity.datacollection.DataCollectionEmployee">
|
||||
select
|
||||
a.LASTNAME as username
|
||||
a.LASTNAME as username
|
||||
from hrmresource a
|
||||
where
|
||||
1 = 1
|
||||
<include refid="paramSql"/>
|
||||
</select>
|
||||
|
||||
<select id="listAll" resultType="com.engine.salary.entity.datacollection.DataCollectionEmployee">
|
||||
select e.id as employeeId,
|
||||
e.lastname as username,
|
||||
e.status as status,
|
||||
e.workcode as workcode,
|
||||
e.certificatenum as idNo,
|
||||
d.departmentname as departmentName,
|
||||
d.id as departmentId,
|
||||
c.jobtitlename as jobtitleName,
|
||||
c.id as jobtitleId,
|
||||
e.companystartdate as companystartdate,
|
||||
e.mobile as mobile,
|
||||
b.dismissdate as dismissdate
|
||||
from hrmresource e
|
||||
left join hrmdepartment d on e.departmentid = d.id
|
||||
left join hrmjobtitles c on e.jobtitle = c.id
|
||||
left join bill_hrmdismiss b on e.id = b.resource_n
|
||||
where e.status not in (7)
|
||||
AND e.id = #{id}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getDeptInfoList" resultType="com.engine.salary.entity.hrm.DeptInfo">
|
||||
select d.departmentname as name,
|
||||
d.id as id
|
||||
from hrmdepartment d
|
||||
where 1=1
|
||||
<if test="departmentIds != null and departmentIds.size()>0">
|
||||
AND d.id IN
|
||||
<foreach collection="departmentIds" open="(" item="departmentId" separator="," close=")">
|
||||
#{departmentId}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getSubCompanyInfoList" resultType="com.engine.salary.entity.hrm.SubCompanyInfo">
|
||||
select d.subcompanyname as name,
|
||||
d.id as id
|
||||
from hrmsubcompany d
|
||||
where 1=1
|
||||
<if test="subDepartmentIds != null and subDepartmentIds.size()>0">
|
||||
AND d.id IN
|
||||
<foreach collection="subDepartmentIds" open="(" item="subDepartmentId" separator="," close=")">
|
||||
#{subDepartmentId}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue