From 50e24cdfd75ada4dd6ea5dce74803b7f96e3ba81 Mon Sep 17 00:00:00 2001 From: ZhuDongming <773644075@qq.com> Date: Thu, 15 Aug 2019 17:20:52 +0800 Subject: [PATCH] 添加无人机历史查询最大值和最小值的Mapper接口 --- src/main/java/com/moral/controller/MobileController.java | 25 +++++++++++++++++++++++-- 1 files changed, 23 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/moral/controller/MobileController.java b/src/main/java/com/moral/controller/MobileController.java index de362b3..69d12d8 100644 --- a/src/main/java/com/moral/controller/MobileController.java +++ b/src/main/java/com/moral/controller/MobileController.java @@ -13,6 +13,7 @@ import org.springframework.cglib.beans.BeanMap; import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; @@ -118,7 +119,8 @@ */ @RequestMapping("reportDevice") public AppData<String> installDevice(EquDeviceAdapter equDeviceAdapter) { - deviceService.addOrModify(equDeviceAdapter.toDevice()); + //deviceService.addOrModify(equDeviceAdapter.toDevice()); + deviceService.saveOrUpdate4Mobile(equDeviceAdapter.toDevice(), equDeviceAdapter.getDeviceProperty()); return new AppData<String>(""); } @@ -329,11 +331,30 @@ return new ResultBean<List<Map<String, Object>>>(sensors); } - @RequestMapping("profession-provincecode") + @GetMapping("profession-provincecode") + @ApiOperation(value = "���������code������������������", notes = "���������code������������������") + @ApiImplicitParams(value = { + @ApiImplicitParam(name = "provinceCode", value = "���code", required = true, paramType = "query", dataType = "String") + }) public ResultBean<List<Profession>> getProfessionByProvinceCode(HttpServletRequest request){ Map<String, Object> parameters = WebUtils.getParametersStartingWith(request, null); List<Profession> professions = professionService.getProfessiontList(parameters); return new ResultBean<List<Profession>>(professions); } + @PostMapping("update-maintenance") + @ApiOperation(value = "������������������������������������", notes = "������������������������������������") + @ApiImplicitParams(value = { + @ApiImplicitParam(name = "id", value = "������ID", required = true, paramType = "query", dataType = "int") , + @ApiImplicitParam(name = "old_state", value = "������������������", required = true, paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "new_state", value = "������������������", required = true, paramType = "query", dataType = "String") + + }) + public ResultBean offLinToMaintenance(HttpServletRequest request) { + Map<String, Object> parameters = getParametersStartingWith(request, null); + deviceService.offLinToMaintenance(parameters); + ResultBean resultBean = new ResultBean(parameters); + return resultBean; + } + } -- Gitblit v1.8.0