Browse Source

fix:增加查询条件

zhongwei
wangyinsheng 2 months ago
parent
commit
7416afb835
  1. 11
      hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/maintenance/controller/DataInstructController.java
  2. 8
      hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/maintenance/service/DataRecordService.java

11
hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/maintenance/controller/DataInstructController.java

@ -50,14 +50,11 @@ public class DataInstructController {
@ApiOperationSupport(order = 3)
public R<IPage<DataInstructEntity>> listPage(Query query, DataInstructEntity req) {
QueryWrapper<DataInstructEntity> wrapper = new QueryWrapper<>();
if (StringUtils.isNotBlank(req.getItemId())) {
wrapper.lambda().eq(DataInstructEntity::getItemId, req.getItemId());
if (StringUtils.isNotBlank(req.getStationName())) {
wrapper.lambda().like(DataInstructEntity::getStationName, req.getStationName());
}
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.getDeviceName())) {
wrapper.lambda().like(DataInstructEntity::getDeviceName, req.getDeviceName());
}
if (StringUtils.isNotBlank(req.getYkName())) {
wrapper.lambda().like(DataInstructEntity::getYkName, req.getYkName());

8
hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/maintenance/service/DataRecordService.java

@ -52,11 +52,11 @@ public class DataRecordService extends BaseServiceImpl<DataRecordMapper, DataRec
if (StringUtils.isNotBlank(req.getItemId())) {
wrapper.lambda().eq(DataRecordEntity::getItemId, req.getItemId());
}
if (StringUtils.isNotBlank(req.getStationId())) {
wrapper.lambda().eq(DataRecordEntity::getStationId, req.getStationId());
if (StringUtils.isNotBlank(req.getStationName())) {
wrapper.lambda().like(DataRecordEntity::getStationName, req.getStationName());
}
if (StringUtils.isNotBlank(req.getDeviceId())) {
wrapper.lambda().eq(DataRecordEntity::getDeviceId, req.getDeviceId());
if (StringUtils.isNotBlank(req.getDeviceName())) {
wrapper.lambda().like(DataRecordEntity::getDeviceName, req.getDeviceName());
}
if (StringUtils.isNotBlank(req.getRecordName())) {
wrapper.lambda().like(DataRecordEntity::getRecordName, req.getRecordName());

Loading…
Cancel
Save