| | |
| | | import com.project.common.utils.StringUtils; |
| | | import com.project.common.utils.poi.ExcelUtil; |
| | | import com.project.enforce.domain.bo.editBo.EnforceOrderBo; |
| | | import com.project.enforce.domain.bo.editBo.OrderComplaintBo; |
| | | import com.project.enforce.domain.bo.editBo.OrderResultBo; |
| | | import com.project.enforce.domain.bo.queryBo.EnforceOrderQueryBo; |
| | | import com.project.enforce.domain.bo.queryBo.OrderCheckedQueryBo; |
| | |
| | | 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") |
| | | @Cacheable(value = "sysUser:peerList") |
| | | public AjaxResult peerList(String nickName, String 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) |
| | | .like(StringUtils.isNotEmpty(nickName), SysUser::getNickName,nickName) |
| | | .eq(deptId!=null, SysUser::getDeptId, deptId) |
| | | ); |
| | | list.forEach(user->{ |
| | | SysDept sysDept = deptService.selectDeptById(user.getDeptId()); |
| | |
| | | user.setDept(sysDept); |
| | | }); |
| | | return AjaxResult.success(list); |
| | | } |
| | | |
| | | @ApiOperation("列表——无特殊查询") |
| | | @GetMapping("/commonList") |
| | | public TableDataInfo commonList(EnforceOrderQueryBo bo) |
| | | { |
| | | startPage(); |
| | | List<EnforceOrderVo> list = iEnforceOrderService.queryCommonList(bo); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | @ApiOperation("列表——企业执法记录") |
| | | @GetMapping("/companyList") |
| | | public TableDataInfo companyList(EnforceOrderQueryBo bo) |
| | | { |
| | | startPage(); |
| | | List<EnforceOrderVo> list = iEnforceOrderService.queryCompanyList(bo); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | @ApiOperation("列表——执法申请单") |
| | |
| | | @PostMapping("/doScanOrder/{orderId}") |
| | | public AjaxResult doScanOrder(@PathVariable("orderId") Long orderId) |
| | | { |
| | | return AjaxResult.success(iEnforceOrderService.doScanOrder(orderId)); |
| | | return toAjax(iEnforceOrderService.doScanOrder(orderId)); |
| | | } |
| | | |
| | | @ApiOperation("上报结果") |
| | |
| | | return AjaxResult.success(iEnforceOrderService.doResultOrder(resultBo)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("执法单节点") |
| | | @GetMapping("/orderNodeList") |
| | | public AjaxResult orderNodeList(@RequestParam("orderId") Long orderId) |
| | |
| | | return AjaxResult.success(list); |
| | | } |
| | | |
| | | @ApiOperation("执法单投诉") |
| | | @Log(title = "执法单投诉", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/orderComplaint") |
| | | public AjaxResult orderComplaint(@RequestBody OrderComplaintBo bo) |
| | | { |
| | | return toAjax(iEnforceOrderService.orderComplaint(bo)); |
| | | } |
| | | |
| | | @ApiOperation("执法单投诉节点") |
| | | @GetMapping("/orderComplaintNodeList") |
| | | public AjaxResult orderComplaintNodeList(@RequestParam("orderId") Long orderId) |
| | | { |
| | | List<OrderNodeVo> list = iEnforceOrderService.orderComplaintNodeList(orderId); |
| | | return AjaxResult.success(list); |
| | | } |
| | | |
| | | @ApiOperation("导出执法单列表") |
| | | //@PreAuthorize("@ss.hasPermi('enforce:order:export')") |
| | |
| | | { |
| | | 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); |
| | | } |
| | | } |