bug
This commit is contained in:
parent
c6568679f8
commit
b9eadb12e6
@ -7,7 +7,9 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|||||||
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.fuint.business.tag.entity.OilTag;
|
import com.fuint.business.tag.entity.OilTag;
|
||||||
|
import com.fuint.business.tag.entity.TagCodeRecord;
|
||||||
import com.fuint.business.tag.service.OilTagService;
|
import com.fuint.business.tag.service.OilTagService;
|
||||||
|
import com.fuint.business.tag.service.TagCodeRecordService;
|
||||||
import com.fuint.business.tag.util.TagUtils;
|
import com.fuint.business.tag.util.TagUtils;
|
||||||
import com.fuint.framework.web.BaseController;
|
import com.fuint.framework.web.BaseController;
|
||||||
import com.fuint.framework.web.ResponseObject;
|
import com.fuint.framework.web.ResponseObject;
|
||||||
@ -33,6 +35,9 @@ public class OilTagController extends BaseController {
|
|||||||
@Resource
|
@Resource
|
||||||
private OilTagService oilTagService;
|
private OilTagService oilTagService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private TagCodeRecordService tagCodeRecordService;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private TagUtils tagUtils;
|
private TagUtils tagUtils;
|
||||||
/**
|
/**
|
||||||
@ -100,5 +105,19 @@ public class OilTagController extends BaseController {
|
|||||||
public ResponseObject delete(@PathVariable("id") Long id) {
|
public ResponseObject delete(@PathVariable("id") Long id) {
|
||||||
return getSuccessResult(this.oilTagService.removeById(id));
|
return getSuccessResult(this.oilTagService.removeById(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//通过二维码sn查油站id
|
||||||
|
@GetMapping("/getSn/{sn}")
|
||||||
|
public ResponseObject selectOne(@PathVariable String sn) {
|
||||||
|
LambdaQueryWrapper<OilTag> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.eq(OilTag::getTagCodeSn, sn);
|
||||||
|
OilTag one = this.oilTagService.getOne(queryWrapper);
|
||||||
|
Integer oilTagId = one.getId();
|
||||||
|
LambdaQueryWrapper<TagCodeRecord> queryWrapper1 = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper1.eq(TagCodeRecord::getOilTagId,oilTagId);
|
||||||
|
TagCodeRecord one1 = tagCodeRecordService.getOne(queryWrapper1);
|
||||||
|
return getSuccessResult(one1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user