账套和核算列表的权限控制
This commit is contained in:
parent
c7659e0717
commit
87d601c65b
|
|
@ -98,6 +98,7 @@ public class SalaryAcctRecordBO {
|
|||
.updateTime(SalaryDateUtil.getFormatLocalDateTime(salaryAcctRecordPO.getUpdateTime()))
|
||||
.description(salaryAcctRecordPO.getDescription())
|
||||
.operate(btnList)
|
||||
.opts(salaryAcctRecordPO.getOpts())
|
||||
.build();
|
||||
}).collect(Collectors.toList());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import lombok.Data;
|
|||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 薪资核算列表
|
||||
|
|
@ -65,4 +66,6 @@ public class SalaryAcctRecordListDTO {
|
|||
|
||||
@TableTitle(title = "操作", dataIndex = "operate", key = "operate")
|
||||
private List<WeaTableOperate> operate;
|
||||
|
||||
private Set<String> opts;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import lombok.Data;
|
|||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 薪资账套列表
|
||||
|
|
@ -68,5 +69,5 @@ public class SalarySobListDTO {
|
|||
|
||||
@SalaryTableColumn(text = "操作", width = "20%", column = "operate")
|
||||
@TableTitle(title = "操作", key = "operate", dataIndex = "operate")
|
||||
private String opts;
|
||||
private Set<String> opts;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -284,12 +284,12 @@ public class AuthServiceImpl extends Service implements AuthService {
|
|||
//给总管理员赋值最大权限
|
||||
Boolean isChief = getTaxAgentService(user).isChief(uid);
|
||||
//给各管理员赋值对应的扣缴义务人权限
|
||||
Boolean adminEnable = getTaxAgentService(user).isAdminEnable(uid);
|
||||
Boolean isAdminEnable = getTaxAgentService(user).isAdminEnable(uid);
|
||||
|
||||
boolean able = false;
|
||||
|
||||
//如果是管理员,赋值管理权限返回
|
||||
if (isChief || adminEnable) {
|
||||
if (isChief || isAdminEnable) {
|
||||
opts.add("admin");
|
||||
able = true;
|
||||
} else {
|
||||
|
|
@ -300,7 +300,7 @@ public class AuthServiceImpl extends Service implements AuthService {
|
|||
return Permission.builder()
|
||||
.isOpenDevolution(isOpenDevolution)
|
||||
.isChief(isChief)
|
||||
.isAdminEnable(adminEnable)
|
||||
.isAdminEnable(isAdminEnable)
|
||||
.able(able)
|
||||
.opts(opts)
|
||||
.build();
|
||||
|
|
|
|||
|
|
@ -192,23 +192,6 @@ public class SalaryAcctRecordServiceImpl extends Service implements SalaryAcctRe
|
|||
}
|
||||
po.setSalaryMonths(localDateRange);
|
||||
|
||||
|
||||
// // 判断是否开启了分权
|
||||
// Boolean needAuth = getTaxAgentService(user).isNeedAuth(currentEmployeeId);
|
||||
// if (needAuth) {
|
||||
// List<SalarySobPO> salarySobPOS = getSalarySobService(user).listByAdmin();
|
||||
// List<Long> salarySobIds = SalaryEntityUtil.properties(salarySobPOS, SalarySobPO::getId, Collectors.toList());
|
||||
//
|
||||
// if (CollectionUtils.isEmpty(salarySobIds)) {
|
||||
// return new PageInfo<>();
|
||||
// }
|
||||
// Collection<Long> sobIds = po.getSalarySobIds();
|
||||
// if (CollectionUtils.isNotEmpty(sobIds)) {
|
||||
// salarySobIds = (List<Long>) SalaryEntityUtil.intersectionForList(salarySobIds, sobIds);
|
||||
// }
|
||||
// po.setSalarySobIds(salarySobIds);
|
||||
// }
|
||||
|
||||
// 查询薪资核算记录
|
||||
List<SalaryAcctRecordPO> salaryAcctRecordPOS = getSalaryAcctRecordMapper().listSome(po);
|
||||
salaryAcctRecordPOS = getAuthService(user).auth(salaryAcctRecordPOS, AuthFilterTypeEnum.DATA_OPT, SalaryAcctRecordPO.class);
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@ public class SalaryAcctSobConfigServiceImpl extends Service implements SalaryAcc
|
|||
}
|
||||
|
||||
@Override
|
||||
public void save(SalaryAcctSobConfigPO salaryAcctSobConfig) {
|
||||
public synchronized void save(SalaryAcctSobConfigPO salaryAcctSobConfig) {
|
||||
deleteBySalaryAcctRecordIds(Collections.singleton(salaryAcctSobConfig.getSalaryAcctRecordId()));
|
||||
getSalaryAcctSobConfigMapper().insertIgnoreNull(salaryAcctSobConfig);
|
||||
String cacheIndex = salaryAcctSobConfig.getSalaryAcctRecordId().toString();
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ public class SalarySobWrapper extends Service {
|
|||
List<TaxAgentPO> taxAgentPOS = getTaxAgentService(user).listAll();
|
||||
|
||||
|
||||
List<SalarySobListDTO> salarySobListDTOS = page.getList().stream()
|
||||
List<SalarySobListDTO> salarySobListDTOS = page.getList().stream()
|
||||
.map(salarySobPO -> {
|
||||
List<Long> taxAgentIds = salarySobPO.getTaxAgentIds();
|
||||
String taxAgentName = taxAgentPOS.stream().filter(po -> taxAgentIds.contains(po.getId())).map(TaxAgentPO::getName).collect(Collectors.joining(","));
|
||||
|
|
@ -100,7 +100,7 @@ public class SalarySobWrapper extends Service {
|
|||
.salaryCycle(SalarySobBO.buildSalaryCycle(salarySobPO))
|
||||
.disable(salarySobPO.getDisable())
|
||||
.description(salarySobPO.getDescription())
|
||||
// .opts(salarySobPO.getOpts())
|
||||
.opts(salarySobPO.getOpts())
|
||||
.build();
|
||||
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue