| | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.read.listener.PageReadListener; |
| | | import com.ycl.handler.ImageResourceHandler; |
| | | import com.ycl.platform.domain.dto.ImageResourceDTO; |
| | | 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); |
| | | List<ImageResourceDTO> dtos = checkIndexVideoMapper.selectLastOneByDept(); |
| | | for (ImageResourceSecurity item : list) { |
| | | Long deptId = item.getDeptId(); |
| | | boolean flag = false; |
| | | for (ImageResourceDTO dto : dtos) { |
| | | if(dto.getDeptId().equals(deptId)){ |
| | | item.setImageResourceSecurity(dto.getImageResourceSecurity()); |
| | | flag = true; |
| | | } |
| | | if(!flag){ |
| | | item.setImageResourceSecurity(BigDecimal.ZERO); |
| | | } |
| | | } |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | @Override |