parent
4b1b2e65d2
commit
0bfdd406cd
|
|
@ -40,21 +40,6 @@ public class ProDeptRoleServiceImpl implements ProDeptRoleService {
|
|||
|
||||
@Override
|
||||
public List<ProDeptRoleBean> getRoleUserList(ProDeptRoleBean bean) {
|
||||
// //只能查自己分公司的人
|
||||
// SysUser sysUser = SecurityUtils.getLoginUser().getSysUser();
|
||||
// List<String> roleId = sysUser.getRoleList();
|
||||
// if(roleId !=null && !roleId.isEmpty() ){
|
||||
// if (Collections.frequency(roleId, "1")==0) {
|
||||
// List<MapVo> orgList = sysUser.getOrgList();
|
||||
// if (!orgList.isEmpty()) {
|
||||
// ArrayList<String> ids = new ArrayList<>();
|
||||
// for (MapVo mapVo : orgList) {
|
||||
// ids.add(String.valueOf(mapVo.getId()));
|
||||
// }
|
||||
// bean.setOrgList(ids);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
return proDeptRoleDao.getRoleUserList(bean);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -182,27 +182,27 @@ public class ExportFileController {
|
|||
public void exportHoliday(HttpServletResponse response, HolidayBean bean) {
|
||||
try {
|
||||
List<HolidayBean> personExportVoList = new ArrayList<>();
|
||||
// if ("审批".equals(bean.getExportType())) {
|
||||
// } else {
|
||||
// //只能查询自己的
|
||||
// bean.setUserId(SecurityUtils.getLoginUser().getSysUser().getUserId());
|
||||
// }
|
||||
SysUser sysUser = SecurityUtils.getLoginUser().getSysUser();
|
||||
List<String> roleId = sysUser.getRoleList();
|
||||
//管理员与人资角色可以看到所有
|
||||
if( roleId !=null && !roleId.isEmpty()){
|
||||
if (Collections.frequency(roleId, "1")==0 && Collections.frequency(roleId, "16")==0) {
|
||||
List<MapVo> orgList = sysUser.getOrgList();
|
||||
if (!orgList.isEmpty()) {
|
||||
ArrayList<String> ids = new ArrayList<>();
|
||||
for (MapVo mapVo : orgList) {
|
||||
String id = proDeptRoleDao.getOrgChildById(mapVo.getId());
|
||||
// 使用 Arrays.asList() 将数组转换为 ArrayList
|
||||
ArrayList<String> idList = new ArrayList<>(Arrays.asList(id.split(",")));
|
||||
ids.addAll(idList);
|
||||
if (roleId != null && !roleId.isEmpty()) {
|
||||
if (Collections.frequency(roleId, "1") == 0 && Collections.frequency(roleId, "16") == 0) {
|
||||
if (Collections.frequency(roleId, "15") == 0) {
|
||||
List<MapVo> orgList = sysUser.getOrgList();
|
||||
if (!orgList.isEmpty()) {
|
||||
ArrayList<String> ids = new ArrayList<>();
|
||||
for (MapVo mapVo : orgList) {
|
||||
String id = proDeptRoleDao.getOrgChildById(mapVo.getId());
|
||||
// 使用 Arrays.asList() 将数组转换为 ArrayList
|
||||
ArrayList<String> idList = new ArrayList<>(Arrays.asList(id.split(",")));
|
||||
ids.addAll(idList);
|
||||
// ids.add(String.valueOf(mapVo.getId()));
|
||||
}
|
||||
bean.setOrgList(ids);
|
||||
}
|
||||
bean.setOrgList(ids);
|
||||
} else {
|
||||
Long userId = SecurityUtils.getUserId();
|
||||
bean.setUserId(userId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -230,9 +230,11 @@ public class ExportFileController {
|
|||
personExportVoList.add(vo);
|
||||
}
|
||||
extracted(personExportVoList, HolidayBean.class, "轮休临时外出导出", "轮休临时外出导出", "轮休临时外出导出", response);
|
||||
} catch (Exception e) {
|
||||
} catch (
|
||||
Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -250,8 +252,8 @@ public class ExportFileController {
|
|||
SysUser sysUser = SecurityUtils.getLoginUser().getSysUser();
|
||||
List<String> roleId = sysUser.getRoleList();
|
||||
//管理员与人资角色可以看到所有
|
||||
if( roleId !=null && !roleId.isEmpty()){
|
||||
if (Collections.frequency(roleId, "1")==0 && Collections.frequency(roleId, "16")==0) {
|
||||
if (roleId != null && !roleId.isEmpty()) {
|
||||
if (Collections.frequency(roleId, "1") == 0 && Collections.frequency(roleId, "16") == 0) {
|
||||
List<MapVo> orgList = sysUser.getOrgList();
|
||||
if (!orgList.isEmpty()) {
|
||||
ArrayList<String> ids = new ArrayList<>();
|
||||
|
|
@ -504,7 +506,7 @@ public class ExportFileController {
|
|||
dayTable.setEndDate(bean.getEndDate());
|
||||
headers.entrySet()
|
||||
.forEach(entry -> {
|
||||
if("99".equals(entry.getKey())){
|
||||
if ("99".equals(entry.getKey())) {
|
||||
List<AttDataDetailsBean> list = attendanceDetailsService.getOutCountList(dayTable);
|
||||
Sheet departmentSheet2 = exporter.createSheet(entry.getValue());
|
||||
List<String> departmentHeaders2 = Arrays.asList("序号", "考勤日期", "姓名", "所属部门", "打卡时间", "打卡地址");
|
||||
|
|
@ -522,7 +524,7 @@ public class ExportFileController {
|
|||
departmentData2.add(map);
|
||||
}
|
||||
exporter.addDataRows(departmentSheet2, departmentData2, departmentHeaders2);
|
||||
}else{
|
||||
} else {
|
||||
dayTable.setAttStatus(entry.getKey());
|
||||
List<AttDataDetailsBean> list = attendanceDetailsService.getAttDayReportDetailsList(dayTable);
|
||||
Sheet departmentSheet2 = exporter.createSheet(entry.getValue());
|
||||
|
|
@ -663,16 +665,16 @@ public class ExportFileController {
|
|||
AttDetailBean dayTable = new AttDetailBean();
|
||||
dayTable.setStartDate(monthFirstAndLast.get(0));
|
||||
dayTable.setEndDate(monthFirstAndLast.get(1));
|
||||
if(bean.getOrgId() != null){
|
||||
if (bean.getOrgId() != null) {
|
||||
dayTable.setOrgId(String.valueOf(bean.getOrgId()));
|
||||
}
|
||||
dayTable.setName(bean.getUserName());
|
||||
headers.entrySet()
|
||||
.forEach(entry -> {
|
||||
if("99".equals(entry.getKey())){
|
||||
if ("99".equals(entry.getKey())) {
|
||||
AttDataDetailsBean att = new AttDataDetailsBean();
|
||||
att.setAttCurrentMonth(bean.getMonth());
|
||||
if(bean.getOrgId() != null){
|
||||
if (bean.getOrgId() != null) {
|
||||
att.setOrgId(bean.getOrgId());
|
||||
}
|
||||
att.setUserName(bean.getUserName());
|
||||
|
|
@ -692,7 +694,7 @@ public class ExportFileController {
|
|||
departmentData2.add(map);
|
||||
}
|
||||
exporter.addDataRows(departmentSheet2, departmentData2, departmentHeaders2);
|
||||
}else {
|
||||
} else {
|
||||
dayTable.setAttStatis(Integer.parseInt(entry.getKey()));
|
||||
List<AttDetailBean> list = attDetailByMonthService.getDetailList(dayTable);
|
||||
Sheet departmentSheet2 = exporter.createSheet(entry.getValue());
|
||||
|
|
@ -715,7 +717,7 @@ public class ExportFileController {
|
|||
}
|
||||
exporter.addDataRows(departmentSheet2, departmentData2, departmentHeaders2);
|
||||
}
|
||||
});
|
||||
});
|
||||
// 导出Excel文件
|
||||
exporter.exportToResponse(response, "月报表导出");
|
||||
}
|
||||
|
|
@ -830,19 +832,24 @@ public class ExportFileController {
|
|||
SysUser sysUser = SecurityUtils.getLoginUser().getSysUser();
|
||||
List<String> roleId = sysUser.getRoleList();
|
||||
//管理员与人资角色可以看到所有
|
||||
if( roleId !=null && !roleId.isEmpty()){
|
||||
if (Collections.frequency(roleId, "1")==0 && Collections.frequency(roleId, "16")==0) {
|
||||
List<MapVo> orgList = sysUser.getOrgList();
|
||||
if (!orgList.isEmpty()) {
|
||||
ArrayList<String> ids = new ArrayList<>();
|
||||
for (MapVo mapVo : orgList) {
|
||||
String id = proDeptRoleDao.getOrgChildById(mapVo.getId());
|
||||
// 使用 Arrays.asList() 将数组转换为 ArrayList
|
||||
ArrayList<String> idList = new ArrayList<>(Arrays.asList(id.split(",")));
|
||||
ids.addAll(idList);
|
||||
if (roleId != null && !roleId.isEmpty()) {
|
||||
if (Collections.frequency(roleId, "1") == 0 && Collections.frequency(roleId, "16") == 0) {
|
||||
if(Collections.frequency(roleId, "15")==0){
|
||||
List<MapVo> orgList = sysUser.getOrgList();
|
||||
if (!orgList.isEmpty()) {
|
||||
ArrayList<String> ids = new ArrayList<>();
|
||||
for (MapVo mapVo : orgList) {
|
||||
String id = proDeptRoleDao.getOrgChildById(mapVo.getId());
|
||||
// 使用 Arrays.asList() 将数组转换为 ArrayList
|
||||
ArrayList<String> idList = new ArrayList<>(Arrays.asList(id.split(",")));
|
||||
ids.addAll(idList);
|
||||
// ids.add(String.valueOf(mapVo.getId()));
|
||||
}
|
||||
bean.setOrgList(ids);
|
||||
}
|
||||
bean.setOrgList(ids);
|
||||
}else{
|
||||
Long userId = SecurityUtils.getUserId();
|
||||
bean.setUserId(userId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -886,6 +893,30 @@ public class ExportFileController {
|
|||
public void exportEvection(HttpServletResponse response, EvectionBean bean) {
|
||||
try {
|
||||
List<EvectionBean> personExportVoList = new ArrayList<>();
|
||||
SysUser sysUser = SecurityUtils.getLoginUser().getSysUser();
|
||||
List<String> roleId = sysUser.getRoleList();
|
||||
//管理员与人资角色可以看到所有
|
||||
if( roleId !=null && !roleId.isEmpty()){
|
||||
if (Collections.frequency(roleId, "1")==0 && Collections.frequency(roleId, "16")==0) {
|
||||
if(Collections.frequency(roleId, "15")==0){
|
||||
List<MapVo> orgList = sysUser.getOrgList();
|
||||
if (!orgList.isEmpty()) {
|
||||
ArrayList<String> ids = new ArrayList<>();
|
||||
for (MapVo mapVo : orgList) {
|
||||
String id = proDeptRoleDao.getOrgChildById(mapVo.getId());
|
||||
// 使用 Arrays.asList() 将数组转换为 ArrayList
|
||||
ArrayList<String> idList = new ArrayList<>(Arrays.asList(id.split(",")));
|
||||
ids.addAll(idList);
|
||||
// ids.add(String.valueOf(mapVo.getId()));
|
||||
}
|
||||
bean.setOrgList(ids);
|
||||
}
|
||||
}else{
|
||||
Long userId = SecurityUtils.getUserId();
|
||||
bean.setUserId(userId);
|
||||
}
|
||||
}
|
||||
}
|
||||
List<EvectionBean> personLists = evectionService.getEvectionList(bean);
|
||||
for (int i = 0; i < personLists.size(); i++) {
|
||||
EvectionBean vo = personLists.get(i);
|
||||
|
|
@ -1029,7 +1060,7 @@ public class ExportFileController {
|
|||
|
||||
|
||||
/**
|
||||
* 数据管理-休假报备
|
||||
* 数据管理-休假报备-微信
|
||||
*
|
||||
* @param response
|
||||
* @param bean
|
||||
|
|
@ -1041,20 +1072,26 @@ public class ExportFileController {
|
|||
SysUser sysUser = SecurityUtils.getLoginUser().getSysUser();
|
||||
List<String> roleId = sysUser.getRoleList();
|
||||
//管理员与人资角色可以看到所有
|
||||
if( roleId !=null && !roleId.isEmpty()){
|
||||
if (Collections.frequency(roleId, "1")==0 && Collections.frequency(roleId, "16")==0) {
|
||||
List<MapVo> orgList = sysUser.getOrgList();
|
||||
if (!orgList.isEmpty()) {
|
||||
ArrayList<String> ids = new ArrayList<>();
|
||||
for (MapVo mapVo : orgList) {
|
||||
String id = proDeptRoleDao.getOrgChildById(mapVo.getId());
|
||||
// 使用 Arrays.asList() 将数组转换为 ArrayList
|
||||
ArrayList<String> idList = new ArrayList<>(Arrays.asList(id.split(",")));
|
||||
ids.addAll(idList);
|
||||
if (roleId != null && !roleId.isEmpty()) {
|
||||
if (Collections.frequency(roleId, "1") == 0 && Collections.frequency(roleId, "16") == 0) {
|
||||
if(Collections.frequency(roleId, "15")==0){
|
||||
List<MapVo> orgList = sysUser.getOrgList();
|
||||
if (!orgList.isEmpty()) {
|
||||
ArrayList<String> ids = new ArrayList<>();
|
||||
for (MapVo mapVo : orgList) {
|
||||
String id = proDeptRoleDao.getOrgChildById(mapVo.getId());
|
||||
// 使用 Arrays.asList() 将数组转换为 ArrayList
|
||||
ArrayList<String> idList = new ArrayList<>(Arrays.asList(id.split(",")));
|
||||
ids.addAll(idList);
|
||||
// ids.add(String.valueOf(mapVo.getId()));
|
||||
}
|
||||
bean.setOrgList(ids);
|
||||
}
|
||||
bean.setOrgList(ids);
|
||||
}else{
|
||||
Long userId = SecurityUtils.getUserId();
|
||||
bean.setUserId(userId);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
List<WechatLeaveReportingBean> personExportVoList = new ArrayList<>();
|
||||
|
|
@ -1102,17 +1139,22 @@ public class ExportFileController {
|
|||
//管理员与人资角色可以看到所有
|
||||
if (roleId != null && !roleId.isEmpty()) {
|
||||
if (Collections.frequency(roleId, "1") == 0 && Collections.frequency(roleId, "16") == 0) {
|
||||
List<MapVo> orgList = sysUser.getOrgList();
|
||||
if (!orgList.isEmpty()) {
|
||||
ArrayList<String> ids = new ArrayList<>();
|
||||
for (MapVo mapVo : orgList) {
|
||||
String id = proDeptRoleDao.getOrgChildById(mapVo.getId());
|
||||
// 使用 Arrays.asList() 将数组转换为 ArrayList
|
||||
ArrayList<String> idList = new ArrayList<>(Arrays.asList(id.split(",")));
|
||||
ids.addAll(idList);
|
||||
if(Collections.frequency(roleId, "15")==0){
|
||||
List<MapVo> orgList = sysUser.getOrgList();
|
||||
if (!orgList.isEmpty()) {
|
||||
ArrayList<String> ids = new ArrayList<>();
|
||||
for (MapVo mapVo : orgList) {
|
||||
String id = proDeptRoleDao.getOrgChildById(mapVo.getId());
|
||||
// 使用 Arrays.asList() 将数组转换为 ArrayList
|
||||
ArrayList<String> idList = new ArrayList<>(Arrays.asList(id.split(",")));
|
||||
ids.addAll(idList);
|
||||
// ids.add(String.valueOf(mapVo.getId()));
|
||||
}
|
||||
bean.setOrgList(ids);
|
||||
}
|
||||
bean.setOrgList(ids);
|
||||
}else{
|
||||
Long userId = SecurityUtils.getUserId();
|
||||
bean.setUserId(userId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1166,6 +1208,4 @@ public class ExportFileController {
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,10 @@ import com.bonus.common.log.annotation.Log;
|
|||
import com.bonus.common.log.enums.BusinessType;
|
||||
import com.bonus.common.security.annotation.RequiresPermissions;
|
||||
import com.bonus.common.security.utils.SecurityUtils;
|
||||
import com.bonus.system.api.domain.MapVo;
|
||||
import com.bonus.system.api.domain.SysRole;
|
||||
import com.bonus.system.api.domain.SysUser;
|
||||
import com.bonus.system.dept.dao.ProDeptRoleDao;
|
||||
import com.bonus.system.evection.entity.EvectionBean;
|
||||
import com.bonus.system.evection.service.EvectionService;
|
||||
import com.bonus.system.holiday.dao.WorkReportDao;
|
||||
|
|
@ -16,6 +19,8 @@ import org.springframework.validation.annotation.Validated;
|
|||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
|
@ -34,6 +39,9 @@ public class EvectionController extends BaseController {
|
|||
@Resource(name = "WorkReportDao")
|
||||
private WorkReportDao dao;
|
||||
|
||||
@Resource(name = "ProDeptRoleDao")
|
||||
private ProDeptRoleDao proDeptRoleDao;
|
||||
|
||||
/**
|
||||
* 获取出差报备列表(表格)
|
||||
*/
|
||||
|
|
@ -43,23 +51,47 @@ public class EvectionController extends BaseController {
|
|||
public TableDataInfo list(EvectionBean bean) {
|
||||
try{
|
||||
|
||||
//不是管理员,只能查自己
|
||||
Long userId = SecurityUtils.getUserId();
|
||||
List<SysRole> sysRoleList = dao.getRoleListByUserId(userId);
|
||||
int roleCount = 0;
|
||||
if(!sysRoleList.isEmpty()){
|
||||
for (SysRole sysRole : sysRoleList) {
|
||||
if(sysRole.getRoleName().contains("管理员")){
|
||||
roleCount = 1;
|
||||
break;
|
||||
// //不是管理员,只能查自己
|
||||
// Long userId = SecurityUtils.getUserId();
|
||||
// List<SysRole> sysRoleList = dao.getRoleListByUserId(userId);
|
||||
// int roleCount = 0;
|
||||
// if(!sysRoleList.isEmpty()){
|
||||
// for (SysRole sysRole : sysRoleList) {
|
||||
// if(sysRole.getRoleName().contains("管理员")){
|
||||
// roleCount = 1;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// if(roleCount==1){
|
||||
//
|
||||
// }else{
|
||||
// bean.setUserId(userId);
|
||||
// }
|
||||
SysUser sysUser = SecurityUtils.getLoginUser().getSysUser();
|
||||
List<String> roleId = sysUser.getRoleList();
|
||||
//管理员与人资角色可以看到所有
|
||||
if( roleId !=null && !roleId.isEmpty()){
|
||||
if (Collections.frequency(roleId, "1")==0 && Collections.frequency(roleId, "16")==0) {
|
||||
if(Collections.frequency(roleId, "15")==0){
|
||||
List<MapVo> orgList = sysUser.getOrgList();
|
||||
if (!orgList.isEmpty()) {
|
||||
ArrayList<String> ids = new ArrayList<>();
|
||||
for (MapVo mapVo : orgList) {
|
||||
String id = proDeptRoleDao.getOrgChildById(mapVo.getId());
|
||||
// 使用 Arrays.asList() 将数组转换为 ArrayList
|
||||
ArrayList<String> idList = new ArrayList<>(Arrays.asList(id.split(",")));
|
||||
ids.addAll(idList);
|
||||
// ids.add(String.valueOf(mapVo.getId()));
|
||||
}
|
||||
bean.setOrgList(ids);
|
||||
}
|
||||
}else{
|
||||
Long userId = SecurityUtils.getUserId();
|
||||
bean.setUserId(userId);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(roleCount==1){
|
||||
|
||||
}else{
|
||||
bean.setUserId(userId);
|
||||
}
|
||||
startPage();
|
||||
return getDataTable(evectionService.getEvectionList(bean));
|
||||
}catch (Exception e){
|
||||
|
|
|
|||
|
|
@ -30,16 +30,6 @@ public class EvectionServiceImpl implements EvectionService {
|
|||
|
||||
@Override
|
||||
public List<EvectionBean> getEvectionList(EvectionBean bean) {
|
||||
//只能查自己部门的人
|
||||
// List<MapVo> orgList = SecurityUtils.getLoginUser().getSysUser().getOrgList();
|
||||
// if(!orgList.isEmpty()){
|
||||
// ArrayList<String> ids = new ArrayList<>();
|
||||
// for (MapVo mapVo : orgList) {
|
||||
// ids.add(String.valueOf(mapVo.getId()));
|
||||
// }
|
||||
// bean.setOrgList(ids);
|
||||
// }
|
||||
// Map<String, Object> params = bean.getParams();
|
||||
Map<String, Object> params = bean.getParams();
|
||||
return evectionDao.getEvectionList(bean,params);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,17 +64,22 @@ public class HolidayController extends BaseController {
|
|||
//管理员与人资角色可以看到所有
|
||||
if( roleId !=null && !roleId.isEmpty()){
|
||||
if (Collections.frequency(roleId, "1")==0 && Collections.frequency(roleId, "16")==0) {
|
||||
List<MapVo> orgList = sysUser.getOrgList();
|
||||
if (!orgList.isEmpty()) {
|
||||
ArrayList<String> ids = new ArrayList<>();
|
||||
for (MapVo mapVo : orgList) {
|
||||
String id = proDeptRoleDao.getOrgChildById(mapVo.getId());
|
||||
// 使用 Arrays.asList() 将数组转换为 ArrayList
|
||||
ArrayList<String> idList = new ArrayList<>(Arrays.asList(id.split(",")));
|
||||
ids.addAll(idList);
|
||||
if(Collections.frequency(roleId, "15")==0){
|
||||
List<MapVo> orgList = sysUser.getOrgList();
|
||||
if (!orgList.isEmpty()) {
|
||||
ArrayList<String> ids = new ArrayList<>();
|
||||
for (MapVo mapVo : orgList) {
|
||||
String id = proDeptRoleDao.getOrgChildById(mapVo.getId());
|
||||
// 使用 Arrays.asList() 将数组转换为 ArrayList
|
||||
ArrayList<String> idList = new ArrayList<>(Arrays.asList(id.split(",")));
|
||||
ids.addAll(idList);
|
||||
// ids.add(String.valueOf(mapVo.getId()));
|
||||
}
|
||||
bean.setOrgList(ids);
|
||||
}
|
||||
bean.setOrgList(ids);
|
||||
}else{
|
||||
Long userId = SecurityUtils.getUserId();
|
||||
bean.setUserId(userId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,17 +56,22 @@ public class LeaveReportingController extends BaseController {
|
|||
//管理员与人资角色可以看到所有
|
||||
if( roleId !=null && !roleId.isEmpty()){
|
||||
if (Collections.frequency(roleId, "1")==0 && Collections.frequency(roleId, "16")==0) {
|
||||
List<MapVo> orgList = sysUser.getOrgList();
|
||||
if (!orgList.isEmpty()) {
|
||||
ArrayList<String> ids = new ArrayList<>();
|
||||
for (MapVo mapVo : orgList) {
|
||||
String id = proDeptRoleDao.getOrgChildById(mapVo.getId());
|
||||
// 使用 Arrays.asList() 将数组转换为 ArrayList
|
||||
ArrayList<String> idList = new ArrayList<>(Arrays.asList(id.split(",")));
|
||||
ids.addAll(idList);
|
||||
if(Collections.frequency(roleId, "15")==0){
|
||||
List<MapVo> orgList = sysUser.getOrgList();
|
||||
if (!orgList.isEmpty()) {
|
||||
ArrayList<String> ids = new ArrayList<>();
|
||||
for (MapVo mapVo : orgList) {
|
||||
String id = proDeptRoleDao.getOrgChildById(mapVo.getId());
|
||||
// 使用 Arrays.asList() 将数组转换为 ArrayList
|
||||
ArrayList<String> idList = new ArrayList<>(Arrays.asList(id.split(",")));
|
||||
ids.addAll(idList);
|
||||
// ids.add(String.valueOf(mapVo.getId()));
|
||||
}
|
||||
bean.setOrgList(ids);
|
||||
}
|
||||
bean.setOrgList(ids);
|
||||
}else{
|
||||
Long userId = SecurityUtils.getUserId();
|
||||
bean.setUserId(userId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,17 +54,22 @@ public class WechatController extends BaseController {
|
|||
//管理员与人资角色可以看到所有
|
||||
if( roleId !=null && !roleId.isEmpty()){
|
||||
if (Collections.frequency(roleId, "1")==0 && Collections.frequency(roleId, "16")==0) {
|
||||
List<MapVo> orgList = sysUser.getOrgList();
|
||||
if (!orgList.isEmpty()) {
|
||||
ArrayList<String> ids = new ArrayList<>();
|
||||
for (MapVo mapVo : orgList) {
|
||||
if(Collections.frequency(roleId, "15")==0){
|
||||
List<MapVo> orgList = sysUser.getOrgList();
|
||||
if (!orgList.isEmpty()) {
|
||||
ArrayList<String> ids = new ArrayList<>();
|
||||
for (MapVo mapVo : orgList) {
|
||||
// ids.add(String.valueOf(mapVo.getId()));
|
||||
String id = proDeptRoleDao.getOrgChildById(mapVo.getId());
|
||||
// 使用 Arrays.asList() 将数组转换为 ArrayList
|
||||
ArrayList<String> idList = new ArrayList<>(Arrays.asList(id.split(",")));
|
||||
ids.addAll(idList);
|
||||
String id = proDeptRoleDao.getOrgChildById(mapVo.getId());
|
||||
// 使用 Arrays.asList() 将数组转换为 ArrayList
|
||||
ArrayList<String> idList = new ArrayList<>(Arrays.asList(id.split(",")));
|
||||
ids.addAll(idList);
|
||||
}
|
||||
bean.setOrgList(ids);
|
||||
}
|
||||
bean.setOrgList(ids);
|
||||
}else{
|
||||
Long userId = SecurityUtils.getUserId();
|
||||
bean.setUserId(userId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -102,17 +107,22 @@ public class WechatController extends BaseController {
|
|||
//管理员与人资角色可以看到所有
|
||||
if( roleId !=null && !roleId.isEmpty()){
|
||||
if (Collections.frequency(roleId, "1")==0 && Collections.frequency(roleId, "16")==0) {
|
||||
List<MapVo> orgList = sysUser.getOrgList();
|
||||
if (!orgList.isEmpty()) {
|
||||
ArrayList<String> ids = new ArrayList<>();
|
||||
for (MapVo mapVo : orgList) {
|
||||
if(Collections.frequency(roleId, "15")==0){
|
||||
List<MapVo> orgList = sysUser.getOrgList();
|
||||
if (!orgList.isEmpty()) {
|
||||
ArrayList<String> ids = new ArrayList<>();
|
||||
for (MapVo mapVo : orgList) {
|
||||
// ids.add(String.valueOf(mapVo.getId()));
|
||||
String id = proDeptRoleDao.getOrgChildById(mapVo.getId());
|
||||
// 使用 Arrays.asList() 将数组转换为 ArrayList
|
||||
ArrayList<String> idList = new ArrayList<>(Arrays.asList(id.split(",")));
|
||||
ids.addAll(idList);
|
||||
String id = proDeptRoleDao.getOrgChildById(mapVo.getId());
|
||||
// 使用 Arrays.asList() 将数组转换为 ArrayList
|
||||
ArrayList<String> idList = new ArrayList<>(Arrays.asList(id.split(",")));
|
||||
ids.addAll(idList);
|
||||
}
|
||||
bean.setOrgList(ids);
|
||||
}
|
||||
bean.setOrgList(ids);
|
||||
}else{
|
||||
Long userId = SecurityUtils.getUserId();
|
||||
bean.setUserId(userId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,17 +52,22 @@ public class WechatEvectionController extends BaseController {
|
|||
//管理员与人资角色可以看到所有
|
||||
if (roleId != null && !roleId.isEmpty()) {
|
||||
if (Collections.frequency(roleId, "1") == 0 && Collections.frequency(roleId, "16") == 0) {
|
||||
List<MapVo> orgList = sysUser.getOrgList();
|
||||
if (!orgList.isEmpty()) {
|
||||
ArrayList<String> ids = new ArrayList<>();
|
||||
for (MapVo mapVo : orgList) {
|
||||
String id = proDeptRoleDao.getOrgChildById(mapVo.getId());
|
||||
// 使用 Arrays.asList() 将数组转换为 ArrayList
|
||||
ArrayList<String> idList = new ArrayList<>(Arrays.asList(id.split(",")));
|
||||
ids.addAll(idList);
|
||||
if(Collections.frequency(roleId, "15")==0){
|
||||
List<MapVo> orgList = sysUser.getOrgList();
|
||||
if (!orgList.isEmpty()) {
|
||||
ArrayList<String> ids = new ArrayList<>();
|
||||
for (MapVo mapVo : orgList) {
|
||||
String id = proDeptRoleDao.getOrgChildById(mapVo.getId());
|
||||
// 使用 Arrays.asList() 将数组转换为 ArrayList
|
||||
ArrayList<String> idList = new ArrayList<>(Arrays.asList(id.split(",")));
|
||||
ids.addAll(idList);
|
||||
// ids.add(String.valueOf(mapVo.getId()));
|
||||
}
|
||||
bean.setOrgList(ids);
|
||||
}
|
||||
bean.setOrgList(ids);
|
||||
}else{
|
||||
Long userId = SecurityUtils.getUserId();
|
||||
bean.setUserId(userId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,17 +50,22 @@ public class WechatLeaveReportingController extends BaseController {
|
|||
//管理员与人资角色可以看到所有
|
||||
if( roleId !=null && !roleId.isEmpty()){
|
||||
if (Collections.frequency(roleId, "1")==0 && Collections.frequency(roleId, "16")==0) {
|
||||
List<MapVo> orgList = sysUser.getOrgList();
|
||||
if (!orgList.isEmpty()) {
|
||||
ArrayList<String> ids = new ArrayList<>();
|
||||
for (MapVo mapVo : orgList) {
|
||||
String id = proDeptRoleDao.getOrgChildById(mapVo.getId());
|
||||
// 使用 Arrays.asList() 将数组转换为 ArrayList
|
||||
ArrayList<String> idList = new ArrayList<>(Arrays.asList(id.split(",")));
|
||||
ids.addAll(idList);
|
||||
if(Collections.frequency(roleId, "15")==0){
|
||||
List<MapVo> orgList = sysUser.getOrgList();
|
||||
if (!orgList.isEmpty()) {
|
||||
ArrayList<String> ids = new ArrayList<>();
|
||||
for (MapVo mapVo : orgList) {
|
||||
String id = proDeptRoleDao.getOrgChildById(mapVo.getId());
|
||||
// 使用 Arrays.asList() 将数组转换为 ArrayList
|
||||
ArrayList<String> idList = new ArrayList<>(Arrays.asList(id.split(",")));
|
||||
ids.addAll(idList);
|
||||
// ids.add(String.valueOf(mapVo.getId()));
|
||||
}
|
||||
bean.setOrgList(ids);
|
||||
}
|
||||
bean.setOrgList(ids);
|
||||
}else{
|
||||
Long userId = SecurityUtils.getUserId();
|
||||
bean.setUserId(userId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -108,6 +108,7 @@
|
|||
leave_apply l
|
||||
LEFT JOIN sys_user_post p ON p.user_id = l.user_id
|
||||
LEFT JOIN sys_dict_data d on d.dict_code = p.post_id
|
||||
LEFT JOIN sys_user_org suo on suo.user_id=l.user_id and suo.is_active=1
|
||||
WHERE
|
||||
l.is_active = '1' AND l.leave_type = '出差' AND l.source = '1'
|
||||
<if test='bean.userId != null '>
|
||||
|
|
@ -119,6 +120,15 @@
|
|||
date_format(l.leave_end_date,'%y%m%d') between date_format(#{params.beginTime},'%y%m%d') and date_format(#{params.endTime},'%y%m%d')
|
||||
)
|
||||
</if>
|
||||
|
||||
<if test='bean.orgList != null and bean.orgList.size() > 0'>
|
||||
and suo.org_id in (
|
||||
<foreach collection="bean.orgList" item="item" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
|
||||
GROUP BY
|
||||
l.id,
|
||||
l.user_id,
|
||||
|
|
@ -138,6 +148,11 @@
|
|||
ORDER BY l.update_time DESC
|
||||
) a
|
||||
LEFT JOIN sys_user su ON su.user_id = a.submit_id
|
||||
<where>
|
||||
<if test="bean.userId!=null and bean.userId!=''">
|
||||
and a.submit_id = #{bean.userId}
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY uuid
|
||||
ORDER BY leave_start_date DESC
|
||||
</select>
|
||||
|
|
|
|||
|
|
@ -78,6 +78,11 @@
|
|||
ORDER BY l.update_time DESC
|
||||
) a
|
||||
LEFT JOIN sys_user su ON su.user_id = a.submit_id
|
||||
<where>
|
||||
<if test="bean.userId!=null and bean.userId!=''">
|
||||
and a.submit_id = #{bean.userId}
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY uuId
|
||||
ORDER BY leave_start_date DESC
|
||||
</select>
|
||||
|
|
|
|||
|
|
@ -51,6 +51,9 @@
|
|||
<if test="params.orgId != null and params.orgId != ''">
|
||||
AND l.org_id = #{params.orgId}
|
||||
</if>
|
||||
<if test='params.userId != null '>
|
||||
and l.user_id = #{params.userId}
|
||||
</if>
|
||||
GROUP BY
|
||||
l.id,
|
||||
l.user_id,
|
||||
|
|
|
|||
|
|
@ -48,6 +48,10 @@
|
|||
AND ad.org_id = #{bean.orgId}
|
||||
</if>
|
||||
|
||||
<if test="bean.userId!=null and bean.userId!=''">
|
||||
and ad.user_id = #{bean.userId}
|
||||
</if>
|
||||
|
||||
GROUP BY ad.user_id,
|
||||
ad.org_id,
|
||||
ad.att_current_day
|
||||
|
|
|
|||
Loading…
Reference in New Issue