支持扣缴义务人选项
This commit is contained in:
parent
a48d4cea11
commit
174838382a
|
|
@ -3,10 +3,14 @@ package com.engine.salary.enums.auth;
|
|||
import com.engine.common.service.HrmCommonService;
|
||||
import com.engine.common.service.impl.HrmCommonServiceImpl;
|
||||
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
||||
import com.engine.salary.entity.taxagent.po.TaxAgentEmpPO;
|
||||
import com.engine.salary.enums.BaseEnum;
|
||||
import com.engine.salary.enums.datacollection.UseEmployeeTypeEnum;
|
||||
import com.engine.salary.exception.SalaryRunTimeException;
|
||||
import com.engine.salary.service.impl.SalaryEmployeeServiceImpl;
|
||||
import com.engine.salary.service.impl.TaxAgentEmpServiceImpl;
|
||||
import com.engine.salary.util.SalaryEntityUtil;
|
||||
import com.google.common.collect.Lists;
|
||||
import weaver.conn.RecordSet;
|
||||
|
||||
import java.util.*;
|
||||
|
|
@ -77,27 +81,27 @@ public enum DataTargetTypeEnum implements BaseEnum<Integer> {
|
|||
return memberList;
|
||||
}
|
||||
},
|
||||
ALL(7, "所有人", 87626) {
|
||||
@Override
|
||||
public Set<Long> getEmpIds(String target, Object... param) {
|
||||
Set<Long> memberList = new HashSet<>();
|
||||
RecordSet rs = new RecordSet();
|
||||
if (rs.execute("select id from hrmresource where status not in (7) and (accounttype is null or accounttype = 0) ")) {
|
||||
while (rs.next()) {
|
||||
memberList.add(Long.parseLong(rs.getString("id")));
|
||||
}
|
||||
}
|
||||
return memberList;
|
||||
}
|
||||
},
|
||||
LOGIN_PERSON(8, "登录人", 87626) {
|
||||
//参数1,登录人信息
|
||||
@Override
|
||||
public Set<Long> getEmpIds(String target, Object... param) {
|
||||
LoginPersonTargetTypeEnum loginPersonTargetTypeEnum = LoginPersonTargetTypeEnum.parseByValue(Integer.parseInt(target));
|
||||
return loginPersonTargetTypeEnum.getEmpIds((DataCollectionEmployee) param[0]);
|
||||
}
|
||||
},
|
||||
// ALL(7, "所有人", 87626) {
|
||||
// @Override
|
||||
// public Set<Long> getEmpIds(String target, Object... param) {
|
||||
// Set<Long> memberList = new HashSet<>();
|
||||
// RecordSet rs = new RecordSet();
|
||||
// if (rs.execute("select id from hrmresource where status not in (7) and (accounttype is null or accounttype = 0) ")) {
|
||||
// while (rs.next()) {
|
||||
// memberList.add(Long.parseLong(rs.getString("id")));
|
||||
// }
|
||||
// }
|
||||
// return memberList;
|
||||
// }
|
||||
// },
|
||||
// LOGIN_PERSON(8, "登录人", 87626) {
|
||||
// //参数1,登录人信息
|
||||
// @Override
|
||||
// public Set<Long> getEmpIds(String target, Object... param) {
|
||||
// LoginPersonTargetTypeEnum loginPersonTargetTypeEnum = LoginPersonTargetTypeEnum.parseByValue(Integer.parseInt(target));
|
||||
// return loginPersonTargetTypeEnum.getEmpIds((DataCollectionEmployee) param[0]);
|
||||
// }
|
||||
// },
|
||||
SOB(9, "账套", 87626) {
|
||||
@Override
|
||||
public Set<Long> getEmpIds(String target, Object... param) {
|
||||
|
|
@ -106,7 +110,16 @@ public enum DataTargetTypeEnum implements BaseEnum<Integer> {
|
|||
return SalaryEntityUtil.properties(employeeList, DataCollectionEmployee::getEmployeeId);
|
||||
}
|
||||
},
|
||||
SQL(10, "sql", 87626) {
|
||||
TAX(10, "扣缴义务人", 87626) {
|
||||
@Override
|
||||
public Set<Long> getEmpIds(String target, Object... param) {
|
||||
TaxAgentEmpServiceImpl taxAgentEmpServiceImpl = new TaxAgentEmpServiceImpl();
|
||||
List<Long> taxIds = Lists.newArrayList(Long.valueOf(target));
|
||||
List<TaxAgentEmpPO> taxAgentEmpPOS = taxAgentEmpServiceImpl.listByTaxAgentIds(taxIds, UseEmployeeTypeEnum.ORG);
|
||||
return SalaryEntityUtil.properties(taxAgentEmpPOS, TaxAgentEmpPO::getEmployeeId);
|
||||
}
|
||||
},
|
||||
SQL(11, "SQL", 87626) {
|
||||
@Override
|
||||
public Set<Long> getEmpIds(String target, Object... param) {
|
||||
//参数1,登录人信息
|
||||
|
|
|
|||
Loading…
Reference in New Issue