人员报送,业务线功能
This commit is contained in:
parent
b1c1587344
commit
e25c1f59d2
|
|
@ -39,6 +39,11 @@
|
|||
<opt name="管理" key="admin"/>
|
||||
</page>
|
||||
|
||||
<page name="人员报送" key="employeeDeclare">
|
||||
<opt name="查询" key="query"/>
|
||||
<opt name="管理" key="admin"/>
|
||||
</page>
|
||||
|
||||
<page name="个税申报" key="taxDeclaration">
|
||||
<opt name="查询" key="query"/>
|
||||
<opt name="管理" key="admin"/>
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@ import lombok.Data;
|
|||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 人员报送(个税扣缴义务人)列表
|
||||
* <p>Copyright: Copyright (c) 2023</p>
|
||||
|
|
@ -26,4 +28,6 @@ public class TaxAgentDeclareListDTO {
|
|||
|
||||
// 个税扣缴义务人
|
||||
private String taxAgentName;
|
||||
|
||||
Set<String> opts;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,8 +11,10 @@ import com.engine.salary.entity.employeedeclare.bo.EmployeeDeclareList;
|
|||
import com.engine.salary.entity.employeedeclare.dto.*;
|
||||
import com.engine.salary.entity.employeedeclare.param.*;
|
||||
import com.engine.salary.entity.employeedeclare.po.EmployeeDeclarePO;
|
||||
import com.engine.salary.entity.taxagent.param.TaxAgentQueryParam;
|
||||
import com.engine.salary.entity.taxagent.po.TaxAgentPO;
|
||||
import com.engine.salary.enums.SalaryOnOffEnum;
|
||||
import com.engine.salary.enums.auth.AuthFilterTypeEnum;
|
||||
import com.engine.salary.enums.employeedeclare.*;
|
||||
import com.engine.salary.enums.salaryaccounting.EmployeeTypeEnum;
|
||||
import com.engine.salary.exception.SalaryRunTimeException;
|
||||
|
|
@ -28,6 +30,7 @@ import com.engine.salary.util.page.SalaryPageUtil;
|
|||
import com.engine.salary.util.valid.ValidUtil;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.common.collect.Sets;
|
||||
import com.weaver.util.threadPool.ThreadPoolUtil;
|
||||
import com.weaver.util.threadPool.constant.ModulePoolEnum;
|
||||
import com.weaver.util.threadPool.entity.LocalRunnable;
|
||||
|
|
@ -83,24 +86,21 @@ public class EmployeeDeclareWrapper extends Service {
|
|||
* @return
|
||||
*/
|
||||
public PageInfo<TaxAgentDeclareListDTO> taxAgentDeclareList(TaxAgentDeclareListQueryParam queryParam) {
|
||||
// 判断是否是“总管理员”
|
||||
Boolean isChief = getTaxAgentService(user).isChief(Long.valueOf(user.getUID()));
|
||||
// 是否开启分权
|
||||
Boolean openDevolution = getTaxAgentService(user).isOpenDevolution();
|
||||
// 查询个税扣缴义务人
|
||||
List<TaxAgentPO> taxAgents = Lists.newArrayList();
|
||||
if (!openDevolution || isChief) {
|
||||
taxAgents = getTaxAgentService(user).listAll();
|
||||
} else {
|
||||
taxAgents = new ArrayList<>(getTaxAgentService(user).listAllTaxAgentsAsAdmin(Long.valueOf(user.getUID())));
|
||||
}
|
||||
TaxAgentQueryParam param = TaxAgentQueryParam.builder().build();
|
||||
param.setFilterType(AuthFilterTypeEnum.QUERY_DATA);
|
||||
List<TaxAgentPO> taxAgents = getTaxAgentService(user).listAuth(param);
|
||||
|
||||
if (StringUtils.isNotEmpty(queryParam.getTaxAgentName())) {
|
||||
taxAgents = taxAgents.stream().filter(e -> StringUtils.contains(e.getName(), queryParam.getTaxAgentName())).collect(Collectors.toList());
|
||||
}
|
||||
// 分页
|
||||
List<TaxAgentDeclareListDTO> dtoList = Lists.newArrayList();
|
||||
for (TaxAgentPO taxAgent : taxAgents) {
|
||||
TaxAgentDeclareListDTO dto = new TaxAgentDeclareListDTO().setId(taxAgent.getId()).setTaxAgentName(taxAgent.getName());
|
||||
TaxAgentDeclareListDTO dto = TaxAgentDeclareListDTO.builder()
|
||||
.id(taxAgent.getId())
|
||||
.taxAgentName(taxAgent.getName())
|
||||
.opts(Sets.newHashSet("admin"))
|
||||
.build();
|
||||
dtoList.add(dto);
|
||||
}
|
||||
return SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(), dtoList, TaxAgentDeclareListDTO.class);
|
||||
|
|
@ -122,14 +122,6 @@ public class EmployeeDeclareWrapper extends Service {
|
|||
List<EmployeeDeclareListDTO> convert = getEmployeeDeclareService(user).convert(employeeDeclarePOS);
|
||||
pageInfo.setList(convert);
|
||||
|
||||
// // 判断是否开启分部
|
||||
// boolean subcompanySupport = hrmConfigSetCache.isSubcompanySupport(tenantKey);
|
||||
// if (!subcompanySupport) {
|
||||
// weaTable.getColumns().stream()
|
||||
// .filter(e -> Objects.equals(e.getDataIndex(), "subCompanyName"))
|
||||
// .findAny()
|
||||
// .ifPresent(weaTableColumn -> weaTableColumn.setHide(true));
|
||||
// }
|
||||
SalaryWeaTable<EmployeeDeclareListDTO> table = new SalaryWeaTable<>(user, EmployeeDeclareListDTO.class);
|
||||
WeaResultMsg result = new WeaResultMsg(false);
|
||||
result.putAll(table.makeDataResult());
|
||||
|
|
|
|||
Loading…
Reference in New Issue