| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.cache.annotation.Cacheable; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.Arrays; |
| | |
| | | |
| | | @ApiOperation("获取同行人") |
| | | @GetMapping("/peerList") |
| | | public AjaxResult peerList(String nickName, String deptId) |
| | | @Cacheable(value = "sysUser:peerList") |
| | | public AjaxResult peerList(String nickName, Long deptId) |
| | | { |
| | | String queryScope = " (dept_id = {} OR dept_id IN ( SELECT dept_id FROM sys_dept WHERE find_in_set({}, ancestors) )) "; |
| | | if (deptId==null){ |
| | | deptId = deptService.getCheckDeptIdByLoginDeptId(SecurityUtils.getDeptId()); |
| | | } else { |
| | | deptId = deptService.getCheckDeptIdByLoginDeptId(deptId); |
| | | } |
| | | List<SysUser> list = userService.list(userService.lq() |
| | | .ne(SysUser::getUserType,"02") |
| | | .ne(SysUser::getUserName,"admin") |
| | | .ne(SysUser::getUserId, SecurityUtils.getUserId()) |
| | | .eq(StringUtils.isNotEmpty(nickName), SysUser::getNickName,nickName) |
| | | .eq(deptId!=null, SysUser::getDeptId,deptId) |
| | | .likeRight(StringUtils.isNotEmpty(nickName), SysUser::getNickName,nickName) |
| | | .apply( StringUtils.format(queryScope, deptId, deptId)) |
| | | ); |
| | | list.forEach(user->{ |
| | | SysDept sysDept = deptService.selectDeptById(user.getDeptId()); |
| | |
| | | @GetMapping("/commonList") |
| | | public TableDataInfo commonList(EnforceOrderQueryBo bo) |
| | | { |
| | | if (bo.getCheckDeptId()==null){ |
| | | bo.setCheckDeptId(deptService.getCheckDeptIdByLoginDeptId(SecurityUtils.getDeptId())); |
| | | } |
| | | startPage(); |
| | | List<EnforceOrderVo> list = iEnforceOrderService.queryCommonList(bo); |
| | | return getDataTable(list); |
| | |
| | | { |
| | | return toAjax(iEnforceOrderService.deleteByIds(Arrays.asList(orderIds)) ? 1 : 0); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("企业确认——执法单") |
| | | //@PreAuthorize("@ss.hasPermi('enforce:order:remove')") |
| | | @Log(title = "企业确认执法单" , businessType = BusinessType.UPDATE) |
| | | @PostMapping("/confirm/{orderId}") |
| | | @RepeatSubmit |
| | | public AjaxResult remove(@PathVariable Long orderId) |
| | | { |
| | | return toAjax(iEnforceOrderService.confirm(orderId) ? 1 : 0); |
| | | } |
| | | } |