|  |  |  | 
|---|
|  |  |  | @PostMapping("/create") | 
|---|
|  |  |  | @CloudRequiredPermission("business:ywlinepoint:create") | 
|---|
|  |  |  | public ApiResponse create(@RequestBody YwLinePoint ywLinePoint,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { | 
|---|
|  |  |  | ywLinePoint.setLoginUserInfo(this.getLoginUser(token)); | 
|---|
|  |  |  | return ApiResponse.success(ywLinePointService.create(ywLinePoint)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | @GetMapping("/delete/{id}") | 
|---|
|  |  |  | @CloudRequiredPermission("business:ywlinepoint:delete") | 
|---|
|  |  |  | public ApiResponse deleteById(@PathVariable Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { | 
|---|
|  |  |  | ywLinePointService.deleteById(id); | 
|---|
|  |  |  | ywLinePointService.deleteById(id, this.getLoginUser(token)); | 
|---|
|  |  |  | return ApiResponse.success(null); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | for (String id : idArray) { | 
|---|
|  |  |  | idList.add(Integer.valueOf(id)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | ywLinePointService.deleteByIdInBatch(idList); | 
|---|
|  |  |  | ywLinePointService.deleteByIdInBatch(idList,this.getLoginUser(token)); | 
|---|
|  |  |  | return ApiResponse.success(null); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | @PostMapping("/updateById") | 
|---|
|  |  |  | @CloudRequiredPermission("business:ywlinepoint:update") | 
|---|
|  |  |  | public ApiResponse updateById(@RequestBody YwLinePoint ywLinePoint,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { | 
|---|
|  |  |  | ywLinePoint.setLoginUserInfo(this.getLoginUser(token)); | 
|---|
|  |  |  | ywLinePointService.updateById(ywLinePoint); | 
|---|
|  |  |  | return ApiResponse.success(null); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | @PostMapping("/page") | 
|---|
|  |  |  | @CloudRequiredPermission("business:ywlinepoint:query") | 
|---|
|  |  |  | public ApiResponse<PageData<YwLinePoint>> findPage (@RequestBody PageWrap<YwLinePoint> pageWrap,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { | 
|---|
|  |  |  | pageWrap.getModel().setLoginUserInfo(this.getLoginUser(token)); | 
|---|
|  |  |  | return ApiResponse.success(ywLinePointService.findPage(pageWrap)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | @PostMapping("/exportExcel") | 
|---|
|  |  |  | @CloudRequiredPermission("business:ywlinepoint:exportExcel") | 
|---|
|  |  |  | public void exportExcel (@RequestBody PageWrap<YwLinePoint> pageWrap, HttpServletResponse response,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { | 
|---|
|  |  |  | pageWrap.getModel().setLoginUserInfo(this.getLoginUser(token)); | 
|---|
|  |  |  | ExcelExporter.build(YwLinePoint.class).export(ywLinePointService.findPage(pageWrap).getRecords(), "运维巡检路线关联巡检点关联表", response); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|