| | |
| | | @Override |
| | | public EimsEquVo queryByAssetNo(String assetNo) { |
| | | LambdaQueryWrapper<EimsEqu> lqw = new LambdaQueryWrapper<>(); |
| | | lqw.eq(EimsEqu::getAssetNo, assetNo); |
| | | lqw.eq(EimsEqu::getAssetNo, assetNo.trim()); |
| | | EimsEquVo eimsEquVo = baseMapper.selectVoOne(lqw); |
| | | return eimsEquVo; |
| | | } |
| | |
| | | List<Long> allDescendantIds = getAllDescendantIds(equTypeId); |
| | | lqw.in(EimsEqu::getEquTypeId, allDescendantIds); |
| | | } |
| | | if (params.get("searchValue") != null && StringUtils.isNotBlank(params.get("searchValue").toString())) { |
| | | // 如果搜索值不为空,则按设备名称、资产编号进行模糊查询 |
| | | lqw.and(wrapper -> { |
| | | wrapper.like(EimsEqu::getEquName, params.get("searchValue")) |
| | | .or() |
| | | .like(EimsEqu::getAssetNo, params.get("searchValue")); |
| | | }); |
| | | } |
| | | |
| | | lqw.like(StringUtils.isNotBlank(bo.getEquName()), EimsEqu::getEquName, bo.getEquName()); |
| | | lqw.eq(StringUtils.isNotBlank(bo.getModelNo()), EimsEqu::getModelNo, bo.getModelNo()); |