设备台账接口修改

main
liutao 2 weeks ago
parent a90d9e557f
commit 273f46b841

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

@ -23,9 +23,19 @@ public interface DeviceLedgerMapper extends BaseMapperX<DeviceLedgerDO> {
default PageResult<DeviceLedgerDO> selectPage(DeviceLedgerPageReqVO reqVO) {
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
.likeIfPresent(DeviceLedgerDO::getDeviceCode, reqVO.getDeviceCode())
.likeIfPresent(DeviceLedgerDO::getDeviceName, reqVO.getDeviceName())
/* .likeIfPresent(DeviceLedgerDO::getDeviceCode, reqVO.getDeviceCode())
.likeIfPresent(DeviceLedgerDO::getDeviceName, reqVO.getDeviceName())*/
.likeIfPresent(DeviceLedgerDO::getSn, reqVO.getSn())
.eqIfPresent(DeviceLedgerDO::getDeviceStatus, reqVO.getDeviceStatus())
.eqIfPresent(DeviceLedgerDO::getDeviceBrand, reqVO.getDeviceBrand())

Loading…
Cancel
Save