diff --git a/hzims-service/equipment/src/main/java/com/hnac/hzims/electric/service/impl/RunTemplateServiceImpl.java b/hzims-service/equipment/src/main/java/com/hnac/hzims/electric/service/impl/RunTemplateServiceImpl.java index b727720..32dce82 100644 --- a/hzims-service/equipment/src/main/java/com/hnac/hzims/electric/service/impl/RunTemplateServiceImpl.java +++ b/hzims-service/equipment/src/main/java/com/hnac/hzims/electric/service/impl/RunTemplateServiceImpl.java @@ -1,11 +1,16 @@ package com.hnac.hzims.electric.service.impl; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.hnac.hzims.electric.entity.RunTemplateEntity; import com.hnac.hzims.electric.mapper.RunTemplateMapper; import com.hnac.hzims.electric.service.IRunTemplateService; +import com.hnac.hzims.history.entity.HistoryTemplateEntity; import com.hnac.hzims.history.vo.HistoryTemplateParamVo; +import org.springblade.core.secure.utils.AuthUtil; +import org.springblade.core.tool.utils.ObjectUtil; +import org.springblade.core.tool.utils.StringUtil; import org.springframework.stereotype.Service; /** @@ -23,6 +28,12 @@ public class RunTemplateServiceImpl extends ServiceImpl pageCondition(HistoryTemplateParamVo params, IPage page) { - return null; + LambdaQueryWrapper wrapper = new LambdaQueryWrapper(); + wrapper.eq(RunTemplateEntity::getCreateUser, AuthUtil.getUserId()); + wrapper.orderByDesc(RunTemplateEntity::getCreateTime); + if(StringUtil.isNotBlank(params.getStationId())){ + wrapper.eq(RunTemplateEntity::getStationId,params.getStationId()); + } + return super.page(page,wrapper); } } diff --git a/hzims-service/equipment/src/main/java/com/hnac/hzims/history/service/impl/HistoryTemplateServiceImpl.java b/hzims-service/equipment/src/main/java/com/hnac/hzims/history/service/impl/HistoryTemplateServiceImpl.java index 6a0244e..cbac715 100644 --- a/hzims-service/equipment/src/main/java/com/hnac/hzims/history/service/impl/HistoryTemplateServiceImpl.java +++ b/hzims-service/equipment/src/main/java/com/hnac/hzims/history/service/impl/HistoryTemplateServiceImpl.java @@ -7,6 +7,7 @@ import com.hnac.hzims.history.entity.HistoryTemplateEntity; import com.hnac.hzims.history.mapper.HistoryTemplateMapper; import com.hnac.hzims.history.service.IHistoryTemplateService; import com.hnac.hzims.history.vo.HistoryTemplateParamVo; +import org.springblade.core.secure.utils.AuthUtil; import org.springblade.core.tool.utils.ObjectUtil; import org.springblade.core.tool.utils.StringUtil; import org.springframework.stereotype.Service; @@ -26,13 +27,11 @@ public class HistoryTemplateServiceImpl extends ServiceImpl pageCondition(HistoryTemplateParamVo params, IPage page) { LambdaQueryWrapper wrapper = new LambdaQueryWrapper(); + wrapper.eq(HistoryTemplateEntity::getCreateUser,AuthUtil.getUserId()); wrapper.orderByDesc(HistoryTemplateEntity::getCreateTime); if(StringUtil.isNotBlank(params.getStationId())){ wrapper.eq(HistoryTemplateEntity::getStationId,params.getStationId()); } - if(ObjectUtil.isNotEmpty(params.getCreateUser())){ - wrapper.eq(HistoryTemplateEntity::getCreateUser,params.getCreateUser()); - } return super.page(page,wrapper); }