| | |
| | | import cn.hutool.core.util.ReUtil; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.admin.request.RetentionQuery; |
| | | import com.doumee.dao.business.RetentionMapper; |
| | | import com.doumee.dao.business.join.RetentionJoinMapper; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.dao.system.SystemDictDataMapper; |
| | | import com.doumee.dao.system.model.SystemDictData; |
| | | import com.doumee.service.business.RetentionService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.*; |
| | | import java.util.function.Function; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 在厂人员信息 表(滞留)Service实现 |
| | |
| | | |
| | | @Autowired |
| | | private RetentionJoinMapper retentionJoinMapper; |
| | | |
| | | @Autowired |
| | | private SystemDictDataMapper systemDictDataMapper; |
| | | |
| | | |
| | | @Override |
| | |
| | | } |
| | | |
| | | @Override |
| | | public PageData<Retention> findTrainTimePage(PageWrap<RetentionQuery> pageWrap) { |
| | | |
| | | public PageData<Retention> findTrainTimePage(PageWrap<Retention> pageWrap) { |
| | | //是否是数字 |
| | | boolean number = Validator.isNumber(pageWrap.getModel().getKeyWords()); |
| | | //是否包含中文 |
| | |
| | | Retention::getEventDate,pageWrap.getModel().getStartTime()); |
| | | queryWrapper.orderByDesc(Retention::getCreateDate); |
| | | IPage<Retention> retentionIPage = retentionJoinMapper.selectJoinPage(page, Retention.class, queryWrapper); |
| | | if(null != retentionIPage && retentionIPage.getRecords().size() > 0) { |
| | | List<String> codes = Arrays.asList(Constants.FTP_RESOURCE_PATH,Constants.MEMBER_IMG); |
| | | List<SystemDictData> list = systemDictDataMapper.list(codes); |
| | | Map<String,SystemDictData> dataMap = list.stream().collect(Collectors.toMap(SystemDictData::getLabel, Function.identity())); |
| | | retentionIPage.getRecords().stream().forEach(obj->{ |
| | | obj.setFaceImg(dataMap.get(Constants.FTP_RESOURCE_PATH).getCode() |
| | | +dataMap.get(Constants.MEMBER_IMG).getCode() |
| | | +obj.getFaceImg()); |
| | | }); |
| | | } |
| | | return PageData.from(retentionIPage); |
| | | } |
| | | } |