ty
4 months ago
19 changed files with 382 additions and 20 deletions
@ -0,0 +1,26 @@
|
||||
package com.hnac.hzims.safeproduct.train.vo; |
||||
|
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
/** |
||||
* @author ysj |
||||
*/ |
||||
@Data |
||||
public class InstitutionalParamVo { |
||||
|
||||
@ApiModelProperty(value = "站点Id") |
||||
private String stationId; |
||||
|
||||
@ApiModelProperty(value = "月份") |
||||
private String month; |
||||
|
||||
@ApiModelProperty(value = "资料类型 : 0-制度 1-资料") |
||||
private Integer dataType; |
||||
|
||||
@ApiModelProperty(value = "文档名称") |
||||
private String fileName; |
||||
|
||||
@ApiModelProperty(value = "文档名称") |
||||
private Integer status; |
||||
} |
@ -0,0 +1,23 @@
|
||||
package com.hnac.hzims.safeproduct.train.vo; |
||||
|
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
/** |
||||
* @author ysj |
||||
*/ |
||||
@Data |
||||
public class TrainParamVo { |
||||
|
||||
@ApiModelProperty(value = "站点Id") |
||||
private String stationId; |
||||
|
||||
@ApiModelProperty(value = "月份") |
||||
private String month; |
||||
|
||||
@ApiModelProperty(value = "培训起止时间") |
||||
private String startTime; |
||||
|
||||
@ApiModelProperty(value = "培训结束时间") |
||||
private String endTime; |
||||
} |
@ -0,0 +1,20 @@
|
||||
package com.hnac.hzims.safeproduct.train.vo; |
||||
|
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
/** |
||||
* @author ysj |
||||
*/ |
||||
@Data |
||||
public class TrainSummaryVo { |
||||
|
||||
@ApiModelProperty(value = "站点Id") |
||||
private String stationId; |
||||
|
||||
@ApiModelProperty(value = "站点名称") |
||||
private String stationName; |
||||
|
||||
@ApiModelProperty(value = "培训次数") |
||||
private Integer count; |
||||
} |
@ -1,11 +1,14 @@
|
||||
package com.hnac.hzims.safeproduct.train.service; |
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.baomidou.mybatisplus.extension.service.IService; |
||||
import com.hnac.hzims.safeproduct.train.entity.InstitutionalEntity; |
||||
import com.hnac.hzims.safeproduct.train.vo.InstitutionalParamVo; |
||||
|
||||
/** |
||||
* @author ysj |
||||
*/ |
||||
public interface IInstitutionalService extends IService<InstitutionalEntity> { |
||||
|
||||
IPage<InstitutionalEntity> pageCondition(InstitutionalParamVo params, IPage<InstitutionalEntity> page); |
||||
} |
@ -0,0 +1,19 @@
|
||||
package com.hnac.hzims.safeproduct.train.service; |
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.baomidou.mybatisplus.extension.service.IService; |
||||
import com.hnac.hzims.safeproduct.train.entity.TrainEntity; |
||||
import com.hnac.hzims.safeproduct.train.vo.TrainParamVo; |
||||
import com.hnac.hzims.safeproduct.train.vo.TrainSummaryVo; |
||||
|
||||
|
||||
/** |
||||
* @author ysj |
||||
*/ |
||||
public interface ITrainService extends IService<TrainEntity> { |
||||
|
||||
|
||||
IPage<TrainEntity> pageCondition(TrainParamVo params, IPage<TrainEntity> page); |
||||
|
||||
IPage<TrainSummaryVo> summary(TrainParamVo params, IPage<TrainSummaryVo> page); |
||||
} |
@ -0,0 +1,58 @@
|
||||
package com.hnac.hzims.safeproduct.train.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.safeproduct.train.entity.TrainEntity; |
||||
import com.hnac.hzims.safeproduct.train.entity.ViolationEntity; |
||||
import com.hnac.hzims.safeproduct.train.mapper.TrainMapper; |
||||
import com.hnac.hzims.safeproduct.train.service.ITrainService; |
||||
import com.hnac.hzims.safeproduct.train.vo.TrainParamVo; |
||||
import com.hnac.hzims.safeproduct.train.vo.TrainSummaryVo; |
||||
import org.springblade.core.tool.utils.ObjectUtil; |
||||
import org.springblade.core.tool.utils.StringUtil; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
|
||||
/** |
||||
* 安全培训 |
||||
* @author ysj |
||||
*/ |
||||
@Service |
||||
public class TrainServiceImpl extends ServiceImpl<TrainMapper, TrainEntity> implements ITrainService { |
||||
|
||||
/** |
||||
* 分页列表查询安全培训 |
||||
* @param params |
||||
* @param page |
||||
* @return |
||||
*/ |
||||
@Override |
||||
public IPage<TrainEntity> pageCondition(TrainParamVo params, IPage<TrainEntity> page) { |
||||
LambdaQueryWrapper<TrainEntity> wrapper = new LambdaQueryWrapper(); |
||||
wrapper.orderByDesc(TrainEntity::getCreateTime); |
||||
if(StringUtil.isNotBlank(params.getStationId())){ |
||||
wrapper.eq(TrainEntity::getStationId,params.getStartTime()); |
||||
} |
||||
if(StringUtil.isNotBlank(params.getStartTime())){ |
||||
wrapper.ge(TrainEntity::getTrainStartTime,params.getStartTime()); |
||||
} |
||||
if(StringUtil.isNotBlank(params.getEndTime())){ |
||||
wrapper.le(TrainEntity::getTrainEndTime,params.getEndTime()); |
||||
} |
||||
return super.page(page,wrapper); |
||||
} |
||||
|
||||
/** |
||||
* 分页列表查询安全培训汇总 |
||||
* @param params |
||||
* @param page |
||||
* @return |
||||
*/ |
||||
@Override |
||||
public IPage<TrainSummaryVo> summary(TrainParamVo params, IPage<TrainSummaryVo> page) { |
||||
return this.baseMapper.summary(params,page); |
||||
} |
||||
|
||||
|
||||
} |
Loading…
Reference in new issue