| | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.read.listener.PageReadListener; |
| | | import com.ycl.handler.ImageResourceHandler; |
| | | import com.ycl.platform.domain.entity.CheckIndexVideo; |
| | | import com.ycl.platform.domain.entity.ImageResourceSecurity; |
| | | import com.ycl.platform.domain.entity.ImageResourceSecurityDetail; |
| | | import com.ycl.platform.mapper.CheckIndexVideoMapper; |
| | | import com.ycl.platform.mapper.ImageResourceSecurityDetailMapper; |
| | | import com.ycl.platform.mapper.ImageResourceSecurityMapper; |
| | | import com.ycl.platform.service.IImageResourceSecurityService; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | import java.math.BigDecimal; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * platformService业务层处理 |
| | |
| | | private final ImageResourceSecurityMapper imageResourceSecurityMapper; |
| | | private final ImageResourceSecurityDetailMapper imageResourceSecurityDetailMapper; |
| | | private final ISysDeptService deptService; |
| | | private final CheckIndexVideoMapper checkIndexVideoMapper; |
| | | |
| | | @Override |
| | | public ImageResourceSecurity selectImageResourceSecurityById(Long id) { |
| | |
| | | |
| | | @Override |
| | | public List<ImageResourceSecurity> selectImageResourceSecurityList(ImageResourceSecurity imageResourceSecurity) { |
| | | return imageResourceSecurityMapper.selectImageResourceSecurityList(imageResourceSecurity); |
| | | List<ImageResourceSecurity> list = imageResourceSecurityMapper.selectImageResourceSecurityList(imageResourceSecurity); |
| | | Map<Long, CheckIndexVideo> map = checkIndexVideoMapper.selectLastOneByDept(); |
| | | list.forEach(item -> item.setImageResourceSecurity( |
| | | Optional.ofNullable(map.get(item.getDeptId())) |
| | | .map(CheckIndexVideo::getImageResourceSecurity) |
| | | .orElse(BigDecimal.ZERO))); |
| | | return list; |
| | | } |
| | | |
| | | @Override |