Browse Source

#运行报表

zhongwei
yang_shj 2 months ago
parent
commit
c33a6470e7
  1. 13
      hzims-service/equipment/src/main/java/com/hnac/hzims/electric/service/impl/RunTemplateServiceImpl.java
  2. 5
      hzims-service/equipment/src/main/java/com/hnac/hzims/history/service/impl/HistoryTemplateServiceImpl.java

13
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<RunTemplateMapper, RunTe
*/
@Override
public IPage<RunTemplateEntity> pageCondition(HistoryTemplateParamVo params, IPage<RunTemplateEntity> page) {
return null;
LambdaQueryWrapper<RunTemplateEntity> 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);
}
}

5
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<HistoryTemplateMappe
@Override
public IPage<HistoryTemplateEntity> pageCondition(HistoryTemplateParamVo params, IPage<HistoryTemplateEntity> page) {
LambdaQueryWrapper<HistoryTemplateEntity> 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);
}

Loading…
Cancel
Save