Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
2da9fa931b
|
|
@ -371,6 +371,8 @@ public class LeaseTaskController extends BaseController {
|
|||
Integer pageIndex = Convert.toInt(ServletUtils.getParameter("pageNum"), 1);
|
||||
Integer pageSize = Convert.toInt(ServletUtils.getParameter("pageSize"), 10);
|
||||
try {
|
||||
Long deptId = typeService.getUserDeptId();
|
||||
leaseApplyInfo.setCompanyId(deptId);
|
||||
List<LeaseApplyInfo> list = service.selectAuditLeaseApplyInfoList(leaseApplyInfo);
|
||||
if (leaseApplyInfo.getIsApp()==null){
|
||||
return AjaxResult.success(ListPagingUtil.paging(pageIndex, pageSize, list));
|
||||
|
|
|
|||
|
|
@ -674,33 +674,33 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService {
|
|||
|
||||
@Override
|
||||
public List<LeaseApplyInfo> selectAuditLeaseApplyInfoList(LeaseApplyInfo leaseApplyInfo) {
|
||||
Long userId = SecurityUtils.getLoginUser().getUserid();
|
||||
Long deptId = SecurityUtils.getLoginUser().getSysUser().getDeptId();
|
||||
leaseApplyInfo.setUserId(userId == 1 ? null : userId);
|
||||
if(userId == 1 || deptId == 101){
|
||||
leaseApplyInfo.setDeptId(null);
|
||||
}else{
|
||||
//判断祖籍有没有101
|
||||
String ancestors = mapper.getAncestors(deptId);
|
||||
boolean contains101 = false;
|
||||
if (ancestors != null && !ancestors.isEmpty()) {
|
||||
String[] parts = ancestors.split(",");
|
||||
for (String part : parts) {
|
||||
if ("101".equals(part.trim())) {
|
||||
contains101 = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(contains101){
|
||||
leaseApplyInfo.setDeptId(null);
|
||||
}else{
|
||||
leaseApplyInfo.setDeptId(deptId);
|
||||
}
|
||||
}
|
||||
// Long userId = SecurityUtils.getLoginUser().getUserid();
|
||||
// Long deptId = SecurityUtils.getLoginUser().getSysUser().getDeptId();
|
||||
// leaseApplyInfo.setUserId(userId == 1 ? null : userId);
|
||||
// if(userId == 1 || deptId == 101){
|
||||
// leaseApplyInfo.setDeptId(null);
|
||||
// }else{
|
||||
// //判断祖籍有没有101
|
||||
// String ancestors = mapper.getAncestors(deptId);
|
||||
// boolean contains101 = false;
|
||||
// if (ancestors != null && !ancestors.isEmpty()) {
|
||||
// String[] parts = ancestors.split(",");
|
||||
// for (String part : parts) {
|
||||
// if ("101".equals(part.trim())) {
|
||||
// contains101 = true;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// if(contains101){
|
||||
// leaseApplyInfo.setDeptId(null);
|
||||
// }else{
|
||||
// leaseApplyInfo.setDeptId(deptId);
|
||||
// }
|
||||
// }
|
||||
|
||||
// leaseApplyInfo.setDeptId((userId == 1 || deptId == 101) ? null : deptId);
|
||||
log.info("用户id为{}",userId);
|
||||
// log.info("用户id为{}",userId);
|
||||
List<LeaseApplyInfo> list = mapper.selectAuditLeaseApplyInfoList(leaseApplyInfo);
|
||||
try {
|
||||
if (!CollectionUtils.isEmpty(list)) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue