| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper; |
| | | import com.baomidou.mybatisplus.extension.conditions.update.LambdaUpdateChainWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | @Override |
| | | public IPage<SgProgressReportVO> progressPage(IPage<SgProgressReportVO> page, ProjectSearchDTO searchDTO) { |
| | | Long userId = AuthUtil.getUserId(); |
| | | searchDTO.setUserId(userId); |
| | | List<SgProgressReportVO> list = sgProgressReportMapper.queryList(page, searchDTO); |
| | | return page.setRecords(list); |
| | | } |
| | | |
| | | @Override |
| | | public String getDeviceReport(Long gxDeviceId, Long gxStepId) { |
| | | QueryWrapper<SgProgressReportDO> wrapper = new QueryWrapper<>(); |
| | | wrapper.eq("gx_device_id",gxDeviceId); |
| | | if (gxStepId!=null){ |
| | | wrapper.eq("gx_step_id",gxStepId); |
| | | } |
| | | List<SgProgressReportDO> sgProgressReportDOS = sgProgressReportMapper.selectList(wrapper); |
| | | if (CollectionUtils.isNotEmpty(sgProgressReportDOS)){ |
| | | sgProgressReportDOS.sort((u1, u2) -> u2.getCreateTime().compareTo(u1.getCreateTime())); |
| | | return sgProgressReportDOS.get(0).getId().toString(); |
| | | } |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | |