| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.gk.hotwork.Domain.*; |
| | | import com.gk.hotwork.Domain.Do.CompanyStatisticInspectionDO; |
| | | import com.gk.hotwork.Domain.Do.SafetySelfInspectionItemQualifiedCountDO; |
| | | import com.gk.hotwork.Domain.Exception.BusinessException; |
| | | import com.gk.hotwork.Domain.Utils.BeanUtils; |
| | |
| | | attachmentInfoService.updateBusinessIdBatch(attachmentList); |
| | | } |
| | | |
| | | @Override |
| | | public Date selectLastTimeByCompanyId(Long companyId,Date startTime,Date endTime) { |
| | | SafetySelfInspection inspection = safetySelfInspectionMapper.selectOne(new LambdaQueryWrapper<SafetySelfInspection>() |
| | | .eq(SafetySelfInspection::getValidFlag,1) |
| | | .eq(SafetySelfInspection::getFlag, 2) |
| | | .eq(SafetySelfInspection::getCheckedCompanyId, companyId) |
| | | .ge(startTime != null,SafetySelfInspection::getInspectionTime,startTime) |
| | | .le(endTime != null,SafetySelfInspection::getInspectionTime,endTime) |
| | | .orderByDesc(SafetySelfInspection::getInspectionTime) |
| | | .last("limit 1")); |
| | | if(inspection != null){ |
| | | return inspection.getInspectionTime(); |
| | | } |
| | | return null; |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public CompanyStatisticInspectionDO companyStatisticInspection(Map<String, Object> params) { |
| | | |
| | | return safetySelfInspectionMapper.companyStatisticInspection(params); |
| | | } |
| | | |
| | | private void requiredAttachmentVerification(List<AttachmentInfo> attachmentList) { |
| | | if(CollectionUtils.isEmpty(attachmentList)){ |
| | | throw new BusinessException("附件信息为空"); |