parent
6aa7e58525
commit
fd75c8b95b
|
|
@ -113,17 +113,22 @@ public class AttendanceDetailsController 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -254,18 +254,24 @@ 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);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -86,6 +86,8 @@ public class EvectionController extends BaseController {
|
|||
}
|
||||
bean.setOrgList(ids);
|
||||
}
|
||||
Long userId = SecurityUtils.getUserId();
|
||||
bean.setUserId(userId);
|
||||
}else{
|
||||
Long userId = SecurityUtils.getUserId();
|
||||
bean.setUserId(userId);
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ public class HolidayController extends BaseController {
|
|||
/**
|
||||
* 获取假期列表(表格)
|
||||
*/
|
||||
@RequiresPermissions("flow:holiday:list")
|
||||
// @RequiresPermissions("flow:holiday:list")
|
||||
@GetMapping("/list")
|
||||
@Log(title = "流程管理->假期管理->列表查询", businessType = BusinessType.QUERY)
|
||||
public TableDataInfo list(HolidayBean bean) {
|
||||
|
|
@ -94,7 +94,7 @@ public class HolidayController extends BaseController {
|
|||
/**
|
||||
* 新增假期
|
||||
*/
|
||||
@RequiresPermissions("flow:holiday:add")
|
||||
// @RequiresPermissions("flow:holiday:add")
|
||||
@PostMapping
|
||||
@Log(title = "流程管理->假期管理->新增假期", businessType = BusinessType.INSERT)
|
||||
public AjaxResult add(@Validated @RequestBody HolidayBean o) {
|
||||
|
|
@ -110,7 +110,7 @@ public class HolidayController extends BaseController {
|
|||
/**
|
||||
* 根据组织编号获取详细信息
|
||||
*/
|
||||
@RequiresPermissions("flow:holiday:query")
|
||||
// @RequiresPermissions("flow:holiday:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
@Log(title = "流程管理->假期管理->查询单个请假单", businessType = BusinessType.QUERY)
|
||||
public AjaxResult getInfo(@PathVariable Long id) {
|
||||
|
|
@ -125,7 +125,7 @@ public class HolidayController extends BaseController {
|
|||
/**
|
||||
* 修改请假单
|
||||
*/
|
||||
@RequiresPermissions("flow:holiday:edit")
|
||||
// @RequiresPermissions("flow:holiday:edit")
|
||||
@PutMapping
|
||||
@Log(title = "流程管理->假期管理->修改请假单", businessType = BusinessType.UPDATE)
|
||||
public AjaxResult edit(@Validated @RequestBody HolidayBean o) {
|
||||
|
|
@ -141,7 +141,7 @@ public class HolidayController extends BaseController {
|
|||
/**
|
||||
* 删除请假单
|
||||
*/
|
||||
@RequiresPermissions("flow:holiday:remove")
|
||||
// @RequiresPermissions("flow:holiday:remove")
|
||||
@DeleteMapping("/{id}")
|
||||
@Log(title = "流程管理->假期管理->删除请假单", businessType = BusinessType.DELETE)
|
||||
public AjaxResult remove(@PathVariable("id") Long id) {
|
||||
|
|
@ -156,7 +156,7 @@ public class HolidayController extends BaseController {
|
|||
/**
|
||||
* 获取假期列表(审核表格)
|
||||
*/
|
||||
@RequiresPermissions("flow:holiday:list")
|
||||
// @RequiresPermissions("flow:holiday:list")
|
||||
@GetMapping("/checkList")
|
||||
@Log(title = "流程管理->假期管理->列表查询", businessType = BusinessType.QUERY)
|
||||
public TableDataInfo checkList(HolidayBean bean) {
|
||||
|
|
@ -191,7 +191,7 @@ public class HolidayController extends BaseController {
|
|||
/**
|
||||
* 提交/撤回 审核
|
||||
*/
|
||||
@RequiresPermissions("flow:holiday:edit")
|
||||
// @RequiresPermissions("flow:holiday:edit")
|
||||
@PutMapping("changeStatus")
|
||||
@Log(title = "流程管理->假期管理->修改状态", businessType = BusinessType.UPDATE)
|
||||
public AjaxResult changeStatus(@Validated @RequestBody HolidayBean o) {
|
||||
|
|
|
|||
|
|
@ -17,6 +17,10 @@
|
|||
<if test="bean.orgId != null and bean.orgId != ''">
|
||||
AND v.org_id = #{bean.orgId}
|
||||
</if>
|
||||
<if test="bean.userId != null and bean.userId != ''">
|
||||
AND v.user_id = #{bean.userId}
|
||||
</if>
|
||||
|
||||
<if test="bean.userName != null and bean.userName != ''">
|
||||
AND su.user_name like concat('%', #{bean.userName}, '%')
|
||||
</if>
|
||||
|
|
@ -79,6 +83,10 @@
|
|||
AND su.user_name like concat('%', #{bean.userName}, '%')
|
||||
</if>
|
||||
|
||||
<if test="bean.userId != null and bean.userId != ''">
|
||||
AND v.user_id = #{bean.userId}
|
||||
</if>
|
||||
|
||||
<if test='bean.attStatus != null and bean.attStatus == "6"'>
|
||||
and (v.toWorkAttStatus in (SELECT dict_value
|
||||
FROM sys_dict_data
|
||||
|
|
@ -134,6 +142,9 @@
|
|||
<if test="bean.userName != null and bean.userName != ''">
|
||||
AND su.user_name like concat('%', #{bean.userName}, '%')
|
||||
</if>
|
||||
<if test="bean.userId != null and bean.userId != ''">
|
||||
AND v.user_id = #{bean.userId}
|
||||
</if>
|
||||
|
||||
<if test='bean.attStatus != null and bean.attStatus == "6"'>
|
||||
and (v.toWorkAttStatus in (SELECT dict_value
|
||||
|
|
|
|||
|
|
@ -111,9 +111,7 @@
|
|||
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 '>
|
||||
and l.user_id = #{bean.userId}
|
||||
</if>
|
||||
|
||||
<if test="params.beginTime != null and params.beginTime != ''">
|
||||
and (
|
||||
date_format(l.leave_start_date,'%y%m%d') between date_format(#{params.beginTime},'%y%m%d') and date_format(#{params.endTime},'%y%m%d') or
|
||||
|
|
|
|||
Loading…
Reference in New Issue