Merge remote-tracking branch 'origin/main' into main

main
HuangHuiKang 2 weeks ago
commit d50cd0dc94

@ -177,7 +177,8 @@ public class DeviceLedgerRespVO extends BaseDO {
private String templateJson; private String templateJson;
@Schema(description = "出厂日期") @Schema(description = "出厂日期")
private LocalDateTime outgoingTime; @DateTimeFormat(pattern = "yyyy-MM-dd")
private LocalDate outgoingTime;
@Schema(description = "序列号") @Schema(description = "序列号")
private String sn; private String sn;

@ -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())

Loading…
Cancel
Save