|
|
|
@ -23,9 +23,19 @@ public interface DeviceLedgerMapper extends BaseMapperX<DeviceLedgerDO> {
|
|
|
|
default PageResult<DeviceLedgerDO> selectPage(DeviceLedgerPageReqVO reqVO) {
|
|
|
|
default PageResult<DeviceLedgerDO> selectPage(DeviceLedgerPageReqVO reqVO) {
|
|
|
|
|
|
|
|
|
|
|
|
LambdaQueryWrapperX<DeviceLedgerDO> deviceLedgerDOLambdaQueryWrapperX = new LambdaQueryWrapperX<>();
|
|
|
|
LambdaQueryWrapperX<DeviceLedgerDO> deviceLedgerDOLambdaQueryWrapperX = new LambdaQueryWrapperX<>();
|
|
|
|
|
|
|
|
if(StringUtils.isNotBlank(reqVO.getDeviceCode())&&StringUtils.isNotBlank(reqVO.getDeviceName())&&reqVO.getDeviceCode().equals(reqVO.getDeviceName())){
|
|
|
|
|
|
|
|
deviceLedgerDOLambdaQueryWrapperX.and(w -> w
|
|
|
|
|
|
|
|
.like(DeviceLedgerDO::getDeviceCode, reqVO.getDeviceCode())
|
|
|
|
|
|
|
|
.or()
|
|
|
|
|
|
|
|
.like(DeviceLedgerDO::getDeviceName, reqVO.getDeviceName())
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
deviceLedgerDOLambdaQueryWrapperX.likeIfPresent(DeviceLedgerDO::getDeviceCode, reqVO.getDeviceCode())
|
|
|
|
|
|
|
|
.likeIfPresent(DeviceLedgerDO::getDeviceName, reqVO.getDeviceName());
|
|
|
|
|
|
|
|
}
|
|
|
|
deviceLedgerDOLambdaQueryWrapperX
|
|
|
|
deviceLedgerDOLambdaQueryWrapperX
|
|
|
|
.likeIfPresent(DeviceLedgerDO::getDeviceCode, reqVO.getDeviceCode())
|
|
|
|
/* .likeIfPresent(DeviceLedgerDO::getDeviceCode, reqVO.getDeviceCode())
|
|
|
|
.likeIfPresent(DeviceLedgerDO::getDeviceName, reqVO.getDeviceName())
|
|
|
|
.likeIfPresent(DeviceLedgerDO::getDeviceName, reqVO.getDeviceName())*/
|
|
|
|
.likeIfPresent(DeviceLedgerDO::getSn, reqVO.getSn())
|
|
|
|
.likeIfPresent(DeviceLedgerDO::getSn, reqVO.getSn())
|
|
|
|
.eqIfPresent(DeviceLedgerDO::getDeviceStatus, reqVO.getDeviceStatus())
|
|
|
|
.eqIfPresent(DeviceLedgerDO::getDeviceStatus, reqVO.getDeviceStatus())
|
|
|
|
.eqIfPresent(DeviceLedgerDO::getDeviceBrand, reqVO.getDeviceBrand())
|
|
|
|
.eqIfPresent(DeviceLedgerDO::getDeviceBrand, reqVO.getDeviceBrand())
|
|
|
|
|