| | |
| | | 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;
|
| | |
| | | */
|
| | | @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>("");
|
| | | }
|
| | |
|
| | |
| | | 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;
|
| | | }
|
| | |
|
| | | }
|