Merge remote-tracking branch 'origin/master'
This commit is contained in:
@ -1,9 +1,12 @@
|
||||
package com.fastbee.data.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
|
||||
import com.baomidou.mybatisplus.extension.conditions.update.LambdaUpdateChainWrapper;
|
||||
import com.fastbee.common.annotation.Log;
|
||||
import com.fastbee.common.constant.HttpStatus;
|
||||
import com.fastbee.common.core.controller.BaseController;
|
||||
import com.fastbee.common.core.domain.AjaxResult;
|
||||
import com.fastbee.common.core.domain.AjaxResultPro;
|
||||
import com.fastbee.common.core.domain.entity.SysRole;
|
||||
import com.fastbee.common.core.domain.model.LoginUser;
|
||||
import com.fastbee.common.core.page.TableDataInfo;
|
||||
@ -16,6 +19,7 @@ import com.fastbee.common.utils.poi.ExcelUtil;
|
||||
import com.fastbee.data.service.devicedetail.IDeviceDetailService;
|
||||
import com.fastbee.iot.domain.Device;
|
||||
import com.fastbee.iot.domain.JiankongDeviceParam;
|
||||
import com.fastbee.iot.mapper.DeviceMapper;
|
||||
import com.fastbee.iot.model.DeviceAssignmentVO;
|
||||
import com.fastbee.iot.model.DeviceImportVO;
|
||||
import com.fastbee.iot.model.DeviceRelateUserInput;
|
||||
@ -54,6 +58,8 @@ public class DeviceController extends BaseController {
|
||||
@Autowired
|
||||
private IDeviceService deviceService;
|
||||
@Autowired
|
||||
private DeviceMapper deviceMapper;
|
||||
@Autowired
|
||||
private IDeviceDetailService deviceDetailService;
|
||||
// @Lazy
|
||||
@Autowired
|
||||
@ -508,11 +514,19 @@ public class DeviceController extends BaseController {
|
||||
*/
|
||||
@GetMapping("/getDeviceIsActivation")
|
||||
@ApiOperation("根据设备编号判断设备是否激活")
|
||||
public AjaxResult getDeviceActivation(String serialNumber) {
|
||||
Device device = deviceService.selectDeviceBySerialNumber(serialNumber);
|
||||
if(device.getStatus().toString().equals("1")){
|
||||
return AjaxResult.success(false);
|
||||
public AjaxResultPro getDeviceActivation(String serialNumber) {
|
||||
List<Device> list = new LambdaQueryChainWrapper<>(deviceMapper)
|
||||
.select(Device::getDeviceId, Device::getStatus)
|
||||
.eq(Device::getSerialNumber, serialNumber)
|
||||
.list();
|
||||
if(list.isEmpty()){
|
||||
return AjaxResultPro.success(204,"设备不存在!",null);
|
||||
}
|
||||
return AjaxResult.success(true);
|
||||
|
||||
Device device = list.get(0);
|
||||
if(device.getStatus().toString().equals("1")){
|
||||
return AjaxResultPro.success(false);
|
||||
}
|
||||
return AjaxResultPro.success(true);
|
||||
}
|
||||
}
|
||||
|
@ -50,6 +50,7 @@ public class DeviceOperationController {
|
||||
} else if (deviceOperationDTO.getOperationType().equals("100")) {
|
||||
param.put("cmd",100);
|
||||
Map<String,Object> data = new HashMap<>();
|
||||
//status:0关1开2停止
|
||||
data.put("status",deviceOperationDTO.getOperationCode());
|
||||
param.put("data",data);
|
||||
}
|
||||
|
@ -0,0 +1,110 @@
|
||||
package com.fastbee.data.controller.userRecharge;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.fastbee.common.annotation.Log;
|
||||
import com.fastbee.common.core.controller.BaseController;
|
||||
import com.fastbee.common.core.domain.AjaxResult;
|
||||
import com.fastbee.common.enums.BusinessType;
|
||||
import com.fastbee.rechargecard.domain.NgIrrigationControllers;
|
||||
import com.fastbee.rechargecard.service.INgIrrigationControllersService;
|
||||
import com.fastbee.common.utils.poi.ExcelUtil;
|
||||
import com.fastbee.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 灌溉控制器信息Controller
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-12-19
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/rechargecard/controllers")
|
||||
@Api(tags = "灌溉控制器信息")
|
||||
public class NgIrrigationControllersController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private INgIrrigationControllersService ngIrrigationControllersService;
|
||||
|
||||
/**
|
||||
* 查询灌溉控制器信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('rechargecard:controllers:list')")
|
||||
@GetMapping("/list")
|
||||
@ApiOperation("查询灌溉控制器信息列表")
|
||||
public TableDataInfo list(NgIrrigationControllers ngIrrigationControllers)
|
||||
{
|
||||
startPage();
|
||||
List<NgIrrigationControllers> list = ngIrrigationControllersService.selectNgIrrigationControllersList(ngIrrigationControllers);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出灌溉控制器信息列表
|
||||
*/
|
||||
@ApiOperation("导出灌溉控制器信息列表")
|
||||
@PreAuthorize("@ss.hasPermi('rechargecard:controllers:export')")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, NgIrrigationControllers ngIrrigationControllers)
|
||||
{
|
||||
List<NgIrrigationControllers> list = ngIrrigationControllersService.selectNgIrrigationControllersList(ngIrrigationControllers);
|
||||
ExcelUtil<NgIrrigationControllers> util = new ExcelUtil<NgIrrigationControllers>(NgIrrigationControllers.class);
|
||||
util.exportExcel(response, list, "灌溉控制器信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取灌溉控制器信息详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('rechargecard:controllers:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
@ApiOperation("获取灌溉控制器信息详细信息")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(ngIrrigationControllersService.selectNgIrrigationControllersById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增灌溉控制器信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('rechargecard:controllers:add')")
|
||||
@PostMapping
|
||||
@ApiOperation("新增灌溉控制器信息")
|
||||
public AjaxResult add(@RequestBody NgIrrigationControllers ngIrrigationControllers)
|
||||
{
|
||||
return toAjax(ngIrrigationControllersService.insertNgIrrigationControllers(ngIrrigationControllers));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改灌溉控制器信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('rechargecard:controllers:edit')")
|
||||
@PutMapping
|
||||
@ApiOperation("修改灌溉控制器信息")
|
||||
public AjaxResult edit(@RequestBody NgIrrigationControllers ngIrrigationControllers)
|
||||
{
|
||||
return toAjax(ngIrrigationControllersService.updateNgIrrigationControllers(ngIrrigationControllers));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除灌溉控制器信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('rechargecard:controllers:remove')")
|
||||
@DeleteMapping("/{ids}")
|
||||
@ApiOperation("删除灌溉控制器信息")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(ngIrrigationControllersService.deleteNgIrrigationControllersByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,110 @@
|
||||
package com.fastbee.data.controller.userRecharge;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.fastbee.common.annotation.Log;
|
||||
import com.fastbee.common.core.controller.BaseController;
|
||||
import com.fastbee.common.core.domain.AjaxResult;
|
||||
import com.fastbee.common.enums.BusinessType;
|
||||
import com.fastbee.rechargecard.domain.NgWaterPumpUsageRecords;
|
||||
import com.fastbee.rechargecard.service.INgWaterPumpUsageRecordsService;
|
||||
import com.fastbee.common.utils.poi.ExcelUtil;
|
||||
import com.fastbee.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 水泵设备使用记录Controller
|
||||
*
|
||||
* @author kerwincui
|
||||
* @date 2024-12-19
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/waterpump/records")
|
||||
@Api(tags = "水泵设备使用记录")
|
||||
public class NgWaterPumpUsageRecordsController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private INgWaterPumpUsageRecordsService ngWaterPumpUsageRecordsService;
|
||||
|
||||
/**
|
||||
* 查询水泵设备使用记录列表
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('rechargecard:records:list')")
|
||||
@GetMapping("/list")
|
||||
@ApiOperation("查询水泵设备使用记录列表")
|
||||
public TableDataInfo list(NgWaterPumpUsageRecords ngWaterPumpUsageRecords)
|
||||
{
|
||||
startPage();
|
||||
List<NgWaterPumpUsageRecords> list = ngWaterPumpUsageRecordsService.selectNgWaterPumpUsageRecordsList(ngWaterPumpUsageRecords);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出水泵设备使用记录列表
|
||||
*/
|
||||
@ApiOperation("导出水泵设备使用记录列表")
|
||||
@PreAuthorize("@ss.hasPermi('rechargecard:records:export')")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, NgWaterPumpUsageRecords ngWaterPumpUsageRecords)
|
||||
{
|
||||
List<NgWaterPumpUsageRecords> list = ngWaterPumpUsageRecordsService.selectNgWaterPumpUsageRecordsList(ngWaterPumpUsageRecords);
|
||||
ExcelUtil<NgWaterPumpUsageRecords> util = new ExcelUtil<NgWaterPumpUsageRecords>(NgWaterPumpUsageRecords.class);
|
||||
util.exportExcel(response, list, "水泵设备使用记录数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取水泵设备使用记录详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('rechargecard:records:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
@ApiOperation("获取水泵设备使用记录详细信息")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(ngWaterPumpUsageRecordsService.selectNgWaterPumpUsageRecordsById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增水泵设备使用记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('rechargecard:records:add')")
|
||||
@PostMapping
|
||||
@ApiOperation("新增水泵设备使用记录")
|
||||
public AjaxResult add(@RequestBody NgWaterPumpUsageRecords ngWaterPumpUsageRecords)
|
||||
{
|
||||
return toAjax(ngWaterPumpUsageRecordsService.insertNgWaterPumpUsageRecords(ngWaterPumpUsageRecords));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改水泵设备使用记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('rechargecard:records:edit')")
|
||||
@PutMapping
|
||||
@ApiOperation("修改水泵设备使用记录")
|
||||
public AjaxResult edit(@RequestBody NgWaterPumpUsageRecords ngWaterPumpUsageRecords)
|
||||
{
|
||||
return toAjax(ngWaterPumpUsageRecordsService.updateNgWaterPumpUsageRecords(ngWaterPumpUsageRecords));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除水泵设备使用记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('rechargecard:records:remove')")
|
||||
@DeleteMapping("/{ids}")
|
||||
@ApiOperation("删除水泵设备使用记录")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(ngWaterPumpUsageRecordsService.deleteNgWaterPumpUsageRecordsByIds(ids));
|
||||
}
|
||||
}
|
@ -3,6 +3,7 @@ package com.fastbee.data.controller.userRecharge;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.fastbee.rechargecard.domain.dto.UserIrrigationRecordDto;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
@ -65,12 +66,28 @@ public class UserIrrigationRecordController extends BaseController
|
||||
/**
|
||||
* 获取用户灌溉记录展示详细信息列表
|
||||
*/
|
||||
/*@PreAuthorize("@ss.hasPermi('rechargecard:record:query')")
|
||||
@GetMapping(value = "/list/show/{cardNumber}")
|
||||
@ApiOperation("获取灌溉记录详细信息")
|
||||
public AjaxResult getShowInfo(@PathVariable("cardNumber") String cardNumber)
|
||||
@PreAuthorize("@ss.hasPermi('rechargecard:record:list')")
|
||||
@GetMapping("/list/show")
|
||||
@ApiOperation("查询灌溉记录列表")
|
||||
public TableDataInfo Showlist(UserIrrigationRecord userIrrigationRecord)
|
||||
{
|
||||
return success(userIrrigationRecordService.selectUserIrrigationRecordListShowBycardNumber(cardNumber));
|
||||
startPage();
|
||||
List<UserIrrigationRecordDto> list = userIrrigationRecordService.selectUserIrrigationRecordShowList(userIrrigationRecord);
|
||||
return getDataTable(list);
|
||||
}
|
||||
/**
|
||||
* 获取用户灌溉记录展示详细信息列表
|
||||
*/
|
||||
/*@PreAuthorize("@ss.hasPermi('rechargecard:record:list')")
|
||||
@GetMapping("/list/show/{cardNumber}")
|
||||
@ApiOperation("查询灌溉记录列表")
|
||||
public TableDataInfo ShowlistByCardNumber(@PathVariable("cardNumber") String cardNumber)
|
||||
{
|
||||
startPage();
|
||||
UserIrrigationRecord userIrrigationRecord=new UserIrrigationRecord();
|
||||
userIrrigationRecord.setCardNumber(cardNumber);
|
||||
List<UserIrrigationRecordDto> list = userIrrigationRecordService.selectUserIrrigationRecordShowList(userIrrigationRecord);
|
||||
return getDataTable(list);
|
||||
}*/
|
||||
|
||||
/**
|
||||
|
@ -41,7 +41,7 @@ public class MaGuangaiRecordController extends BaseController
|
||||
/**
|
||||
* 查询灌溉记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('waterele:guangaiRecord:list')")
|
||||
//@PreAuthorize("@ss.hasPermi('waterele:guangaiRecord:list')")
|
||||
@GetMapping("/list")
|
||||
@ApiOperation("查询灌溉记录列表")
|
||||
public TableDataInfo list(MaGuangaiRecord maGuangaiRecord)
|
||||
|
Reference in New Issue
Block a user