测试问题项修改
This commit is contained in:
parent
0000bf3752
commit
7690b80b6b
|
|
@ -141,14 +141,18 @@ public class BackApplyServiceImpl implements BackApplyService {
|
|||
public int audit(BackApplyInfo record) {
|
||||
int num = 0;
|
||||
Set<String> roles = SecurityUtils.getLoginUser().getRoles();
|
||||
String username = SecurityUtils.getLoginUser().getUsername();
|
||||
Long companyId = SecurityUtils.getLoginUser().getSysUser().getCompanyId();
|
||||
String userId = String.valueOf(SecurityUtils.getLoginUser().getUserid());
|
||||
record.setCreateBy(userId);
|
||||
if (roles.contains("jjfgs") || roles.contains("admin")) {
|
||||
if (roles.contains("admin")) {
|
||||
record.setStatus("1");
|
||||
backApplyMapper.audit(record);
|
||||
}
|
||||
if (roles.contains("tsfgs") || roles.contains("admin")) {
|
||||
if (companyId != null && companyId == 101) {
|
||||
record.setStatus("1");
|
||||
backApplyMapper.audit(record);
|
||||
}
|
||||
if (companyId != null && companyId == 102) {
|
||||
record.setStatus("3");
|
||||
backApplyMapper.audit(record);
|
||||
}
|
||||
|
|
@ -171,13 +175,18 @@ public class BackApplyServiceImpl implements BackApplyService {
|
|||
public int refuse(BackApplyInfo record) {
|
||||
int num = 0;
|
||||
Set<String> roles = SecurityUtils.getLoginUser().getRoles();
|
||||
Long userid = SecurityUtils.getLoginUser().getUserid();
|
||||
Long userid = SecurityUtils.getLoginUser().getSysUser().getUserId();
|
||||
Long companyId = SecurityUtils.getLoginUser().getSysUser().getCompanyId();
|
||||
record.setCreateBy(userid.toString());
|
||||
if (roles.contains("jjfgs") || roles.contains("admin")) {
|
||||
if(roles.contains("admin")){
|
||||
record.setStatus("2");
|
||||
return backApplyMapper.refuse(record);
|
||||
}
|
||||
if (roles.contains("tsfgs") || roles.contains("admin")) {
|
||||
if (companyId != null && companyId == 101) {
|
||||
record.setStatus("2");
|
||||
return backApplyMapper.refuse(record);
|
||||
}
|
||||
if (companyId != null && companyId == 102) {
|
||||
record.setStatus("4");
|
||||
return backApplyMapper.refuse(record);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue