|
|
|
@ -24,11 +24,15 @@ public interface DeviceLedgerMapper extends BaseMapperX<DeviceLedgerDO> {
|
|
|
|
|
|
|
|
|
|
|
|
LambdaQueryWrapperX<DeviceLedgerDO> deviceLedgerDOLambdaQueryWrapperX = new LambdaQueryWrapperX<>();
|
|
|
|
LambdaQueryWrapperX<DeviceLedgerDO> deviceLedgerDOLambdaQueryWrapperX = new LambdaQueryWrapperX<>();
|
|
|
|
if(StringUtils.isNotBlank(reqVO.getDeviceCode())&&StringUtils.isNotBlank(reqVO.getDeviceName())&&reqVO.getDeviceCode().equals(reqVO.getDeviceName())){
|
|
|
|
if(StringUtils.isNotBlank(reqVO.getDeviceCode())&&StringUtils.isNotBlank(reqVO.getDeviceName())&&reqVO.getDeviceCode().equals(reqVO.getDeviceName())){
|
|
|
|
deviceLedgerDOLambdaQueryWrapperX.and(w -> w
|
|
|
|
if(reqVO.getDeviceCode().contains("EQUIPMENT-")){
|
|
|
|
.like(DeviceLedgerDO::getDeviceCode, reqVO.getDeviceCode())
|
|
|
|
deviceLedgerDOLambdaQueryWrapperX.eq(DeviceLedgerDO::getId, reqVO.getDeviceCode().replace("EQUIPMENT-",""));
|
|
|
|
.or()
|
|
|
|
}else{
|
|
|
|
.like(DeviceLedgerDO::getDeviceName, reqVO.getDeviceName())
|
|
|
|
deviceLedgerDOLambdaQueryWrapperX.and(w -> w
|
|
|
|
);
|
|
|
|
.like(DeviceLedgerDO::getDeviceCode, reqVO.getDeviceCode())
|
|
|
|
|
|
|
|
.or()
|
|
|
|
|
|
|
|
.like(DeviceLedgerDO::getDeviceName, reqVO.getDeviceName())
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
}
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
deviceLedgerDOLambdaQueryWrapperX.likeIfPresent(DeviceLedgerDO::getDeviceCode, reqVO.getDeviceCode())
|
|
|
|
deviceLedgerDOLambdaQueryWrapperX.likeIfPresent(DeviceLedgerDO::getDeviceCode, reqVO.getDeviceCode())
|
|
|
|
.likeIfPresent(DeviceLedgerDO::getDeviceName, reqVO.getDeviceName());
|
|
|
|
.likeIfPresent(DeviceLedgerDO::getDeviceName, reqVO.getDeviceName());
|
|
|
|
|