package com.iailab.module.pms.production.device.service.impl; import com.iailab.framework.common.pojo.PageResult; import com.iailab.framework.common.util.object.BeanUtils; import com.iailab.module.pms.production.device.dao.RunTimeDao; import com.iailab.module.pms.production.device.entity.RunTimeEntity; import com.iailab.module.pms.production.device.service.RunTimeService; import com.iailab.module.pms.production.device.vo.RunTimePageReqVO; import org.springframework.stereotype.Service; import javax.annotation.Resource; import java.util.*; /** * 运行时长统计 * * @author DongYukun * @Description * @createTime 2023年01月10日 11:11:00 */ @Service public class RunTimeServiceImpl implements RunTimeService { @Resource private RunTimeDao runTimeDao; @Override public String create(RunTimeEntity createEntity) { RunTimeEntity dto = BeanUtils.toBean(createEntity, RunTimeEntity.class); runTimeDao.insert(dto); return dto.getId(); } @Override public String update(RunTimeEntity createEntity) { RunTimeEntity dto = BeanUtils.toBean(createEntity, RunTimeEntity.class); runTimeDao.updateById(dto); return dto.getId(); } @Override public void delete(String id) { runTimeDao.deleteById(id); } @Override public RunTimeEntity getInfo(String id) { return runTimeDao.selectById(id); } @Override public PageResult getPage(RunTimePageReqVO PageReqVO) { return runTimeDao.selectPage(PageReqVO); } }