| | |
| | | package com.ruoyi.app.application.controller; |
| | | |
| | | import java.awt.geom.QuadCurve2D; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.ruoyi.app.application.domain.ArdAppApplication; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.app.application.domain.ArdAppApplication; |
| | | |
| | | import com.ruoyi.app.application.service.IArdAppApplicationService; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | |
| | | * 单兵端申请查看指挥端位置或三一车辆位置Controller |
| | | * |
| | | * @author ard |
| | | * @date 2024-01-23 |
| | | * @date 2024-01-25 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/app/application") |
| | |
| | | * 获取单兵端申请查看指挥端位置或三一车辆位置详细信息 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('app:application:query')") |
| | | @GetMapping(value = "/{applicationId}") |
| | | public AjaxResult getInfo(@PathVariable("applicationId") String applicationId) |
| | | @GetMapping(value = "/{soilderId}") |
| | | public AjaxResult getInfo(@PathVariable("soilderId") String soilderId) |
| | | { |
| | | return success(ardAppApplicationService.selectArdAppApplicationByApplicationId(applicationId)); |
| | | return success(ardAppApplicationService.selectArdAppApplicationBySoilderId(soilderId)); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('app:application:remove')") |
| | | @Log(title = "单兵端申请查看指挥端位置或三一车辆位置", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{applicationIds}") |
| | | public AjaxResult remove(@PathVariable String[] applicationIds) |
| | | @DeleteMapping("/{soilderIds}") |
| | | public AjaxResult remove(@PathVariable String[] soilderIds) |
| | | { |
| | | return toAjax(ardAppApplicationService.deleteArdAppApplicationByApplicationIds(applicationIds)); |
| | | return toAjax(ardAppApplicationService.deleteArdAppApplicationBySoilderIds(soilderIds)); |
| | | } |
| | | |
| | | @PostMapping("/sendCheckCommandersPosition") |
| | | @ApiOperation("发起查看指挥端位置") |
| | | //@ApiOperation("发起查看指挥端位置") |
| | | public AjaxResult sendCheckCommandersPosition(@RequestBody Map<String,Object> para) { |
| | | String usersId = SecurityUtils.getUserId(); |
| | | try{ |
| | |
| | | } |
| | | |
| | | @PostMapping("/sendCheckSYCarsPosition") |
| | | @ApiOperation("发起查看车辆位置") |
| | | //@ApiOperation("发起查看车辆位置") |
| | | public AjaxResult sendCheckSYCarsPosition(@RequestBody Map<String,Object> para) { |
| | | String usersId = SecurityUtils.getUserId(); |
| | | try{ |
| | |
| | | } |
| | | |
| | | @GetMapping("/getCheckPosition") |
| | | @ApiOperation("指挥端查看位置申请") |
| | | //@ApiOperation("指挥端查看位置申请") |
| | | public AjaxResult getCheckPosition() { |
| | | String usersId = SecurityUtils.getUserId(); |
| | | try{ |
| | |
| | | return AjaxResult.error(); |
| | | } |
| | | } |
| | | |
| | | @PutMapping("/approvalCheckPosition") |
| | | //@ApiOperation("指挥端审批申请") |
| | | public AjaxResult approvalCheckPosition(@RequestBody Map<String,String> para) { |
| | | String commanderId = SecurityUtils.getUserId(); |
| | | try{ |
| | | int result = ardAppApplicationService.approvalCheckPosition(commanderId,para); |
| | | return result > 0 ? AjaxResult.success() : AjaxResult.error(); |
| | | }catch(Exception e){ |
| | | e.printStackTrace(); |
| | | return AjaxResult.error(); |
| | | } |
| | | } |
| | | |
| | | @GetMapping("/getCheckPositionTrue") |
| | | //@ApiOperation("指挥端查看通过的申请") |
| | | public AjaxResult getCheckPositionTrue() { |
| | | String commanderId = SecurityUtils.getUserId(); |
| | | try{ |
| | | Map<String,List<Map<String,Object>>> result = ardAppApplicationService.getCheckPositionTrue(commanderId); |
| | | return AjaxResult.success(result); |
| | | }catch(Exception e){ |
| | | e.printStackTrace(); |
| | | return AjaxResult.error(); |
| | | } |
| | | } |
| | | |
| | | @GetMapping("/getCheckPositionOwn") |
| | | //@ApiOperation("单兵端查看已审批的申请") |
| | | public AjaxResult getCheckPositionOwn() { |
| | | String soilderId = SecurityUtils.getUserId(); |
| | | try{ |
| | | Map<String,List<Map<String,Object>>> result = ardAppApplicationService.getCheckPositionOwn(soilderId); |
| | | return AjaxResult.success(result); |
| | | }catch(Exception e){ |
| | | e.printStackTrace(); |
| | | return AjaxResult.error(); |
| | | } |
| | | } |
| | | |
| | | @PutMapping("/approvalCheckPositionOwn") |
| | | //@ApiOperation("单兵端审批更改查看标记") |
| | | public AjaxResult approvalCheckPositionOwn(@RequestBody Map<String,String> para) { |
| | | String soilderId = SecurityUtils.getUserId(); |
| | | try{ |
| | | int result = ardAppApplicationService.approvalCheckPositionOwn(soilderId,para); |
| | | return result > 0 ? AjaxResult.success() : AjaxResult.error(); |
| | | }catch(Exception e){ |
| | | e.printStackTrace(); |
| | | return AjaxResult.error(); |
| | | } |
| | | } |
| | | |
| | | @GetMapping("/getSendPositionTrue") |
| | | //@ApiOperation("单兵端查看通过的申请") |
| | | public AjaxResult getSendPositionTrue() { |
| | | String soilderId = SecurityUtils.getUserId(); |
| | | try{ |
| | | Map<String,List<Map<String,Object>>> result = ardAppApplicationService.getSendPositionTrue(soilderId); |
| | | return AjaxResult.success(result); |
| | | }catch(Exception e){ |
| | | e.printStackTrace(); |
| | | return AjaxResult.error(); |
| | | } |
| | | } |
| | | |
| | | @GetMapping("/getCheckPositionNo") |
| | | //@ApiOperation("PC端查看未审批的申请") |
| | | public AjaxResult getCheckPositionNo() {// |
| | | String commanderId = SecurityUtils.getUserId(); |
| | | try{ |
| | | List<Map<String,Object>> result = ardAppApplicationService.getCheckPositionNo(commanderId); |
| | | return AjaxResult.success(result); |
| | | }catch(Exception e){ |
| | | e.printStackTrace(); |
| | | return AjaxResult.error(); |
| | | } |
| | | } |
| | | |
| | | @PostMapping("/getSoilderAndCarPositionByCommanderIdNear") |
| | | //@ApiOperation("PC端指挥端查看单兵端及车辆位置") |
| | | public AjaxResult getSoilderAndCarPositionByCommanderIdNear(@RequestBody Map<String, Double> para) { |
| | | String commanderId = SecurityUtils.getUserId(); |
| | | try{ |
| | | Map<String,Map<String,List<Map<String,Object>>>> result = ardAppApplicationService.getSoilderAndCarPositionByCommanderId(commanderId,para); |
| | | return AjaxResult.success(result); |
| | | }catch(Exception e){ |
| | | e.printStackTrace(); |
| | | return AjaxResult.error(); |
| | | } |
| | | } |
| | | } |