|
|
@ -1,5 +1,6 @@ |
|
|
|
package com.hnac.gglm.bigmodel.maintenance.controller; |
|
|
|
package com.hnac.gglm.bigmodel.maintenance.controller; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
|
|
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
|
|
|
import com.hnac.gglm.bigmodel.maintenance.dto.DeviceFuncDTO; |
|
|
|
import com.hnac.gglm.bigmodel.maintenance.dto.DeviceFuncDTO; |
|
|
@ -11,6 +12,7 @@ import io.swagger.annotations.Api; |
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
import io.swagger.annotations.ApiParam; |
|
|
|
import io.swagger.annotations.ApiParam; |
|
|
|
import lombok.AllArgsConstructor; |
|
|
|
import lombok.AllArgsConstructor; |
|
|
|
|
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.springblade.core.mp.support.Condition; |
|
|
|
import org.springblade.core.mp.support.Condition; |
|
|
|
import org.springblade.core.mp.support.Query; |
|
|
|
import org.springblade.core.mp.support.Query; |
|
|
|
import org.springblade.core.tool.api.R; |
|
|
|
import org.springblade.core.tool.api.R; |
|
|
@ -47,7 +49,20 @@ public class DataInstructController { |
|
|
|
@ApiOperation("控制指令列表查询") |
|
|
|
@ApiOperation("控制指令列表查询") |
|
|
|
@ApiOperationSupport(order = 3) |
|
|
|
@ApiOperationSupport(order = 3) |
|
|
|
public R<IPage<DataInstructEntity>> listPage(Query query, DataInstructEntity req) { |
|
|
|
public R<IPage<DataInstructEntity>> listPage(Query query, DataInstructEntity req) { |
|
|
|
return R.data(dataInstructService.page(Condition.getPage(query),Condition.getQueryWrapper(req).lambda())); |
|
|
|
QueryWrapper<DataInstructEntity> wrapper = new QueryWrapper<>(); |
|
|
|
|
|
|
|
if (StringUtils.isNotBlank(req.getItemId())) { |
|
|
|
|
|
|
|
wrapper.lambda().eq(DataInstructEntity::getItemId, req.getItemId()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (StringUtils.isNotBlank(req.getStationId())) { |
|
|
|
|
|
|
|
wrapper.lambda().eq(DataInstructEntity::getStationId, req.getStationId()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (StringUtils.isNotBlank(req.getDeviceId())) { |
|
|
|
|
|
|
|
wrapper.lambda().eq(DataInstructEntity::getDeviceId, req.getDeviceId()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (StringUtils.isNotBlank(req.getYkName())) { |
|
|
|
|
|
|
|
wrapper.lambda().like(DataInstructEntity::getYkName, req.getYkName()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return R.data(dataInstructService.page(Condition.getPage(query), wrapper)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@DeleteMapping("/removeByIds") |
|
|
|
@DeleteMapping("/removeByIds") |
|
|
|