业务线配置

This commit is contained in:
钱涛 2024-09-09 19:10:40 +08:00
parent 1dd8f12534
commit a0fb036bce
16 changed files with 181 additions and 201 deletions

View File

@ -29,6 +29,10 @@
<opt name="查询" key="query"/>
<opt name="管理" key="admin"/>
</page>
<page name="累计专项附加扣除" key="addUpDeduction">
<opt name="查询" key="query"/>
<opt name="管理" key="admin"/>
</page>
</module>
<module name="报表" key="report">

View File

@ -1,5 +1,6 @@
package com.engine.salary.common;
import com.engine.salary.enums.auth.AuthFilterTypeEnum;
import com.engine.salary.sys.entity.vo.OrderRuleVO;
import lombok.AllArgsConstructor;
import lombok.Data;
@ -24,4 +25,6 @@ public class BaseQueryParam {
* 排序规则
*/
private OrderRuleVO orderRule;
private AuthFilterTypeEnum filterType ;
}

View File

@ -1,11 +1,15 @@
package com.engine.salary.entity.auth.dto;
import com.engine.salary.annotation.TableTitle;
import com.engine.salary.entity.salarysob.po.SalarySobPO;
import com.engine.salary.entity.taxagent.po.TaxAgentPO;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
/**
* 角色
*/
@ -23,6 +27,16 @@ public class AuthRoleDTO {
@TableTitle(title = "描述", dataIndex = "description", key = "description")
private String description;
/**
* 扣缴义务人资源
*/
private List<TaxAgentPO> taxAgentIds;
/**
* 账套资源
*/
private List<SalarySobPO> sobIds;
@TableTitle(title = "成员", dataIndex = "members", key = "members")
private Integer members;
@ -35,4 +49,5 @@ public class AuthRoleDTO {
@TableTitle(title = "数据", dataIndex = "datas", key = "datas")
private Integer datas;
}

View File

@ -9,6 +9,8 @@ import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Set;
/**
* 数据采集-累计专项附加扣除
* <p>Copyright: Copyright (c) 2022</p>
@ -24,6 +26,7 @@ import lombok.NoArgsConstructor;
@SalaryTable(pageId = "a4f85287-e3f9-4275-adn9-7d06e54y67j8", tableType = WeaTableType.CHECKBOX, operates = {
@SalaryTableOperate(text = "查看明细")
})
@Auth(page = "addUpDeduction")
public class AddUpDeductionDTO {
/**
@ -164,4 +167,6 @@ public class AddUpDeductionDTO {
@SalaryTableColumn(text = "操作", width = "20%", column = "operate")
@TableTitle(title = "操作", dataIndex = "operate", key = "operate")
private String operate;
private Set<String> opts;
}

View File

@ -1,8 +1,10 @@
package com.engine.salary.entity.salaryBill.dto;
import com.engine.salary.annotation.Auth;
import com.engine.salary.annotation.SalaryTable;
import com.engine.salary.annotation.SalaryTableColumn;
import com.engine.salary.annotation.SalaryTableOperate;
import com.engine.salary.enums.auth.AuthCheckTypeEnum;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Builder;
@ -10,6 +12,7 @@ import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;
import java.util.Set;
/**
* @Description: 工资单发放
@ -19,10 +22,11 @@ import java.util.Date;
@NoArgsConstructor
@AllArgsConstructor
@SalaryTable(pageId = "a4f85287-289dff07669d7a23de0ef88d2f7129e7", operates = {
@SalaryTableOperate(index = "0", text = "发放" ),
@SalaryTableOperate(index = "0", text = "发放"),
@SalaryTableOperate(index = "1", text = "查看详情"),
@SalaryTableOperate(index = "2", text = "更新模板")
})
@Auth(page = "salaryBill", checkType = AuthCheckTypeEnum.SOB, sobIdField = "salarySobId")
public class SalarySendListDTO {
// 主键id
@ -37,7 +41,7 @@ public class SalarySendListDTO {
// )
// @JsonFormat(pattern = "yyyy-MM")
// 薪资所属月
// 薪资所属月
@SalaryTableColumn(text = "薪资所属月", width = "10%", column = "salaryYearMonth")
private Date salaryYearMonth;
@ -54,15 +58,15 @@ public class SalarySendListDTO {
// tableColumn = @TableColumn(width = "35%")
// )
// 薪资账套
// 薪资账套
@SalaryTableColumn(text = "薪资账套", width = "35%", column = "username")
private String salarySob;
// 核算次数")
// 核算次数")
// 核算次数
private String acctTimes;
// 工资单模板")
// 工资单模板")
// @WeaFormat(
// label = "工资单模板",
// labelId = 93214,
@ -72,7 +76,7 @@ public class SalarySendListDTO {
// 工资单模板
private String template;
// 工资单模板Id")
// 工资单模板Id")
// 工资单模板Id
@SalaryTableColumn(text = "工资单模板id", width = "0%", column = "templateId", display = false)
private Long templateId;
@ -91,7 +95,7 @@ public class SalarySendListDTO {
@SalaryTableColumn(text = "发送总数", width = "0%", column = "sendTotal", display = false)
private Integer sendTotal;
// 已发放")
// 已发放")
// @WeaFormat(
// label = "已发放",
// labelId = 93212,
@ -101,7 +105,7 @@ public class SalarySendListDTO {
@SalaryTableColumn(text = "已发放", width = "15%", column = "sendSituation")
private String sendSituation;
// 最后发送时间")
// 最后发送时间")
// @WeaFormat(
// label = "最后发送时间",
// labelId = 93213,
@ -146,5 +150,5 @@ public class SalarySendListDTO {
*/
private Integer ackFeedbackStatus;
private Set<String> opts;
}

View File

@ -52,6 +52,7 @@ public interface SalarySendService {
* @return
*/
PageInfo<SalarySendListDTO> listPage(SalarySendQueryParam queryParam);
List<SalarySendListDTO> list(SalarySendQueryParam queryParam);
/**
* 工资单发放

View File

@ -19,6 +19,8 @@ public interface AuthRoleService {
PageInfo<AuthRoleDTO> roleList(AuthRoleListQueryParam param);
AuthRoleDTO getRole(Long id);
/**
* 添加角色
* @param param

View File

@ -24,6 +24,7 @@ import com.engine.salary.util.page.PageInfo;
import com.engine.salary.util.page.SalaryPageUtil;
import weaver.hrm.User;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.List;
@ -79,7 +80,32 @@ public class AuthRoleServiceImpl extends Service implements AuthRoleService {
}
@Override
public Long saveRole(AuthRoleSaveParam param) {
public AuthRoleDTO getRole(Long id) {
AuthRolePO po = getAuthRoleMapper().getById(id);
Long roleId = po.getId();
List<AuthResourcePO> authResources = getAuthResourceMapper().listSome(AuthResourcePO.builder().roleId(roleId).build());
List<TaxAgentPO> taxAgentIds = new ArrayList<>();
List<SalarySobPO> sobIds = new ArrayList<>();
authResources.forEach(resource -> {
if (ResourceTargetTypeEnum.TAX_AGENT.getValue().equals(resource.getTargetType())) {
taxAgentIds.add(TaxAgentPO.builder().id(resource.getTarget()).name(resource.getTargetName()).build());
} else if (ResourceTargetTypeEnum.SOB.getValue().equals(resource.getTargetType())) {
sobIds.add(SalarySobPO.builder().id(resource.getTarget()).name(resource.getTargetName()).build());
}
});
return AuthRoleDTO.builder()
.id(roleId)
.name(po.getName())
.description(po.getDescription())
.taxAgentIds(taxAgentIds)
.sobIds(sobIds)
.build();
}
@Override
public Long saveRole(AuthRoleSaveParam param) {
Date now = new Date();
Long id = param.getId();
String name = param.getName();

View File

@ -67,6 +67,7 @@ public class AuthServiceImpl extends Service implements AuthService {
//给总管理员赋值最大权限
Boolean isChief = getTaxAgentService(user).isChief((long) user.getUID());
// Boolean isChief = false;
if (isChief) {
if (filterType == AuthFilterTypeEnum.DATA_OPT) {
list.forEach(t -> {
@ -95,7 +96,8 @@ public class AuthServiceImpl extends Service implements AuthService {
AuthCheckTypeEnum checkType = auth.checkType();
//给各管理员赋值对应的扣缴义务人权限
List<Long> adminTaxAgentIds = getTaxAgentService(user).getAdminTaxAgentIds((long) user.getUID());
// List<Long> adminTaxAgentIds = getTaxAgentService(user).getAdminTaxAgentIds((long) user.getUID());
List<Long> adminTaxAgentIds = new ArrayList<>();
if (CollectionUtil.isNotEmpty(adminTaxAgentIds)) {
Iterator<T> iterator = list.iterator();
if (checkType == AuthCheckTypeEnum.TAX || checkType == AuthCheckTypeEnum.TAX_EMP) {

View File

@ -32,11 +32,14 @@ import com.engine.salary.entity.taxagent.dto.TaxAgentManageRangeEmployeeDTO;
import com.engine.salary.entity.taxagent.po.TaxAgentPO;
import com.engine.salary.enums.OperateTypeEnum;
import com.engine.salary.enums.UserStatusEnum;
import com.engine.salary.enums.auth.AuthFilterTypeEnum;
import com.engine.salary.enums.salaryaccounting.SalaryAcctRecordStatusEnum;
import com.engine.salary.exception.SalaryRunTimeException;
import com.engine.salary.mapper.datacollection.AddUpDeductionMapper;
import com.engine.salary.mapper.sys.SalarySysConfMapper;
import com.engine.salary.service.*;
import com.engine.salary.service.auth.AuthService;
import com.engine.salary.service.auth.AuthServiceImpl;
import com.engine.salary.sys.entity.po.SalarySysConfPO;
import com.engine.salary.sys.entity.vo.OrderRuleVO;
import com.engine.salary.sys.service.SalarySysConfService;
@ -116,6 +119,11 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
return ServiceUtil.getService(SpecialAddDeductionServiceImpl.class, user);
}
public AuthService getAuthService(User user) {
return ServiceUtil.getService(AuthServiceImpl.class, user);
}
@Override
public Map<String, Object> getSearchCondition(Map<String, Object> params) {
Map<String, Object> apidatas = new HashMap<String, Object>();
@ -219,12 +227,7 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
Date now = new Date();
//待插入数据库对象
AddUpDeduction addUpDeduction = AddUpDeduction.builder()
.tenantKey(DEFAULT_TENANT_KEY)
.createTime(now)
.updateTime(now)
.creator((long) user.getUID())
.declareMonth(declareMonth).build();
AddUpDeduction addUpDeduction = AddUpDeduction.builder().tenantKey(DEFAULT_TENANT_KEY).createTime(now).updateTime(now).creator((long) user.getUID()).declareMonth(declareMonth).build();
//异常点数量
int errorSum = 0;
@ -256,9 +259,7 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
errorSum += 1;
} else if (employeeSameIds.size() > 1) {
//存在离职和在职状态取在职状态
employeeSameIds = employeeSameIds.stream()
.filter(e -> UserStatusEnum.getNormalStatus().contains(e.getStatus()))
.collect(Collectors.toList());
employeeSameIds = employeeSameIds.stream().filter(e -> UserStatusEnum.getNormalStatus().contains(e.getStatus())).collect(Collectors.toList());
if (employeeSameIds.size() != 1) {
Map<String, String> errorMessageMap = Maps.newHashMap();
errorMessageMap.put("message", rowIndex + "员工信息不存在或者存在多个员工");
@ -480,8 +481,7 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel(0, "累计专项附加扣除") + "-" + addUpDeduction.getId());
loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue());
loggerContext.setOperateTypeName(name);
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "累计专项附加扣除") + "-" + SalaryI18nUtil
.getI18nLabel(0, "编辑"));
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "累计专项附加扣除") + "-" + SalaryI18nUtil.getI18nLabel(0, "编辑"));
loggerContext.setOldValues(byId);
loggerContext.setNewValues(newValue);
loggerContext.setUser(user);
@ -518,12 +518,7 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
List<TaxAgentManageRangeEmployeeDTO.TaxAgentEmployee> taxAgentEmployees = Lists.newArrayList();
Date now = new Date();
//待插入数据库对象
AddUpDeduction addUpDeduction = AddUpDeduction.builder()
.tenantKey(DEFAULT_TENANT_KEY)
.createTime(now)
.updateTime(now)
.creator((long) user.getUID())
.declareMonth(declareMonth).build();
AddUpDeduction addUpDeduction = AddUpDeduction.builder().tenantKey(DEFAULT_TENANT_KEY).createTime(now).updateTime(now).creator((long) user.getUID()).declareMonth(declareMonth).build();
boolean employeeSameId = employees.stream().anyMatch(e -> Objects.equals(e.getEmployeeId(), addUpDeductionRecordParam.getEmployeeId()));
if (!employeeSameId) {
throw new SalaryRunTimeException("员工信息不存在");
@ -647,8 +642,7 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
loggerContext.setTargetName(SalaryI18nUtil.getI18nLabel(0, "累计专项附加扣除") + "-" + e.getId());
loggerContext.setOperateType(OperateTypeEnum.DELETE.getValue());
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "删除"));
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "累计专项附加扣除") + "-" + SalaryI18nUtil
.getI18nLabel(0, "删除"));
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "累计专项附加扣除") + "-" + SalaryI18nUtil.getI18nLabel(0, "删除"));
loggerContext.setOldValues(e);
loggerContext.setUser(user);
SalaryElogConfig.addUpDeductionLoggerTemplate.write(loggerContext);
@ -702,16 +696,14 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
// 记录日志
Collection<Long> finalTaxAgentIds = queryParam.getTaxAgentIds();
List<String> taxAgentNames = taxAgentList.stream().filter(t -> finalTaxAgentIds.contains(t.getTaxAgentId()))
.map(TaxAgentManageRangeEmployeeDTO::getTaxAgentName).collect(Collectors.toList());
List<String> taxAgentNames = taxAgentList.stream().filter(t -> finalTaxAgentIds.contains(t.getTaxAgentId())).map(TaxAgentManageRangeEmployeeDTO::getTaxAgentName).collect(Collectors.toList());
String name = declareMonthStr + " " + StringUtils.join(taxAgentNames, ",");
LoggerContext<AddUpDeduction> loggerContext = new LoggerContext<>();
loggerContext.setUser(user);
loggerContext.setTargetName(name);
loggerContext.setOperateType(OperateTypeEnum.CLEAR.getValue());
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "一键清空"));
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "累计专项附加扣除") + "-" + SalaryI18nUtil
.getI18nLabel(0, "一键清空:") + name);
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "累计专项附加扣除") + "-" + SalaryI18nUtil.getI18nLabel(0, "一键清空:") + name);
SalaryElogConfig.addUpDeductionLoggerTemplate.write(loggerContext);
}
@ -745,8 +737,7 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
try {
Util_DataCache.setObjVal(cacheKey, true);
//如果是定时任务直接查询所有isAdmin传true
boolean isChief = Boolean.TRUE.equals(isAdmin)
|| getTaxAgentService(user).isChief((long) user.getUID());
boolean isChief = Boolean.TRUE.equals(isAdmin) || getTaxAgentService(user).isChief((long) user.getUID());
Collection<TaxAgentPO> taxAgents;
if (isChief) {
taxAgents = getTaxAgentService(user).listAll();
@ -759,25 +750,18 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
}
LocalDateTime yearMonthTime = DateUtil.toLocalDateTime(yearMonth);
//设置时间到下一年1月1号
Instant instant = yearMonthTime.plusYears(1L)
.withMonth(1).withDayOfMonth(1)
.atZone(ZoneOffset.systemDefault()).toInstant();
Instant instant = yearMonthTime.plusYears(1L).withMonth(1).withDayOfMonth(1).atZone(ZoneOffset.systemDefault()).toInstant();
Date nextYearStart = Date.from(instant);
int countByDeclareAfter = getAddUpDeductionMapper()
.countByDeclareAfter(yearMonth, nextYearStart,
taxAgents.stream().map(TaxAgentPO::getId).collect(Collectors.toList())
);
int countByDeclareAfter = getAddUpDeductionMapper().countByDeclareAfter(yearMonth, nextYearStart, taxAgents.stream().map(TaxAgentPO::getId).collect(Collectors.toList()));
if (countByDeclareAfter > 0) {
throw new SalaryRunTimeException("无法累计,请检查当前累计年度内该月后是否有累计专项附加扣除记录!");
}
List<AddUpDeduction> updateList = new ArrayList<>();
List<AddUpDeduction> insertList = new ArrayList<>();
List<Long> errorMessages = new ArrayList<>();
List<SalaryAcctEmployeePO> accountedEmployeeData =
getAccountedEmployeeData(DateUtil.format(yearMonth, "yyyy-MM"));
List<SalaryAcctEmployeePO> accountedEmployeeData = getAccountedEmployeeData(DateUtil.format(yearMonth, "yyyy-MM"));
for (TaxAgentPO taxAgent : taxAgents) {
List<SpecialAddDeductionPO> employeePOs = getSpecialAddDeductionService(user)
.getSpecialAddDeductionPOByEmployee(null, taxAgent.getId());
List<SpecialAddDeductionPO> employeePOs = getSpecialAddDeductionService(user).getSpecialAddDeductionPOByEmployee(null, taxAgent.getId());
//获取上月员工数据用于累加
@ -797,17 +781,12 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
employeePOs.forEach(employeePO -> {
Long employeeId = employeePO.getEmployeeId();
// 如果该员工当前月份已经核算不做累计
SalaryAcctEmployeePO anyAccountedEmployee = accountedEmployeeData.stream()
.filter(e -> e.getEmployeeId().equals(employeeId))
.filter(e -> e.getTaxAgentId().equals(taxAgent.getId()))
.findAny().orElse(null);
SalaryAcctEmployeePO anyAccountedEmployee = accountedEmployeeData.stream().filter(e -> e.getEmployeeId().equals(employeeId)).filter(e -> e.getTaxAgentId().equals(taxAgent.getId())).findAny().orElse(null);
if (anyAccountedEmployee != null) {
errorMessages.add(employeeId);
return;
}
AddUpDeduction addUpDeduction = Optional.ofNullable(lastEmpInfo.get(employeeId))
.flatMap(list -> list.stream().findFirst())
.orElseGet(AddUpDeduction::new);
AddUpDeduction addUpDeduction = Optional.ofNullable(lastEmpInfo.get(employeeId)).flatMap(list -> list.stream().findFirst()).orElseGet(AddUpDeduction::new);
this.combine(addUpDeduction, employeePO);
addUpDeduction.setEmployeeId(employeeId);
@ -817,9 +796,7 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
addUpDeduction.setTenantKey(DEFAULT_TENANT_KEY);
//确认当期是否有已经累计的记录
AddUpDeduction oldInfo = Optional.ofNullable(currentEmpInfo.get(employeeId))
.flatMap(c -> c.stream().findFirst())
.orElse(null);
AddUpDeduction oldInfo = Optional.ofNullable(currentEmpInfo.get(employeeId)).flatMap(c -> c.stream().findFirst()).orElse(null);
Date now = new Date();
if (oldInfo == null) {
addUpDeduction.setCreateTime(now);
@ -833,10 +810,8 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
}
});
}
Lists.partition(insertList, 100)
.forEach(l -> getAddUpDeductionMapper().insertData((List<AddUpDeduction>) l));
Lists.partition(updateList, 100)
.forEach(l -> getAddUpDeductionMapper().updateDataAndDeclareMonth((List<AddUpDeduction>) l));
Lists.partition(insertList, 100).forEach(l -> getAddUpDeductionMapper().insertData((List<AddUpDeduction>) l));
Lists.partition(updateList, 100).forEach(l -> getAddUpDeductionMapper().updateDataAndDeclareMonth((List<AddUpDeduction>) l));
// 记录日志
// 根据月份人员id查出保存的数据
@ -863,11 +838,7 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
}
if (!errorMessages.isEmpty()) {
String userNames = getSalaryEmployeeService(user)
.getEmployeeByIdsAll(errorMessages)
.stream()
.map(DataCollectionEmployee::getUsername)
.collect(Collectors.joining(","));
String userNames = getSalaryEmployeeService(user).getEmployeeByIdsAll(errorMessages).stream().map(DataCollectionEmployee::getUsername).collect(Collectors.joining(","));
return "一键累计完成!员工" + userNames + "在该年月已核算归档,跳过本次累计";
}
return "一键累计完成!";
@ -907,16 +878,12 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
}
private String plus(String var0, String var1) {
return SalaryEntityUtil.string2BigDecimalDefault0(var0)
.add(SalaryEntityUtil.string2BigDecimalDefault0(var1))
.toString();
return SalaryEntityUtil.string2BigDecimalDefault0(var0).add(SalaryEntityUtil.string2BigDecimalDefault0(var1)).toString();
}
private Map<Long, List<AddUpDeduction>> getEmpInfoByYearMonth(TaxAgentPO taxAgent, List<SpecialAddDeductionPO> employeePOs, YearMonth lastMonth) {
List<AddUpDeduction> addUpDeductionList = getAddUpDeductionList(lastMonth, employeePOs.stream().map(SpecialAddDeductionPO::getEmployeeId).collect(Collectors.toList()), Collections.singletonList(taxAgent.getId()));
return addUpDeductionList.stream()
.filter(addUpDeduction -> taxAgent.getId().equals(addUpDeduction.getTaxAgentId()))
.collect(Collectors.groupingBy(AddUpDeduction::getEmployeeId));
return addUpDeductionList.stream().filter(addUpDeduction -> taxAgent.getId().equals(addUpDeduction.getTaxAgentId())).collect(Collectors.groupingBy(AddUpDeduction::getEmployeeId));
}
@ -975,26 +942,12 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
queryParam.setDeclareMonthDate(declareMonth.stream().map(e -> e + "-01 00:00:00").map(SalaryDateUtil::dateStrToLocalTime).collect(Collectors.toList()));
}
long employeeId = user.getUID();
Boolean needAuth = getTaxAgentService(user).isNeedAuth(employeeId);
if (needAuth) {
List<Long> taxAgentIdsAsAdmin = getTaxAgentService(user).listAllTaxAgentsAsAdmin(employeeId).stream().map(TaxAgentPO::getId).collect(Collectors.toList());
if (CollectionUtils.isEmpty(taxAgentIdsAsAdmin)) {
return new PageInfo<>(AddUpDeductionDTO.class);
}
// 过滤义务人筛选框
if (CollectionUtils.isNotEmpty(queryParam.getTaxAgentIds())) {
taxAgentIdsAsAdmin = taxAgentIdsAsAdmin.stream().filter(id -> queryParam.getTaxAgentIds().contains(id)).collect(Collectors.toList());
}
queryParam.setTaxAgentIds(taxAgentIdsAsAdmin);
}
//排序配置
OrderRuleVO orderRule = getSalarySysConfService(user).orderRule();
queryParam.setOrderRule(orderRule);
List<AddUpDeductionDTO> list = getAddUpDeductionMapper().list(queryParam);
list = getAuthService(user).auth(list, AuthFilterTypeEnum.DATA_OPT, AddUpDeductionDTO.class);
PageInfo<AddUpDeductionDTO> pageInfo = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(), list, AddUpDeductionDTO.class);
encryptUtil.decryptList(pageInfo.getList(), AddUpDeductionDTO.class);
return pageInfo;
@ -1014,8 +967,7 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
}
List<AddUpDeductionRecordDTO> list = getAddUpDeductionMapper().recordList(queryParam);
PageInfo<AddUpDeductionRecordDTO> page = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(),
list, AddUpDeductionRecordDTO.class);
PageInfo<AddUpDeductionRecordDTO> page = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(), list, AddUpDeductionRecordDTO.class);
encryptUtil.decryptList(page.getList(), AddUpDeductionRecordDTO.class);
return page;
}
@ -1081,26 +1033,23 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM");
//查询详细信息
List<AddUpDeductionRecordDTO> list = new AddUpDeductionBiz().recordList(param);
final List<List<Object>> dataRowList = Optional.ofNullable(list)
.map(List::stream)
.map(operatorStream -> operatorStream.map(dto -> {
List<Object> 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(NumberUtil.isNumber(dto.getAddUpChildEducation()) ? new BigDecimal(dto.getAddUpChildEducation()) : Util.null2String(dto.getAddUpChildEducation()));
cellList.add(NumberUtil.isNumber(dto.getAddUpContinuingEducation()) ? new BigDecimal(dto.getAddUpContinuingEducation()) :Util.null2String(dto.getAddUpContinuingEducation()));
cellList.add(NumberUtil.isNumber(dto.getAddUpHousingLoanInterest()) ? new BigDecimal(dto.getAddUpHousingLoanInterest()) :Util.null2String(dto.getAddUpHousingLoanInterest()));
cellList.add(NumberUtil.isNumber(dto.getAddUpHousingRent()) ? new BigDecimal(dto.getAddUpHousingRent()) :Util.null2String(dto.getAddUpHousingRent()));
cellList.add(NumberUtil.isNumber(dto.getAddUpSupportElderly()) ? new BigDecimal(dto.getAddUpSupportElderly()) :Util.null2String(dto.getAddUpSupportElderly()));
cellList.add(NumberUtil.isNumber(dto.getAddUpIllnessMedical()) ? new BigDecimal(dto.getAddUpIllnessMedical()) :Util.null2String(dto.getAddUpIllnessMedical()));
cellList.add(NumberUtil.isNumber(dto.getAddUpInfantCare()) ? new BigDecimal(dto.getAddUpInfantCare()) :Util.null2String(dto.getAddUpInfantCare()));
final List<List<Object>> dataRowList = Optional.ofNullable(list).map(List::stream).map(operatorStream -> operatorStream.map(dto -> {
List<Object> 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(NumberUtil.isNumber(dto.getAddUpChildEducation()) ? new BigDecimal(dto.getAddUpChildEducation()) : Util.null2String(dto.getAddUpChildEducation()));
cellList.add(NumberUtil.isNumber(dto.getAddUpContinuingEducation()) ? new BigDecimal(dto.getAddUpContinuingEducation()) : Util.null2String(dto.getAddUpContinuingEducation()));
cellList.add(NumberUtil.isNumber(dto.getAddUpHousingLoanInterest()) ? new BigDecimal(dto.getAddUpHousingLoanInterest()) : Util.null2String(dto.getAddUpHousingLoanInterest()));
cellList.add(NumberUtil.isNumber(dto.getAddUpHousingRent()) ? new BigDecimal(dto.getAddUpHousingRent()) : Util.null2String(dto.getAddUpHousingRent()));
cellList.add(NumberUtil.isNumber(dto.getAddUpSupportElderly()) ? new BigDecimal(dto.getAddUpSupportElderly()) : Util.null2String(dto.getAddUpSupportElderly()));
cellList.add(NumberUtil.isNumber(dto.getAddUpIllnessMedical()) ? new BigDecimal(dto.getAddUpIllnessMedical()) : Util.null2String(dto.getAddUpIllnessMedical()));
cellList.add(NumberUtil.isNumber(dto.getAddUpInfantCare()) ? new BigDecimal(dto.getAddUpInfantCare()) : Util.null2String(dto.getAddUpInfantCare()));
return cellList;
}).collect(Collectors.toList()))
.orElse(Collections.emptyList());
return cellList;
}).collect(Collectors.toList())).orElse(Collections.emptyList());
// 开启分权并且不是薪酬模块总管理员
@ -1112,8 +1061,7 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
// 作为管理员
taxAgentIdsAsAdmin.contains(f.getTaxAgentId())
// 作为分管理员
|| TaxAgentBO.checkTaxAgentAndEmployee(taxAgentEmployees, f.getTaxAgentId(), f.getEmployeeId())
).collect(Collectors.toList());
|| TaxAgentBO.checkTaxAgentAndEmployee(taxAgentEmployees, f.getTaxAgentId(), f.getEmployeeId())).collect(Collectors.toList());
}
@ -1137,22 +1085,7 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
public XSSFWorkbook downloadTemplate(boolean isChief, AddUpDeductionQueryParam queryParam) {
String sheetName = SalaryI18nUtil.getI18nLabel(101603, "累计专项附加扣除导入模板");
String[] header = {
SalaryI18nUtil.getI18nLabel(85429, "姓名"),
SalaryI18nUtil.getI18nLabel(86184, "个税扣缴义务人"),
SalaryI18nUtil.getI18nLabel(86185, "部门"),
SalaryI18nUtil.getI18nLabel(86186, "手机号"),
SalaryI18nUtil.getI18nLabel(86317, "工号"),
SalaryI18nUtil.getI18nLabel(86318, "证件号码"),
SalaryI18nUtil.getI18nLabel(86319, "入职日期"),
SalaryI18nUtil.getI18nLabel(86321, "累计子女教育"),
SalaryI18nUtil.getI18nLabel(86323, "累计继续教育"),
SalaryI18nUtil.getI18nLabel(86324, "累计住房贷款利息"),
SalaryI18nUtil.getI18nLabel(86325, "累计住房租金"),
SalaryI18nUtil.getI18nLabel(86326, "累计赡养老人"),
SalaryI18nUtil.getI18nLabel(105142, "累计大病医疗"),
SalaryI18nUtil.getI18nLabel(105142, "累计婴幼儿照护")
};
String[] header = {SalaryI18nUtil.getI18nLabel(85429, "姓名"), SalaryI18nUtil.getI18nLabel(86184, "个税扣缴义务人"), SalaryI18nUtil.getI18nLabel(86185, "部门"), SalaryI18nUtil.getI18nLabel(86186, "手机号"), SalaryI18nUtil.getI18nLabel(86317, "工号"), SalaryI18nUtil.getI18nLabel(86318, "证件号码"), SalaryI18nUtil.getI18nLabel(86319, "入职日期"), SalaryI18nUtil.getI18nLabel(86321, "累计子女教育"), SalaryI18nUtil.getI18nLabel(86323, "累计继续教育"), SalaryI18nUtil.getI18nLabel(86324, "累计住房贷款利息"), SalaryI18nUtil.getI18nLabel(86325, "累计住房租金"), SalaryI18nUtil.getI18nLabel(86326, "累计赡养老人"), SalaryI18nUtil.getI18nLabel(105142, "累计大病医疗"), SalaryI18nUtil.getI18nLabel(105142, "累计婴幼儿照护")};
List<Object> headerList = Arrays.asList(header);
@ -1225,31 +1158,27 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
// 作为管理员
taxAgentIdsAsAdmin.contains(f.getTaxAgentId())
// 作为分管理员
|| TaxAgentBO.checkTaxAgentAndEmployee(taxAgentEmployees, f.getTaxAgentId(), f.getEmployeeId())
).collect(Collectors.toList());
|| TaxAgentBO.checkTaxAgentAndEmployee(taxAgentEmployees, f.getTaxAgentId(), f.getEmployeeId())).collect(Collectors.toList());
}
List<List<Object>> dataRowList = Optional.ofNullable(list)
.map(List::stream)
.map(operatorStream -> operatorStream.map(dto -> {
List<Object> 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(NumberUtil.isNumber(dto.getAddUpChildEducation()) ? new BigDecimal(dto.getAddUpChildEducation()) : Util.null2String(dto.getAddUpChildEducation()));
cellList.add(NumberUtil.isNumber(dto.getAddUpContinuingEducation()) ? new BigDecimal(dto.getAddUpContinuingEducation()) :Util.null2String(dto.getAddUpContinuingEducation()));
cellList.add(NumberUtil.isNumber(dto.getAddUpHousingLoanInterest()) ? new BigDecimal(dto.getAddUpHousingLoanInterest()) :Util.null2String(dto.getAddUpHousingLoanInterest()));
cellList.add(NumberUtil.isNumber(dto.getAddUpHousingRent()) ? new BigDecimal(dto.getAddUpHousingRent()) :Util.null2String(dto.getAddUpHousingRent()));
cellList.add(NumberUtil.isNumber(dto.getAddUpSupportElderly()) ? new BigDecimal(dto.getAddUpSupportElderly()) :Util.null2String(dto.getAddUpSupportElderly()));
cellList.add(NumberUtil.isNumber(dto.getAddUpIllnessMedical()) ? new BigDecimal(dto.getAddUpIllnessMedical()) :Util.null2String(dto.getAddUpIllnessMedical()));
cellList.add(NumberUtil.isNumber(dto.getAddUpInfantCare()) ? new BigDecimal(dto.getAddUpInfantCare()) :Util.null2String(dto.getAddUpInfantCare()));
return cellList;
}).collect(Collectors.toList()))
.orElse(Collections.emptyList());
List<List<Object>> dataRowList = Optional.ofNullable(list).map(List::stream).map(operatorStream -> operatorStream.map(dto -> {
List<Object> 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(NumberUtil.isNumber(dto.getAddUpChildEducation()) ? new BigDecimal(dto.getAddUpChildEducation()) : Util.null2String(dto.getAddUpChildEducation()));
cellList.add(NumberUtil.isNumber(dto.getAddUpContinuingEducation()) ? new BigDecimal(dto.getAddUpContinuingEducation()) : Util.null2String(dto.getAddUpContinuingEducation()));
cellList.add(NumberUtil.isNumber(dto.getAddUpHousingLoanInterest()) ? new BigDecimal(dto.getAddUpHousingLoanInterest()) : Util.null2String(dto.getAddUpHousingLoanInterest()));
cellList.add(NumberUtil.isNumber(dto.getAddUpHousingRent()) ? new BigDecimal(dto.getAddUpHousingRent()) : Util.null2String(dto.getAddUpHousingRent()));
cellList.add(NumberUtil.isNumber(dto.getAddUpSupportElderly()) ? new BigDecimal(dto.getAddUpSupportElderly()) : Util.null2String(dto.getAddUpSupportElderly()));
cellList.add(NumberUtil.isNumber(dto.getAddUpIllnessMedical()) ? new BigDecimal(dto.getAddUpIllnessMedical()) : Util.null2String(dto.getAddUpIllnessMedical()));
cellList.add(NumberUtil.isNumber(dto.getAddUpInfantCare()) ? new BigDecimal(dto.getAddUpInfantCare()) : Util.null2String(dto.getAddUpInfantCare()));
return cellList;
}).collect(Collectors.toList())).orElse(Collections.emptyList());
return dataRowList;
}
@ -1282,10 +1211,7 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
YearMonth month = YearMonth.parse(yearMonth);
LocalDate salaryMonthDate = month.atDay(1);
LocalDate salaryMonthEndDate = month.atEndOfMonth();
List<SalaryAcctRecordPO> salaryAcctRecords = getSalaryAcctRecordService(user).listByTaxCycle(
LocalDateRange.builder().fromDate(SalaryDateUtil.localDateToDate(salaryMonthDate))
.endDate(SalaryDateUtil.localDateToDate(salaryMonthEndDate)).build(),
null);
List<SalaryAcctRecordPO> salaryAcctRecords = getSalaryAcctRecordService(user).listByTaxCycle(LocalDateRange.builder().fromDate(SalaryDateUtil.localDateToDate(salaryMonthDate)).endDate(SalaryDateUtil.localDateToDate(salaryMonthEndDate)).build(), null);
salaryAcctRecords.forEach(e -> {
boolean isAccounted = e.getStatus() > SalaryAcctRecordStatusEnum.NOT_ARCHIVED.getValue();
if (isAccounted) {

View File

@ -21,11 +21,14 @@ import com.engine.salary.entity.salarysob.param.SalarySobRangeSaveParam;
import com.engine.salary.entity.taxagent.dto.TaxAgentManageRangeEmployeeDTO;
import com.engine.salary.entity.taxagent.param.TaxAgentRangeSaveParam;
import com.engine.salary.entity.taxagent.po.TaxAgentPO;
import com.engine.salary.enums.auth.AuthFilterTypeEnum;
import com.engine.salary.enums.datacollection.UseEmployeeTypeEnum;
import com.engine.salary.enums.salaryarchive.SalaryArchiveImportTypeEnum;
import com.engine.salary.enums.salaryarchive.SalaryArchiveListTypeEnum;
import com.engine.salary.enums.salaryarchive.SalaryArchiveStatusEnum;
import com.engine.salary.service.*;
import com.engine.salary.service.auth.AuthService;
import com.engine.salary.service.auth.AuthServiceImpl;
import com.engine.salary.sys.entity.po.SalarySysConfPO;
import com.engine.salary.sys.service.SalarySysConfService;
import com.engine.salary.sys.service.impl.SalarySysConfServiceImpl;
@ -89,6 +92,10 @@ public class SalaryArchiveExcelServiceImpl extends Service implements SalaryArch
return ServiceUtil.getService(SalarySysConfServiceImpl.class, user);
}
public AuthService getAuthService(User user) {
return ServiceUtil.getService(AuthServiceImpl.class, user);
}
private SalaryArchiveBiz salaryArchiveMapper = new SalaryArchiveBiz();
private SalaryArchiveItemBiz salaryArchiveItemMapper = new SalaryArchiveItemBiz();
@ -311,17 +318,9 @@ public class SalaryArchiveExcelServiceImpl extends Service implements SalaryArch
rows.add(header);
// 获取所有个税扣缴义务人
Collection<TaxAgentPO> taxAgentList = getTaxAgentService(user).listAll();
Collection<SalaryArchiveListDTO> salaryArchives = salaryArchiveService(user).getSalaryArchiveList(queryParam);
List<SalaryArchiveListDTO> salaryArchives = salaryArchiveService(user).getSalaryArchiveList(queryParam);
salaryArchives = getAuthService(user).auth(salaryArchives, AuthFilterTypeEnum.ADMIN_DATA, SalaryArchiveListDTO.class);
long employeeId = user.getUID();
if (getTaxAgentService(user).isNeedAuth(employeeId)) {
List<Long> taxAgentIdsAsAdmin = getTaxAgentService(user).listAllTaxAgentsAsAdmin(employeeId).stream().map(TaxAgentPO::getId).collect(Collectors.toList());
salaryArchives = salaryArchives.stream()
.filter(f ->
// 作为管理员
taxAgentIdsAsAdmin.contains(f.getTaxAgentId())
).collect(Collectors.toList());
}
if (queryParam.getHasData()) {
List<Map<String, Object>> listMaps = salaryArchiveService(user)
.buildSalaryArchiveData(salaryArchives, taxAgentList, salaryItems, Boolean.FALSE);

View File

@ -547,29 +547,11 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe
OrderRuleVO orderRule = getSalarySysConfService(user).orderRule();
queryParam.setOrderRule(orderRule);
Collection<SalaryArchiveListDTO> salaryArchives = getSalaryArchiveList(queryParam);
List<SalaryArchiveListDTO> salaryArchives = getSalaryArchiveList(queryParam);
//分权
Boolean needAuth = getTaxAgentService(user).isNeedAuth(employeeId);
if (needAuth) {
Boolean adminEnable = getTaxAgentService(user).isAdminEnable(employeeId);
if (!adminEnable) {
salaryArchives = new ArrayList<>();
} else {
salaryArchives = getAuthService(user).auth(salaryArchives, AuthFilterTypeEnum.QUERY_DATA, SalaryArchiveListDTO.class);
Collection<TaxAgentPO> taxAgentPOS = getTaxAgentService(user).listAllTaxAgentsAsAdmin((long) user.getUID());
Set<Long> taxAgentIds = SalaryEntityUtil.properties(taxAgentPOS, TaxAgentPO::getId);
//获取管理扣缴单位薪资档案
salaryArchives = salaryArchives.stream().filter(dto -> taxAgentIds.contains(dto.getTaxAgentId())).collect(Collectors.toList());
//过滤档案状态
if (StringUtils.isNotBlank(queryParam.getArchiveStatus())) {
//过滤档案状态
salaryArchives = salaryArchives.stream().filter(dto -> StringUtils.equals(queryParam.getArchiveStatus(), dto.getArchiveStatus())).collect(Collectors.toList());
}
}
}
List<Map<String, Object>> listMaps = buildSalaryArchiveData(salaryArchives, taxAgentList, salaryItems, Boolean.FALSE);
// 组装数据

View File

@ -58,6 +58,8 @@ import com.engine.salary.mapper.salarybill.SalarySendInfoMapper;
import com.engine.salary.mapper.salarybill.SalarySendMapper;
import com.engine.salary.report.common.constant.SalaryConstant;
import com.engine.salary.service.*;
import com.engine.salary.service.auth.AuthService;
import com.engine.salary.service.auth.AuthServiceImpl;
import com.engine.salary.sys.entity.vo.OrderRuleVO;
import com.engine.salary.sys.service.SalarySysConfService;
import com.engine.salary.sys.service.impl.SalarySysConfServiceImpl;
@ -199,6 +201,10 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
return ServiceUtil.getService(SalaryBillBaseSetServiceImpl.class, user);
}
public AuthService getAuthService(User user) {
return ServiceUtil.getService(AuthServiceImpl.class, user);
}
@Override
public SalarySendPO getById(Long salarySendId) {
return mapper.getById(salarySendId);
@ -430,6 +436,12 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
return pageInfo;
}
@Override
public List<SalarySendListDTO> list(SalarySendQueryParam queryParam) {
List<SalarySendListDTO> list = mapper.list(queryParam);
return getAuthService(user).auth(list, queryParam.getFilterType(), SalarySendListDTO.class);
}
@Override
public SalarySendBaseInfoDTO getBaseInfo(Long id) {
SalarySendPO salarySend = mapper.getById(id);

View File

@ -45,6 +45,14 @@ public class AuthController {
return new ResponseResult<AuthRoleListQueryParam, PageInfo<AuthRoleDTO>>(user).run(getAuthWrapper(user)::roleList, param);
}
@GET
@Path("/role/getRole")
@Produces(MediaType.APPLICATION_JSON)
public String getRole(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody @QueryParam(value = "id") Long id) {
User user = HrmUserVarify.getUser(request, response);
return new ResponseResult<Long, AuthRoleDTO>(user).run(getAuthWrapper(user)::getRole, id);
}
@POST
@Path("/role/save")
@Produces(MediaType.APPLICATION_JSON)

View File

@ -53,6 +53,10 @@ public class AuthWrapper extends Service {
return getAuthRoleService(user).roleList(param);
}
public AuthRoleDTO getRole(Long id) {
return getAuthRoleService(user).getRole(id);
}
public Long saveRole(AuthRoleSaveParam param) {
ValidUtil.doValidator(param);
return getAuthRoleService(user).saveRole(param);

View File

@ -22,9 +22,9 @@ import com.engine.salary.entity.salaryacct.po.SalaryAcctRecordPO;
import com.engine.salary.entity.salarysob.po.SalarySobPO;
import com.engine.salary.entity.taxagent.dto.TaxAgentListDTO;
import com.engine.salary.enums.UserStatusEnum;
import com.engine.salary.enums.auth.AuthFilterTypeEnum;
import com.engine.salary.enums.salarybill.SalarySendStatusEnum;
import com.engine.salary.exception.SalaryRunTimeException;
import com.engine.salary.mapper.salarybill.SalarySendMapper;
import com.engine.salary.service.*;
import com.engine.salary.service.impl.*;
import com.engine.salary.sys.constant.SalarySysConstant;
@ -33,7 +33,6 @@ import com.engine.salary.sys.enums.PayrollCheckTypeEnum;
import com.engine.salary.sys.service.SalarySysConfService;
import com.engine.salary.sys.service.impl.SalarySysConfServiceImpl;
import com.engine.salary.util.SalaryDateUtil;
import com.engine.salary.util.SalaryEntityUtil;
import com.engine.salary.util.SalaryI18nUtil;
import com.engine.salary.util.SalaryTokenUtil;
import com.engine.salary.util.page.PageInfo;
@ -112,23 +111,11 @@ public class SalarySendWrapper extends Service implements SalarySendWrapperProxy
try {
queryParam.setSalaryMonth(queryParam.getSalaryYearMonth().stream().map(e -> e + "-01 00:00:00").collect(Collectors.toList()));
queryParam.setSalaryMonthDate(queryParam.getSalaryYearMonth().stream().map(e -> e + "-01 00:00:00").map(SalaryDateUtil::dateStrToLocalTime).collect(Collectors.toList()));
//分权获取当前人员管理的账套
Boolean needAuth = getTaxAgentService(user).isNeedAuth(currentEmployeeId);
List<SalarySendListDTO> list = new ArrayList<>();
if (needAuth) {
List<SalarySobPO> salarySobPOS = getSalarySobService(user).listByDisable(NumberUtils.INTEGER_ZERO);
Set<Long> salarySobIds = SalaryEntityUtil.properties(salarySobPOS, SalarySobPO::getId);
if (CollectionUtils.isNotEmpty(salarySobIds)) {
queryParam.setSalarySobIds(salarySobIds);
SalarySendMapper salarySendMapper = sqlSession.getMapper(SalarySendMapper.class);
list = salarySendMapper.list(queryParam);
}
} else {
SalarySendMapper salarySendMapper = sqlSession.getMapper(SalarySendMapper.class);
list = salarySendMapper.list(queryParam);
}
queryParam.setFilterType(AuthFilterTypeEnum.DATA_OPT);
list.stream().forEach(dto -> {
List<SalarySendListDTO> list = getSalarySendService(user).list(queryParam);
list.forEach(dto -> {
// 回算过但是查看的是普通工资单不能查看详情;回算过但是查看的是回算工资单可以发记录没回算过可以发
if(Objects.equals(dto.getSalaryAcctRecordType(), NumberUtils.INTEGER_ONE) && Objects.equals(dto.getSalaryAcctType(),NumberUtils.INTEGER_ZERO)){
dto.setCanSeeDetail(false);