package com.yuchen.saas.park.service.wrapper;


import cn.hutool.core.util.StrUtil;
import com.yuchen.saas.park.api.entity.park.PmgBatFaceCaptureEventData;
import com.yuchen.saas.park.api.vo.park.FaceMatchVo;
import org.nest.springwrap.core.mp.support.BaseEntityWrapper;
import org.springframework.beans.BeanUtils;

/**
 * @author llc
 * @date 2022/6/16 17:52
 * @Description
 */
public class FaceMatchWrapper extends BaseEntityWrapper<PmgBatFaceCaptureEventData, FaceMatchVo> {


    @Override
    public FaceMatchVo entityVO(PmgBatFaceCaptureEventData entity) {
        FaceMatchVo faceMatchVo = new FaceMatchVo();
       /* if(entity.getFaceTime()!=null) {
            entity.setFaceTime(DateTimeUtils.getDateStrFromISO8601Timestamp(entity.getFaceTime()));
        }*/
        BeanUtils.copyProperties(entity, faceMatchVo);

        if (StrUtil.isBlank(faceMatchVo.getFaceGroupName())) {
            faceMatchVo.setFaceGroupName("陌生人");
        }
        if (StrUtil.isBlank(faceMatchVo.getFaceInfoName())) {
            faceMatchVo.setFaceInfoName("未登记");
        }
        //temperaturePreventionVO.setEnterTime(DateTimeUtils.timestampToDateTime(entity.getEnterTime()));
        // temperaturePreventionVO.setWearMaskDesc(MaskEnum.getDescByCode(temperaturePreventionVO.getWearMask()));
        return faceMatchVo;
    }


}
