Merge branch 'dev-nx' of http://192.168.0.56:3000/bonus/devicesmgt into dev-nx
This commit is contained in:
commit
3818d7e237
|
|
@ -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.equals(101)) {
|
||||
record.setStatus("1");
|
||||
backApplyMapper.audit(record);
|
||||
}
|
||||
if (companyId != null && companyId.equals(102)) {
|
||||
record.setStatus("3");
|
||||
backApplyMapper.audit(record);
|
||||
}
|
||||
|
|
@ -172,12 +176,17 @@ public class BackApplyServiceImpl implements BackApplyService {
|
|||
int num = 0;
|
||||
Set<String> roles = SecurityUtils.getLoginUser().getRoles();
|
||||
Long userid = SecurityUtils.getLoginUser().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.equals(101)) {
|
||||
record.setStatus("2");
|
||||
return backApplyMapper.refuse(record);
|
||||
}
|
||||
if (companyId != null && companyId.equals(101)) {
|
||||
record.setStatus("4");
|
||||
return backApplyMapper.refuse(record);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ public class LeaseUserBookServiceImpl implements LeaseUserBookService {
|
|||
|
||||
@Override
|
||||
public int add(LeaseUserBook bean) {
|
||||
Long userId = SecurityUtils.getLoginUser().getUserid();
|
||||
Long userId = SecurityUtils.getLoginUser().getSysUser().getUserId();
|
||||
bean.setUserId(userId);
|
||||
return mapper.add(bean);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -262,6 +262,9 @@ public class SysUserServiceImpl implements ISysUserService {
|
|||
user.setCompanyId(dept.getDeptId());
|
||||
}
|
||||
}*/
|
||||
if (deptId == 100){
|
||||
user.setCompanyId(deptId);
|
||||
}
|
||||
if (split.length == 2) {
|
||||
//表示属于分公司
|
||||
user.setCompanyId(sysDept.getDeptId());
|
||||
|
|
@ -313,6 +316,9 @@ public class SysUserServiceImpl implements ISysUserService {
|
|||
SysDept sysDept = deptMapper.selectDeptById(deptId);
|
||||
String ancestors = sysDept.getAncestors();
|
||||
String[] split = ancestors.split(",");
|
||||
if (deptId == 100){
|
||||
user.setCompanyId(deptId);
|
||||
}
|
||||
if (split.length == 2) {
|
||||
//表示属于分公司
|
||||
user.setCompanyId(sysDept.getDeptId());
|
||||
|
|
|
|||
|
|
@ -451,6 +451,8 @@ export default {
|
|||
taskId: row.taskId,
|
||||
isEdit: false,
|
||||
},
|
||||
}).then(() => {
|
||||
this.$tab.refreshPage()
|
||||
})
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
|
|
|
|||
Loading…
Reference in New Issue